GameServer
AnpanAIMaster.h
[詳解]
1 #ifndef __ANPANAIMASTER_H__
2 #define __ANPANAIMASTER_H__
3 
4 #include <map>
5 #include <vector>
6 
7 class MySqlConnection;
8 
9 struct AnpanAIItem
10 {
11 
12 public:
13 
14  enum
15  {
16  WAIT = 0,
17  APPROACH = 1,
19  USE_SKILL = 3,
21  };
22 
23 
28 
29 
30 };
31 
32 bool operator <(const AnpanAIItem &A, const AnpanAIItem &B);
33 bool operator >(const AnpanAIItem &A, const AnpanAIItem &B);
34 
36 {
37 
38 private:
39 
40  typedef std::map<u8, AnpanAIItem> ItemMap;
41  typedef std::map<int, ItemMap> SheetMap;
42 
43 public:
44 
45  bool Load(const MySqlConnection &Connection);
46 
47  std::vector<const AnpanAIItem *> CollectItems(u8 Key, s32 SheetIndex = 0) const;
48 
49  std::vector<AnpanAIItem> GetAllSheetItem(s32 SheetIndex) const;
50 
51  std::vector<AnpanAIItem> GetAll() const;
52 
53 private:
54 
55  SheetMap Items;
56 
57 };
58 
59 #endif // #ifndef __ANPANAIMASTER_H__
unsigned char u8
Definition: TypeDefs.h:6
bool operator>(const AnpanAIItem &A, const AnpanAIItem &B)
Definition: AnpanAIMaster.cpp:87
std::vector< AnpanAIItem > GetAllSheetItem(s32 SheetIndex) const
Definition: AnpanAIMaster.cpp:51
bool Load(const MySqlConnection &Connection)
Definition: AnpanAIMaster.cpp:5
Definition: AnpanAIMaster.h:35
std::vector< const AnpanAIItem * > CollectItems(u8 Key, s32 SheetIndex=0) const
Definition: AnpanAIMaster.cpp:35
Definition: AnpanAIMaster.h:9
Definition: AnpanAIMaster.h:19
u8 Action
Definition: AnpanAIMaster.h:26
Definition: MySqlConnection.h:15
s32 AutoKey
Definition: AnpanAIMaster.h:24
bool operator<(const AnpanAIItem &A, const AnpanAIItem &B)
Definition: AnpanAIMaster.cpp:82
int s32
Definition: TypeDefs.h:9
unsigned int u32
Definition: TypeDefs.h:10
u8 StageNo
Definition: AnpanAIMaster.h:25
Definition: AnpanAIMaster.h:20
Definition: AnpanAIMaster.h:18
Definition: AnpanAIMaster.h:17
u32 Value
Definition: AnpanAIMaster.h:27
Definition: AnpanAIMaster.h:16
std::vector< AnpanAIItem > GetAll() const
Definition: AnpanAIMaster.cpp:67