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.

41 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Holds XP source data
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef TF_XP_SOURCE_H
  8. #define TF_XP_SOURCE_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "gcsdk/protobufsharedobject.h"
  13. #include "tf_gcmessages.h"
  14. #ifdef GC
  15. #include "tf_gc.h"
  16. #endif
  17. //---------------------------------------------------------------------------------
  18. // Purpose: Contains a delta for a player's XP
  19. //---------------------------------------------------------------------------------
  20. class CXPSource : public GCSDK::CProtoBufSharedObject< CMsgTFXPSource, k_EEconTypeXPSource >
  21. {
  22. public:
  23. CXPSource();
  24. #ifdef GC
  25. CXPSource( CMsgTFXPSource msg );
  26. DECLARE_CLASS_MEMPOOL( CXPSource );
  27. virtual bool BYieldingAddInsertToTransaction( GCSDK::CSQLAccess & sqlAccess );
  28. virtual bool BYieldingAddWriteToTransaction( GCSDK::CSQLAccess & sqlAccess, const CUtlVector< int > &fields );
  29. virtual bool BYieldingAddRemoveToTransaction( GCSDK::CSQLAccess & sqlAccess );
  30. void WriteToRecord( CSchPlayerXPSources *pWarData ) const;
  31. void ReadFromRecord( const CSchPlayerXPSources & warData );
  32. #endif // GC
  33. };
  34. #endif // TF_XP_SOURCE_H