GameServer
QuestRewardMaster.h
[詳解]
1 #ifndef __QUESTREWARDMASTER_H__
2 #define __QUESTREWARDMASTER_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 
26 
27 
28 };
29 
30 bool operator <(const QuestRewardItem &A, const QuestRewardItem &B);
31 bool operator >(const QuestRewardItem &A, const QuestRewardItem &B);
32 
34 {
35 
36 private:
37 
38  typedef std::map<u32, QuestRewardItem> ItemMap;
39  typedef std::map<int, ItemMap> SheetMap;
40 
41 public:
42 
43  bool Load(const MySqlConnection &Connection);
44 
45  const QuestRewardItem *GetItem(u32 Key, s32 SheetIndex = 0) const;
46 
47  std::vector<QuestRewardItem> GetAllSheetItem(s32 SheetIndex) const;
48 
49  std::vector<QuestRewardItem> GetAll() const;
50 
51 private:
52 
53  SheetMap Items;
54 
55 };
56 
57 #endif // #ifndef __QUESTREWARDMASTER_H__
bool operator>(const QuestRewardItem &A, const QuestRewardItem &B)
Definition: QuestRewardMaster.cpp:79
unsigned char u8
Definition: TypeDefs.h:6
std::vector< QuestRewardItem > GetAll() const
Definition: QuestRewardMaster.cpp:59
u32 ID
Definition: QuestRewardMaster.h:22
Definition: QuestRewardMaster.h:33
Definition: QuestRewardMaster.h:18
Definition: MySqlConnection.h:15
Definition: QuestRewardMaster.h:17
int s32
Definition: TypeDefs.h:9
unsigned int u32
Definition: TypeDefs.h:10
Definition: QuestRewardMaster.h:9
u32 Count
Definition: QuestRewardMaster.h:25
bool Load(const MySqlConnection &Connection)
Definition: QuestRewardMaster.cpp:5
u8 Type
Definition: QuestRewardMaster.h:23
const QuestRewardItem * GetItem(u32 Key, s32 SheetIndex=0) const
Definition: QuestRewardMaster.cpp:34
Definition: QuestRewardMaster.h:16
u32 ItemId
Definition: QuestRewardMaster.h:24
bool operator<(const QuestRewardItem &A, const QuestRewardItem &B)
Definition: QuestRewardMaster.cpp:74
std::vector< QuestRewardItem > GetAllSheetItem(s32 SheetIndex) const
Definition: QuestRewardMaster.cpp:43