Team Fortress 2 Source Code as on 22/4/2020
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.

81 lines
2.9 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Holds WarData
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef TFLADDERDATA_H
  8. #define TFLADDERDATA_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "gcsdk/protobufsharedobject.h"
  13. #include "tf_gcmessages.h"
  14. #if defined (CLIENT_DLL) || defined (GAME_DLL)
  15. #include "gc_clientsystem.h"
  16. #endif
  17. #ifdef GC
  18. #include "tf_gc.h"
  19. #else
  20. #include "tf_matchmaking_shared.h"
  21. #endif
  22. //---------------------------------------------------------------------------------
  23. // Purpose: The shared object that contains a ladder player's stats
  24. //---------------------------------------------------------------------------------
  25. class CSOTFLadderData : public GCSDK::CProtoBufSharedObject< CSOTFLadderPlayerStats, k_EEConTypeLadderData >
  26. {
  27. public:
  28. CSOTFLadderData();
  29. CSOTFLadderData( uint32 unAccountID, EMatchGroup eMatchGroup );
  30. #ifdef GC
  31. DECLARE_CLASS_MEMPOOL( CSOTFLadderData );
  32. virtual bool BIsKeyLess( const CSharedObject & soRHS ) const OVERRIDE;
  33. virtual bool BYieldingAddInsertToTransaction( GCSDK::CSQLAccess & sqlAccess ) OVERRIDE;
  34. virtual bool BYieldingAddWriteToTransaction( GCSDK::CSQLAccess & sqlAccess, const CUtlVector< int > &fields ) OVERRIDE;
  35. virtual bool BYieldingAddRemoveToTransaction( GCSDK::CSQLAccess & sqlAccess ) OVERRIDE;
  36. void WriteToRecord( CSchLadderData *pLadderData ) const;
  37. void ReadFromRecord( const CSchLadderData &ladderData );
  38. #endif // GC
  39. };
  40. CSOTFLadderData *YieldingGetPlayerLadderDataBySteamID( const CSteamID &steamID, EMatchGroup nMatchGroup );
  41. #ifndef GC
  42. CSOTFLadderData *GetLocalPlayerLadderData( EMatchGroup nMatchGroup ); // TODO: GetSeasonID()
  43. #endif // !GC
  44. //---------------------------------------------------------------------------------
  45. // Purpose: The shared object that contains stats from a specific match - for match history on the client
  46. //---------------------------------------------------------------------------------
  47. class CSOTFMatchResultPlayerInfo : public GCSDK::CProtoBufSharedObject< CSOTFMatchResultPlayerStats, k_EEConTypeMatchResultPlayerInfo >
  48. {
  49. public:
  50. CSOTFMatchResultPlayerInfo();
  51. #ifdef GC
  52. DECLARE_CLASS_MEMPOOL( CSOTFMatchResultPlayerInfo );
  53. CSOTFMatchResultPlayerInfo( uint32 unAccountID );
  54. virtual bool BIsKeyLess( const CSharedObject & soRHS ) const OVERRIDE;
  55. virtual bool BYieldingAddInsertToTransaction( GCSDK::CSQLAccess & sqlAccess ) OVERRIDE;
  56. virtual bool BYieldingAddWriteToTransaction( GCSDK::CSQLAccess & sqlAccess, const CUtlVector< int > &fields ) OVERRIDE;
  57. virtual bool BYieldingAddRemoveToTransaction( GCSDK::CSQLAccess & sqlAccess ) OVERRIDE;
  58. void WriteToRecord( CSchMatchResultPlayerInfo *pMatchInfo ) const;
  59. void ReadFromRecord( const CSchMatchResultPlayerInfo &matchInfo );
  60. #endif // GC
  61. };
  62. #ifndef GC
  63. void GetLocalPlayerMatchHistory( EMatchGroup nMatchGroup, CUtlVector < CSOTFMatchResultPlayerStats > &vecMatchesOut );
  64. #endif // !GC
  65. #endif // TFLADDERDATA_H