GameServer
LevelMaster.h
[詳解]
1 #ifndef __LEVELMASTER_H__
2 #define __LEVELMASTER_H__
3 
4 #include <map>
5 #include <vector>
6 
7 class MySqlConnection;
8 
9 struct LevelItem
10 {
11 
12 public:
13 
14 
15 
24 
25 
26 };
27 
28 bool operator <(const LevelItem &A, const LevelItem &B);
29 bool operator >(const LevelItem &A, const LevelItem &B);
30 
32 {
33 
34 private:
35 
36  typedef std::map<u32, LevelItem> ItemMap;
37  typedef std::map<int, ItemMap> SheetMap;
38 
39 public:
40 
41  bool Load(const MySqlConnection &Connection);
42 
43  const LevelItem *GetItem(u32 Key, s32 SheetIndex = 0) const;
44 
45  std::vector<LevelItem> GetAllSheetItem(s32 SheetIndex) const;
46 
47  std::vector<LevelItem> GetAll() const;
48 
49 private:
50 
51  SheetMap Items;
52 
53 };
54 
55 #endif // #ifndef __LEVELMASTER_H__
u32 Level
Definition: LevelMaster.h:16
Definition: LevelMaster.h:9
u32 MND
Definition: LevelMaster.h:21
u32 STR
Definition: LevelMaster.h:18
u32 VIT
Definition: LevelMaster.h:22
u32 DEF
Definition: LevelMaster.h:19
Definition: MySqlConnection.h:15
bool Load(const MySqlConnection &Connection)
Definition: LevelMaster.cpp:5
int s32
Definition: TypeDefs.h:9
unsigned int u32
Definition: TypeDefs.h:10
u32 NextExp
Definition: LevelMaster.h:23
Definition: LevelMaster.h:31
bool operator<(const LevelItem &A, const LevelItem &B)
Definition: LevelMaster.cpp:83
std::vector< LevelItem > GetAll() const
Definition: LevelMaster.cpp:68
std::vector< LevelItem > GetAllSheetItem(s32 SheetIndex) const
Definition: LevelMaster.cpp:52
const LevelItem * GetItem(u32 Key, s32 SheetIndex=0) const
Definition: LevelMaster.cpp:43
bool operator>(const LevelItem &A, const LevelItem &B)
Definition: LevelMaster.cpp:88
u32 INT
Definition: LevelMaster.h:20
u32 MaxHP
Definition: LevelMaster.h:17