GameServer
ItemDropMaster.h
[詳解]
1 #ifndef __ITEMDROPMASTER_H__
2 #define __ITEMDROPMASTER_H__
3 
4 #include <map>
5 #include <vector>
6 
7 class MySqlConnection;
8 
10 {
11 
12 public:
13 
14  enum
15  {
16  NONE = 0,
17  ITEM = 1,
18  GOLD = 2,
19  };
20 
21 
32 
33 
34 };
35 
36 bool operator <(const ItemDropItem &A, const ItemDropItem &B);
37 bool operator >(const ItemDropItem &A, const ItemDropItem &B);
38 
40 {
41 
42 private:
43 
44  typedef std::map<u32, ItemDropItem> ItemMap;
45  typedef std::map<int, ItemMap> SheetMap;
46 
47 public:
48 
49  bool Load(const MySqlConnection &Connection);
50 
51  const ItemDropItem *GetItem(u32 Key, s32 SheetIndex = 0) const;
52 
53  std::vector<ItemDropItem> GetAllSheetItem(s32 SheetIndex) const;
54 
55  std::vector<ItemDropItem> GetAll() const;
56 
57 private:
58 
59  SheetMap Items;
60 
61 };
62 
63 #endif // #ifndef __ITEMDROPMASTER_H__
const ItemDropItem * GetItem(u32 Key, s32 SheetIndex=0) const
Definition: ItemDropMaster.cpp:46
unsigned char u8
Definition: TypeDefs.h:6
Definition: ItemDropMaster.h:17
u32 Count1
Definition: ItemDropMaster.h:25
u32 ID
Definition: ItemDropMaster.h:22
Definition: ItemDropMaster.h:18
Definition: ItemDropMaster.h:39
std::vector< ItemDropItem > GetAllSheetItem(s32 SheetIndex) const
Definition: ItemDropMaster.cpp:55
bool operator>(const ItemDropItem &A, const ItemDropItem &B)
Definition: ItemDropMaster.cpp:91
Definition: MySqlConnection.h:15
u8 Type1
Definition: ItemDropMaster.h:23
bool operator<(const ItemDropItem &A, const ItemDropItem &B)
Definition: ItemDropMaster.cpp:86
std::vector< ItemDropItem > GetAll() const
Definition: ItemDropMaster.cpp:71
int s32
Definition: TypeDefs.h:9
unsigned int u32
Definition: TypeDefs.h:10
u32 Id2
Definition: ItemDropMaster.h:27
bool Load(const MySqlConnection &Connection)
Definition: ItemDropMaster.cpp:5
Definition: ItemDropMaster.h:16
u8 Type3
Definition: ItemDropMaster.h:29
u32 Count3
Definition: ItemDropMaster.h:31
u32 Count2
Definition: ItemDropMaster.h:28
u32 Id3
Definition: ItemDropMaster.h:30
Definition: ItemDropMaster.h:9
u32 Id1
Definition: ItemDropMaster.h:24
u8 Type2
Definition: ItemDropMaster.h:26