diff options
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 524769873..7d47cfcb6 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2745,7 +2745,11 @@ static int skill_magic_reflect(struct block_list *src, struct block_list *bl, in static int skill_attack(int attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { struct Damage dmg; +#if MAGIC_REFLECTION_TYPE struct status_data *sstatus, *tstatus; +#else + struct status_data *tstatus; +#endif struct status_change *sc; struct map_session_data *sd, *tsd; int type; @@ -2780,7 +2784,9 @@ static int skill_attack(int attack_type, struct block_list *src, struct block_li ) return 0; +#if MAGIC_REFLECTION_TYPE sstatus = status->get_status_data(src); +#endif tstatus = status->get_status_data(bl); sc = status->get_sc(bl); if (sc && !sc->count) sc = NULL; //Don't need it. @@ -4649,6 +4655,11 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl // recursive invocation of skill->castend_damage_id() with flag|1 map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), skill->splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill->castend_damage_id); + if (skill_id == AS_SPLASHER) { + // Prevent double item consumption when the target explodes (item requirements have already been processed in skill_castend_nodamage_id) + flag |= 1; + } + if (sd && skill_id == SU_LUNATICCARROTBEAT) { short item_idx = pc->search_inventory(sd, ITEMID_CARROT); @@ -19430,7 +19441,7 @@ static void skill_init_unit_layout(void) } break; default: - skill->init_unit_layout_unknown(i); + skill->init_unit_layout_unknown(i, pos); break; } if (!skill->dbs->unit_layout[pos].count) @@ -19531,7 +19542,7 @@ static void skill_init_unit_layout(void) } -static void skill_init_unit_layout_unknown(int skill_idx) +static void skill_init_unit_layout_unknown(int skill_idx, int pos) { Assert_retv(skill_idx >= 0 && skill_idx < MAX_SKILL_DB); ShowError("unknown unit layout at skill %d\n", skill->dbs->db[skill_idx].nameid); |