skill.h
1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#pragma once
#include <common.h>
#include <common_msg.pb.h>
//战斗桌子上,一边放的宠物最大数量
#define BTL_TABLE_PET_CNT_MAX 7
class user_t;
struct pet_t;
#define EFF_FUN_PARA user_t* user_ack, user_t* user_def, pet_t* pet_ack, share_msg::btl_ack_t* out_btl_ack, bool is_ack_chaofeng, pet_t** pet_def
typedef int(*EFF_FUN)(EFF_FUN_PARA);
struct eff_t
{
EFF_ID id;
EFF_FUN func;
eff_t();
};
struct eff_cfg_mgr_t {
std::map<EFF_ID, eff_t> eff_map;
eff_t* find(EFF_ID id);
};
extern eff_cfg_mgr_t* g_eff_cfg_mgr;
struct skill_t
{
SKILL_ID id;
SKILL_TYPE type;
uint32_t levelRate;// 0:一定触发, 1:使用等级概率触发(聪明度)
eff_t* eff;
uint32_t priority;//技能优先级[0,100] 0:普通, 100:最大
skill_t();
bool is_kaichang();
bool is_xianfa();
bool is_zhudong();
bool is_beidong();
};
struct buf_t
{
BUF_KEY key;
BUF_ID id;
int time;//有效次数
int round;//持续回合数
int param1;
int param2;
int param3;
pet_t* pet;
buf_t();
};