diff options
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]; } |