summaryrefslogtreecommitdiff
path: root/game/shared/econ/econ_contribution.h
blob: b46f87f478883ffc27729ee30a82c0c5c6a278f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: Holds the CTFMapContribution object
//
// $NoKeywords: $
//=============================================================================//

#ifndef TFMAPCONTRIBUTION_H
#define TFMAPCONTRIBUTION_H
#ifdef _WIN32
#pragma once
#endif

#include "gcsdk/protobufsharedobject.h"
#include "tf_gcmessages.h"

namespace GCSDK
{
	class CSQLAccess;
};

//---------------------------------------------------------------------------------
// Purpose: All the account-level information that the GC tracks for TF
//---------------------------------------------------------------------------------
class CTFMapContribution : public GCSDK::CProtoBufSharedObject< CSOTFMapContribution, k_EEconTypeMapContribution >
{
#ifdef GC
	DECLARE_CLASS_MEMPOOL( CTFMapContribution );
#endif

public:
	CTFMapContribution() {}

#ifdef GC
	virtual bool BYieldingAddInsertToTransaction( GCSDK::CSQLAccess & sqlAccess );
	virtual bool BYieldingAddWriteToTransaction( GCSDK::CSQLAccess & sqlAccess, const CUtlVector< int > &fields );
	virtual bool BYieldingAddRemoveToTransaction( GCSDK::CSQLAccess & sqlAccess );

	void WriteToRecord( CSchMapContribution *pMapContribution ) const;
	void ReadFromRecord( const CSchMapContribution & mapContribution );
#endif
};

#endif // TFMAPCONTRIBUTION_H