-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathAwardDefinition.h
66 lines (55 loc) · 2.18 KB
/
AwardDefinition.h
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef __AWARDDEFINITION
#define __AWARDDEFINITION
// wxWindows includes
#include <wx/datetime.h>
#include <wx/string.h>
#include <wx/dynarray.h>
// Statsgen Includes
class AwardDefinition;
WX_DECLARE_OBJARRAY(AwardDefinition,ArrayOfAwardDefinition);
class AwardDefinition
{
public:
void ReadConfig();
void WriteConfig();
AwardDefinition(wxString &idIn);
// bool Allowed(wxString &gameType);
virtual ~AwardDefinition();
static wxString SQLCreateTable();
static wxString SQLTableNameComponent(const char *component);
static wxString SQLCreateTableComponent(const char *component);
static wxString SQLTableName();
bool WriteToDatabase(int itemIndex);
bool WriteToDatabaseComponent(int itemIndex,const char *component,wxArrayString &componentList,const char *prefix);
int WeaponScore(bool *noScore,wxString &key,bool kill,bool teamkill);
int XPScore(bool *noScore,wxString &key,float points);
int LocationScore(bool *noScore,wxString &key,bool kill,bool teamkill);
int ActionScore(bool *noScore,wxString &key);
int MiscScore(bool *noScore,char *key,int count);
void SplitCode(wxString &code,bool *positive,bool *teamkill);
void AddWeaponComponent(wxString &code,bool kill,bool positive,bool teamkill);
void AddLocationComponent(wxString &code,bool kill,bool positive,bool teamkill);
void AddActionComponent(wxString &code,bool positive);
void AddMiscComponent(wxString &code,bool positive);
void AddXPComponent(wxString &code,bool positive);
void RemoveWeaponComponent(wxString &code,bool killList,bool teamkillList);
void RemoveLocationComponent(wxString &code,bool killList,bool teamkillList);
void RemoveActionComponent(wxString &code);
void RemoveMiscComponent(wxString &code);
void RemoveXPComponent(wxString &code);
wxArrayString allowedGameTypes;
wxString image;
wxString name;
bool weighted;
wxArrayString weaponKillComponents;
wxArrayString weaponDeathComponents;
wxArrayString weaponTKComponents;
wxArrayString locationKillComponents;
wxArrayString locationDeathComponents;
wxArrayString locationTKComponents;
wxArrayString actionComponents;
wxArrayString xpComponents;
wxArrayString miscComponents;
wxString id;
};
#endif