GameServer
SkillTreeMaster.h
[詳解]
1 #ifndef __SKILLTREEMASTER_H__
2 #define __SKILLTREEMASTER_H__
3 
4 #include <map>
5 #include <vector>
6 
7 class MySqlConnection;
8 
10 {
11 
12 public:
13 
14  enum
15  {
16  FIGHTER = 0,
17  SORCERER = 1,
18  HEALER = 2,
19  LANCER = 3,
20  };
21 
22 
28  float NodeX;
29  float NodeY;
31 
32 
33 };
34 
35 bool operator <(const SkillTreeItem &A, const SkillTreeItem &B);
36 bool operator >(const SkillTreeItem &A, const SkillTreeItem &B);
37 
39 {
40 
41 private:
42 
43  typedef std::map<u32, SkillTreeItem> ItemMap;
44  typedef std::map<int, ItemMap> SheetMap;
45 
46 public:
47 
48  bool Load(const MySqlConnection &Connection);
49 
50  const SkillTreeItem *GetItem(u32 Key, s32 SheetIndex = 0) const;
51 
52  std::vector<SkillTreeItem> GetAllSheetItem(s32 SheetIndex) const;
53 
54  std::vector<SkillTreeItem> GetAll() const;
55 
56 private:
57 
58  SheetMap Items;
59 
60 };
61 
62 #endif // #ifndef __SKILLTREEMASTER_H__
bool Load(const MySqlConnection &Connection)
Definition: SkillTreeMaster.cpp:5
unsigned char u8
Definition: TypeDefs.h:6
Definition: SkillTreeMaster.h:19
bool operator<(const SkillTreeItem &A, const SkillTreeItem &B)
Definition: SkillTreeMaster.cpp:82
Definition: SkillTreeMaster.h:9
float NodeY
Definition: SkillTreeMaster.h:29
Definition: SkillTreeMaster.h:38
float NodeX
Definition: SkillTreeMaster.h:28
const SkillTreeItem * GetItem(u32 Key, s32 SheetIndex=0) const
Definition: SkillTreeMaster.cpp:42
Definition: SkillTreeMaster.h:18
Definition: MySqlConnection.h:15
bool operator>(const SkillTreeItem &A, const SkillTreeItem &B)
Definition: SkillTreeMaster.cpp:87
std::vector< SkillTreeItem > GetAllSheetItem(s32 SheetIndex) const
Definition: SkillTreeMaster.cpp:51
u8 Job
Definition: SkillTreeMaster.h:24
int s32
Definition: TypeDefs.h:9
unsigned int u32
Definition: TypeDefs.h:10
Definition: SkillTreeMaster.h:16
Definition: SkillTreeMaster.h:17
std::vector< SkillTreeItem > GetAll() const
Definition: SkillTreeMaster.cpp:67
u32 ID
Definition: SkillTreeMaster.h:23
u32 Cost
Definition: SkillTreeMaster.h:27
u32 NeedLevel
Definition: SkillTreeMaster.h:26
u32 SkillId
Definition: SkillTreeMaster.h:25
u32 ParentNode
Definition: SkillTreeMaster.h:30