diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/shared/econ/econ_game_account_server.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/shared/econ/econ_game_account_server.h')
| -rw-r--r-- | game/shared/econ/econ_game_account_server.h | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/game/shared/econ/econ_game_account_server.h b/game/shared/econ/econ_game_account_server.h new file mode 100644 index 0000000..01c1cc4 --- /dev/null +++ b/game/shared/econ/econ_game_account_server.h @@ -0,0 +1,110 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Holds the CEconGameServerAccount object +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef ECON_GAME_SERVER_ACCOUNT_H +#define ECON_GAME_SERVER_ACCOUNT_H +#ifdef _WIN32 +#pragma once +#endif + +enum eGameServerOrigin +{ + kGSAOrigin_Player = 0, + kGSAOrigin_Support = 1, + kGSAOrigin_AutoRegister = 2, // for valve-owned servers +}; + +enum eGameServerScoreStanding +{ + kGSStanding_Good, + kGSStanding_Bad, +}; + +enum eGameServerScoreStandingTrend +{ + kGSStandingTrend_Up, + kGSStandingTrend_SteadyUp, + kGSStandingTrend_Steady, + kGSStandingTrend_SteadyDown, + kGSStandingTrend_Down, +}; + +#ifdef GC +#include "gcsdk/schemasharedobject.h" + +//--------------------------------------------------------------------------------- +// Purpose: +//--------------------------------------------------------------------------------- +class CEconGameServerAccount : public GCSDK::CSchemaSharedObject< CSchGameServerAccount, k_EEconTypeGameServerAccount > +{ +#ifdef GC_DLL + DECLARE_CLASS_MEMPOOL( CEconGameServerAccount ); +#endif + +public: + CEconGameServerAccount() {} + CEconGameServerAccount( uint32 unAccountID ) + { + Obj().m_unAccountID = unAccountID; + } +}; + +void GameServerAccount_GenerateIdentityToken( char* pIdentityToken, uint32 unMaxChars ); +#endif // GC + +inline const char *GameServerAccount_GetStandingString( eGameServerScoreStanding standing ) +{ + const char *pStanding = "Good"; + switch ( standing ) + { + case kGSStanding_Good: + pStanding = "Good"; + break; + case kGSStanding_Bad: + pStanding = "Bad"; + break; + } // switch + return pStanding; +} + +inline const char *GameServerAccount_GetStandingTrendString( eGameServerScoreStandingTrend trend ) +{ + const char *pStandingTrend = "Steady"; + switch ( trend ) + { + case kGSStandingTrend_Up: + pStandingTrend = "Upward Fast"; + break; + case kGSStandingTrend_SteadyUp: + pStandingTrend = "Slightly Upward"; + break; + case kGSStandingTrend_Steady: + pStandingTrend = "Steady"; + break; + case kGSStandingTrend_SteadyDown: + pStandingTrend = "Slightly Downward"; + break; + case kGSStandingTrend_Down: + pStandingTrend = "Downward Fast"; + break; + } // switch + return pStandingTrend; +} + +//--------------------------------------------------------------------------------- +// Purpose: Selective account-level data for game servers +//--------------------------------------------------------------------------------- +class CEconGameAccountForGameServers : public GCSDK::CProtoBufSharedObject < CSOEconGameAccountForGameServers, k_EEconTypeGameAccountForGameServers > +{ +#ifdef GC + DECLARE_CLASS_MEMPOOL( CEconGameAccountForGameServers ); +public: + virtual bool BIsDatabaseBacked() const { return false; } +#endif +}; + +#endif //ECON_GAME_SERVER_ACCOUNT_H |