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