summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-11 01:34:51 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-12 23:22:59 +0300
commitddca9bf6efe551a7d7dbc3d12a7d638453defcd6 (patch)
treeeef6d506215354a1d0acea0f890acb612f8a9314 /src/map/battle.c
parent69df5ffa970dbcafde7dbb5d360c0ea28300cb50 (diff)
downloadhercules-ddca9bf6efe551a7d7dbc3d12a7d638453defcd6.tar.gz
hercules-ddca9bf6efe551a7d7dbc3d12a7d638453defcd6.tar.bz2
hercules-ddca9bf6efe551a7d7dbc3d12a7d638453defcd6.tar.xz
hercules-ddca9bf6efe551a7d7dbc3d12a7d638453defcd6.zip
Add into skill.c some handling for unknown skills/skill units.
Also improve a bit cast end functions call.
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 76b74a766..6e8ff3ba9 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -6269,17 +6269,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
sp = skill->get_sp(skill_id,skill_lv) * 2 / 3;
if (status->charge(src, 0, sp)) {
- switch (skill->get_casttype(skill_id)) {
- case CAST_GROUND:
- skill->castend_pos2(src, target->x, target->y, skill_id, skill_lv, tick, flag);
- break;
- case CAST_NODAMAGE:
- skill->castend_nodamage_id(src, target, skill_id, skill_lv, tick, flag);
- break;
- case CAST_DAMAGE:
- skill->castend_damage_id(src, target, skill_id, skill_lv, tick, flag);
- break;
- }
+ skill->castend_type(skill->get_casttype(skill_id), src, target, skill_id, skill_lv, tick, flag);
}
}
if (sd) {
@@ -6325,19 +6315,8 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
sd->state.autocast = 1;
skill->consume_requirement(sd,r_skill,r_lv,3);
- switch( type ) {
- case CAST_GROUND:
- skill->castend_pos2(src, target->x, target->y, r_skill, r_lv, tick, flag);
- break;
- case CAST_NODAMAGE:
- skill->castend_nodamage_id(src, target, r_skill, r_lv, tick, flag);
- break;
- case CAST_DAMAGE:
- skill->castend_damage_id(src, target, r_skill, r_lv, tick, flag);
- break;
- }
+ skill->castend_type(type, src, target, r_skill, r_lv, tick, flag);
sd->state.autocast = 0;
-
sd->ud.canact_tick = tick + skill->delay_fix(src, r_skill, r_lv);
clif->status_change(src, SI_POSTDELAY, 1, skill->delay_fix(src, r_skill, r_lv), 0, 0, 1);
}