diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-07-09 23:06:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-07-09 23:06:53 +0300 |
commit | 47aa7431432a2d9a41b949af5c2d4d7ab4db3461 (patch) | |
tree | 1e129f1c278413b495d94b811aafa22c61280222 /src/emap/data/skilld.c | |
parent | cdab2778ae73dcad36fbeac8d827732440a321e3 (diff) | |
download | plugin-47aa7431432a2d9a41b949af5c2d4d7ab4db3461.tar.gz plugin-47aa7431432a2d9a41b949af5c2d4d7ab4db3461.tar.bz2 plugin-47aa7431432a2d9a41b949af5c2d4d7ab4db3461.tar.xz plugin-47aa7431432a2d9a41b949af5c2d4d7ab4db3461.zip |
Move misc effect id for mass provoke skill into skills configuration.
Diffstat (limited to 'src/emap/data/skilld.c')
-rw-r--r-- | src/emap/data/skilld.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/emap/data/skilld.c b/src/emap/data/skilld.c index ce39993..d2c355b 100644 --- a/src/emap/data/skilld.c +++ b/src/emap/data/skilld.c @@ -20,7 +20,7 @@ struct SkilldExt skilld_arr[MAX_SKILL_DB]; -struct SkilldExt *skilld_init(void) +void skilld_init(void) { for (int f = 0; f < MAX_SKILL_DB; f ++) { @@ -31,8 +31,22 @@ struct SkilldExt *skilld_init(void) } } -struct SkilldExt *skilld_get(const int skill_idx) +struct SkilldExt *skilld_get(const int idx) { - Assert_retr(NULL, skill_idx >= 0 && skill_idx < MAX_SKILL_DB); - return &skilld_arr[skill_idx]; + Assert_retr(NULL, idx >= 0 && idx < MAX_SKILL_DB); + return &skilld_arr[idx]; +} + +struct SkilldExt *skilld_get_id(const int skill_id) +{ + Assert_retr(NULL, skill_id >= 0 && skill_id < MAX_SKILL_ID); + return &skilld_arr[skill->get_index(skill_id)]; +} + +int skilld_get_misceffect(const int skill_id, + const int effect_idx) +{ + Assert_retr(-1, skill_id >= 0 && skill_id < MAX_SKILL_ID); + Assert_retr(-1, effect_idx >= 0 && effect_idx < SKILLD_MAXMISCEFFECTS); + return skilld_arr[skill->get_index(skill_id)].miscEffects[effect_idx]; } |