GameServer
SkillMaster.h
[詳解]
1 #ifndef __SKILLMASTER_H__
2 #define __SKILLMASTER_H__
3 
4 #include <map>
5 #include <vector>
6 
7 class MySqlConnection;
8 
9 struct SkillItem
10 {
11 
12 public:
13 
14  enum
15  {
16  ATTACK = 0,
17  HEAL = 1,
18  BUFF = 2,
19  DEBUFF = 3,
20  ITEM_HEAL = 4,
21  };
22  enum
23  {
24  NORMAL = 0,
26  RANGE_BOX = 2,
27  };
28  enum
29  {
30  PHYSICAL = 0,
31  MAGIC = 1,
32  };
33 
34 
36  std::string Name;
52 
53 
54 };
55 
56 bool operator <(const SkillItem &A, const SkillItem &B);
57 bool operator >(const SkillItem &A, const SkillItem &B);
58 
60 {
61 
62 private:
63 
64  typedef std::map<u32, SkillItem> ItemMap;
65  typedef std::map<int, ItemMap> SheetMap;
66 
67 public:
68 
69  bool Load(const MySqlConnection &Connection);
70 
71  const SkillItem *GetItem(u32 Key, s32 SheetIndex = 0) const;
72 
73  std::vector<SkillItem> GetAllSheetItem(s32 SheetIndex) const;
74 
75  std::vector<SkillItem> GetAll() const;
76 
77 private:
78 
79  SheetMap Items;
80 
81 };
82 
83 #endif // #ifndef __SKILLMASTER_H__
Definition: SkillMaster.h:17
unsigned char u8
Definition: TypeDefs.h:6
std::vector< SkillItem > GetAll() const
Definition: SkillMaster.cpp:85
bool operator<(const SkillItem &A, const SkillItem &B)
Definition: SkillMaster.cpp:100
u32 BuffId
Definition: SkillMaster.h:51
Definition: SkillMaster.h:30
u32 BonusVit
Definition: SkillMaster.h:48
Definition: SkillMaster.h:19
Definition: SkillMaster.h:16
u32 AccumulateHate
Definition: SkillMaster.h:50
u8 CalcType
Definition: SkillMaster.h:39
u32 BonusMnd
Definition: SkillMaster.h:47
std::string Name
Definition: SkillMaster.h:36
Definition: SkillMaster.h:26
u32 ID
Definition: SkillMaster.h:35
Definition: MySqlConnection.h:15
Definition: SkillMaster.h:59
Definition: SkillMaster.h:31
s32 RecastTime
Definition: SkillMaster.h:44
int s32
Definition: TypeDefs.h:9
unsigned int u32
Definition: TypeDefs.h:10
s32 RangeX
Definition: SkillMaster.h:41
u32 VolatileHate
Definition: SkillMaster.h:49
u8 SkillType
Definition: SkillMaster.h:37
u32 BonusStr
Definition: SkillMaster.h:45
u8 RangeType
Definition: SkillMaster.h:38
s32 CastTime
Definition: SkillMaster.h:43
u32 BonusInt
Definition: SkillMaster.h:46
Definition: SkillMaster.h:9
const SkillItem * GetItem(u32 Key, s32 SheetIndex=0) const
Definition: SkillMaster.cpp:60
bool operator>(const SkillItem &A, const SkillItem &B)
Definition: SkillMaster.cpp:105
Definition: SkillMaster.h:20
std::vector< SkillItem > GetAllSheetItem(s32 SheetIndex) const
Definition: SkillMaster.cpp:69
s32 Distance
Definition: SkillMaster.h:40
Definition: SkillMaster.h:18
Definition: SkillMaster.h:25
bool Load(const MySqlConnection &Connection)
Definition: SkillMaster.cpp:5
Definition: SkillMaster.h:24
s32 RangeY
Definition: SkillMaster.h:42