summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 8f003aa6b..f43b318bd 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -875,8 +875,7 @@ int skillnotok (int skillid, struct map_session_data *sd)
return 0;
break;
case AL_TELEPORT:
- //Flywing/ButterflyWing are checked elsewhere
- if(map[m].flag.noteleport && sd->skillitem != skillid) {
+ if(map[m].flag.noteleport) {
clif_skill_teleportmessage(sd,0);
return 1;
}
@@ -5566,7 +5565,6 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
else
target = map_id2bl(ud->skilltarget);
-
// Use a do so that you can break out of it when the skill fails.
do {
if(!target || target->prev==NULL) break;
@@ -5588,6 +5586,7 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
ud->skillx = target->x;
ud->skilly = target->y;
}
+ ud->skilltimer=tid;
return skill_castend_pos(tid,tick,id,data);
}
@@ -5693,9 +5692,6 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
else
skill_castend_damage_id(src,target,ud->skillid,ud->skilllv,tick,0);
- if (sd && sd->skillitem == ud->skillid) //Clear item skill data.
- sd->skillitem = sd->skillitemlv = 0;
-
sc = status_get_sc(src);
if(sc && sc->count && sc->data[SC_MAGICPOWER].timer != -1 && ud->skillid != HW_MAGICPOWER && ud->skillid != WZ_WATERBALL)
status_change_end(src,SC_MAGICPOWER,-1);
@@ -5857,9 +5853,6 @@ int skill_castend_pos (int tid, unsigned int tick, int id, int data)
unit_set_walkdelay(src, tick, battle_config.default_skill_delay+skill_get_walkdelay(ud->skillid, ud->skilllv), 1);
skill_castend_pos2(src,ud->skillx,ud->skilly,ud->skillid,ud->skilllv,tick,0);
- if (sd && sd->skillitem == ud->skillid) //Clear item skill data.
- sd->skillitem = sd->skillitemlv = 0;
-
if (ud->skilltimer == -1) {
if (md) md->skillidx = -1;
else ud->skillid = 0; //Non mobs can't clear this one as it is used for skill condition 'afterskill'
@@ -7922,6 +7915,8 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
else
pc_delitem(sd,i,1,0);
}
+ if (type&1) //Casting finished
+ sd->skillitem = sd->skillitemlv = 0;
return 1;
}
// for the guild skills [celest]