-
Notifications
You must be signed in to change notification settings - Fork 8
/
Faction.h
46 lines (40 loc) · 1.19 KB
/
Faction.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
// Faction.h: interface for the CFaction class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_FACTION_H__05038F85_2503_4BC3_B274_7AEA157DA550__INCLUDED_)
#define AFX_FACTION_H__05038F85_2503_4BC3_B274_7AEA157DA550__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CReputation
{
public:
CReputation() {}
~CReputation() {}
void Init(const CString &nickname, const FLOAT &reputation);
public:
CString m_nickname;
FLOAT m_Reputation;
};
class CFaction
{
public:
CFaction() : m_avoid(false) {}
~CFaction() {}
void Init(const CString &nickname, const CString &caption);
public:
CString m_caption;
CString m_nickname;
BOOL m_avoid;
CReputation m_reputations[256];
UINT m_reputationCount;
CSortedMap<CString, LPCTSTR, CReputation*, CReputation*> repsByNick;
};
#define FACTIONS_MAX 256
extern UINT FACTIONS_COUNT;
extern CFaction g_factions[FACTIONS_MAX];
extern CSortedMap<CString,LPCTSTR,CFaction*,CFaction*> g_factionsByNick;
extern UINT ID_COUNT;
extern CFaction g_ID[FACTIONS_MAX];
extern CSortedMap<CString, LPCTSTR, CFaction*, CFaction*> g_IDByNick;
#endif // !defined(AFX_FACTION_H__05038F85_2503_4BC3_B274_7AEA157DA550__INCLUDED_)