GameServer
AnpanMaster.h
[詳解]
1 #ifndef __ANPANMASTER_H__
2 #define __ANPANMASTER_H__
3 
4 #include <map>
5 #include <vector>
6 
7 class MySqlConnection;
8 
9 struct AnpanItem
10 {
11 
12 public:
13 
14 
15 
24  float Scale;
27 
28 
29 };
30 
31 bool operator <(const AnpanItem &A, const AnpanItem &B);
32 bool operator >(const AnpanItem &A, const AnpanItem &B);
33 
35 {
36 
37 private:
38 
39  typedef std::map<u32, AnpanItem> ItemMap;
40  typedef std::map<int, ItemMap> SheetMap;
41 
42 public:
43 
44  bool Load(const MySqlConnection &Connection);
45 
46  const AnpanItem *GetItem(u32 Key, s32 SheetIndex = 0) const;
47 
48  std::vector<AnpanItem> GetAllSheetItem(s32 SheetIndex) const;
49 
50  std::vector<AnpanItem> GetAll() const;
51 
52 private:
53 
54  SheetMap Items;
55 
56 };
57 
58 #endif // #ifndef __ANPANMASTER_H__
u32 Exp
Definition: AnpanMaster.h:23
u32 Hp
Definition: AnpanMaster.h:17
unsigned char u8
Definition: TypeDefs.h:6
u32 Str
Definition: AnpanMaster.h:18
u32 Mnd
Definition: AnpanMaster.h:21
std::vector< AnpanItem > GetAllSheetItem(s32 SheetIndex) const
Definition: AnpanMaster.cpp:57
bool Load(const MySqlConnection &Connection)
Definition: AnpanMaster.cpp:5
bool operator<(const AnpanItem &A, const AnpanItem &B)
Definition: AnpanMaster.cpp:88
Definition: AnpanMaster.h:9
Definition: AnpanMaster.h:34
Definition: MySqlConnection.h:15
std::vector< AnpanItem > GetAll() const
Definition: AnpanMaster.cpp:73
const AnpanItem * GetItem(u32 Key, s32 SheetIndex=0) const
Definition: AnpanMaster.cpp:48
bool operator>(const AnpanItem &A, const AnpanItem &B)
Definition: AnpanMaster.cpp:93
int s32
Definition: TypeDefs.h:9
u32 DropId
Definition: AnpanMaster.h:26
unsigned int u32
Definition: TypeDefs.h:10
float Scale
Definition: AnpanMaster.h:24
u32 ID
Definition: AnpanMaster.h:16
u32 Int
Definition: AnpanMaster.h:20
u32 Vit
Definition: AnpanMaster.h:22
u8 AIId
Definition: AnpanMaster.h:25
u32 Def
Definition: AnpanMaster.h:19