forked from Corran-Raisu/FLCompanion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Good.h
40 lines (33 loc) · 1.07 KB
/
Good.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
// Good.h: interface for the CGood class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_GOOD_H__E114EA7A_5A62_445E_A87F_D4E8891CDE7D__INCLUDED_)
#define AFX_GOOD_H__E114EA7A_5A62_445E_A87F_D4E8891CDE7D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define GOODS_MAX 1024
extern UINT GOODS_COUNT;
extern UINT EQUIP_COUNT;
class CGood;
extern CGood g_goods[GOODS_MAX];
extern CGood g_equip[GOODS_MAX];
class CGood
{
public:
CGood() : m_avoid(false) {}
~CGood() {}
public:
void InitPrice(float defaultPrice);
void Init(const CString &nickname, const CString &caption, float volume, UINT decay_time);
CString m_caption;
CString m_nickname;
float m_volume;
float m_defaultPrice;
UINT m_decay_time; // number of milliseconds before decay of 1 unit
BOOL m_avoid;
operator UINT() { return this-g_goods; }
};
extern CSortedMap<CString,LPCTSTR,CGood*,CGood*> g_goodsByNick;
extern CSortedMap<CString, LPCTSTR, CGood*, CGood*> g_equipByNick;
#endif // !defined(AFX_GOOD_H__E114EA7A_5A62_445E_A87F_D4E8891CDE7D__INCLUDED_)