Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.2 KiB

  1. //========= Copyright (c), Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Holds the CEconGameServerAccount object
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef ECON_GAME_SERVER_ACCOUNT_H
  8. #define ECON_GAME_SERVER_ACCOUNT_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. enum eGameServerOrigin
  13. {
  14. kGSAOrigin_Player = 0,
  15. kGSAOrigin_Support = 1,
  16. kGSAOrigin_AutoRegister = 2, // for valve-owned servers
  17. };
  18. enum eGameServerScoreStanding
  19. {
  20. kGSStanding_Good,
  21. kGSStanding_Bad,
  22. };
  23. enum eGameServerScoreStandingTrend
  24. {
  25. kGSStandingTrend_Up,
  26. kGSStandingTrend_SteadyUp,
  27. kGSStandingTrend_Steady,
  28. kGSStandingTrend_SteadyDown,
  29. kGSStandingTrend_Down,
  30. };
  31. #ifdef GC
  32. #include "gcsdk/schemasharedobject.h"
  33. //---------------------------------------------------------------------------------
  34. // Purpose:
  35. //---------------------------------------------------------------------------------
  36. class CEconGameServerAccount : public GCSDK::CSchemaSharedObject< CSchGameServerAccount, k_EEconTypeGameServerAccount >
  37. {
  38. #ifdef GC_DLL
  39. DECLARE_CLASS_MEMPOOL( CEconGameServerAccount );
  40. #endif
  41. public:
  42. CEconGameServerAccount() {}
  43. CEconGameServerAccount( uint32 unAccountID )
  44. {
  45. Obj().m_unAccountID = unAccountID;
  46. }
  47. };
  48. void GameServerAccount_GenerateIdentityToken( char* pIdentityToken, uint32 unMaxChars );
  49. #endif // GC
  50. inline const char *GameServerAccount_GetStandingString( eGameServerScoreStanding standing )
  51. {
  52. const char *pStanding = "Good";
  53. switch ( standing )
  54. {
  55. case kGSStanding_Good:
  56. pStanding = "Good";
  57. break;
  58. case kGSStanding_Bad:
  59. pStanding = "Bad";
  60. break;
  61. } // switch
  62. return pStanding;
  63. }
  64. inline const char *GameServerAccount_GetStandingTrendString( eGameServerScoreStandingTrend trend )
  65. {
  66. const char *pStandingTrend = "Steady";
  67. switch ( trend )
  68. {
  69. case kGSStandingTrend_Up:
  70. pStandingTrend = "Upward Fast";
  71. break;
  72. case kGSStandingTrend_SteadyUp:
  73. pStandingTrend = "Slightly Upward";
  74. break;
  75. case kGSStandingTrend_Steady:
  76. pStandingTrend = "Steady";
  77. break;
  78. case kGSStandingTrend_SteadyDown:
  79. pStandingTrend = "Slightly Downward";
  80. break;
  81. case kGSStandingTrend_Down:
  82. pStandingTrend = "Downward Fast";
  83. break;
  84. } // switch
  85. return pStandingTrend;
  86. }
  87. #endif //ECON_GAME_SERVER_ACCOUNT_H