blob: c1335856c6a9b75aa9a882b7dc341d77dbfbdd75 (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: Interface to CCustomAward
//
// $Workfile: $
// $Date: $
//
//------------------------------------------------------------------------------------------------------
// $Log: $
//
// $NoKeywords: $
//=============================================================================//
#ifndef CUSTOMAWARD_H
#define CUSTOMAWARD_H
#ifdef WIN32
#pragma once
#endif
#pragma warning(disable :4786)
#include "Award.h"
#include "TextFile.h"
#include "CustomAwardTriggers.h"
#include <list>
using namespace std;
//------------------------------------------------------------------------------------------------------
// Purpose: CCustomAward represents an award that is user-definable via
// a configuration file. Other than their runtime definitions, Custom awards
// act just like other static awards.
//------------------------------------------------------------------------------------------------------
class CCustomAward: public CAward
{
public:
//factory method.
static CCustomAward* readCustomAward(CTextFile& f);
protected:
list<CCustomAwardTrigger*> triggers;
bool namemode;
map<string,string> extraProps;
map<PID,int> plrscores; //this is wrt to the current award. score in this sense is not related to game score
// but simply a score that is relative to other contenders for the award.
map<PID,int> plrnums; //this is the number of times any of the triggers was activated
map<string,int> stringscores; //this is wrt to the current award. score in this sense is not related to game score
// but simply a score that is relative to other contenders for the award.
map<string,int> stringnums; //this is the number of times any of the triggers was activated
string noWinnerMsg;
string extraInfoMsg;
virtual void extendedinfo(CHTMLFile& html);
virtual void noWinner(CHTMLFile& html);
public:
explicit CCustomAward(CMatchInfo* pmi):CAward("custom_temp"){}
void getWinner();
};
#endif // CUSTOMAWARD_H
|