summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-05 08:40:26 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-05 08:40:26 +0000
commit7fa39d09939706c5ce829c7a44766ba8c101efd2 (patch)
tree25e4e4c4ecbc21b3879e4180ba7226a5db5da0e6
parent2b4f29931162cd748c07588fcae9220b02f672ed (diff)
downloadhercules-7fa39d09939706c5ce829c7a44766ba8c101efd2.tar.gz
hercules-7fa39d09939706c5ce829c7a44766ba8c101efd2.tar.bz2
hercules-7fa39d09939706c5ce829c7a44766ba8c101efd2.tar.xz
hercules-7fa39d09939706c5ce829c7a44766ba8c101efd2.zip
Oops, I messed up the condition on my last commit
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13845 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/skill.c8
-rw-r--r--src/map/unit.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 6ca0eda3a..df46f2212 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5834,7 +5834,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr data)
if (ud->walktimer != -1 && ud->skillid != TK_RUN)
unit_stop_walking(src,1);
- if( sd->skillitem == ud->skillid && skill_get_delay(ud->skillid,ud->skilllv) )
+ if( !sd || sd->skillitem != ud->skillid || skill_get_delay(ud->skillid,ud->skilllv) )
ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv); //Tests show wings don't overwrite the delay but skill scrolls do. [Inkfish]
if( battle_config.display_status_timers && sd )
clif_status_change(src, SI_ACTIONDELAY, 1, skill_delayfix(src, ud->skillid, ud->skilllv));
@@ -5928,7 +5928,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr data)
}
ud->skillid = ud->skilllv = ud->skilltarget = 0;
- if( sd->skillitem == ud->skillid && skill_get_delay(ud->skillid,ud->skilllv) )
+ if( !sd || sd->skillitem != ud->skillid || skill_get_delay(ud->skillid,ud->skilllv) )
ud->canact_tick = tick;
//You can't place a skill failed packet here because it would be
//sent in ALL cases, even cases where skill_check_condition fails
@@ -6046,7 +6046,7 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr data)
if (ud->walktimer != -1)
unit_stop_walking(src,1);
- if( sd->skillitem == ud->skillid && skill_get_delay(ud->skillid,ud->skilllv) )
+ if( !sd || sd->skillitem != ud->skillid || skill_get_delay(ud->skillid,ud->skilllv) )
ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv);
if( battle_config.display_status_timers && sd )
clif_status_change(src, SI_ACTIONDELAY, 1, skill_delayfix(src, ud->skillid, ud->skilllv));
@@ -6077,7 +6077,7 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr data)
return 1;
} while(0);
- if( sd->skillitem == ud->skillid && skill_get_delay(ud->skillid,ud->skilllv) )
+ if( !sd || sd->skillitem != ud->skillid || skill_get_delay(ud->skillid,ud->skilllv) )
ud->canact_tick = tick;
ud->skillid = ud->skilllv = 0;
if(sd)
diff --git a/src/map/unit.c b/src/map/unit.c
index 21bf5c750..9a637fd60 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1074,7 +1074,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
if( casttime <= 0 )
ud->state.skillcastcancel = 0;
- if( sd->skillitem == skill_num && skill_get_cast(skill_num,skill_lv) )
+ if( !sd || sd->skillitem != ud->skillid || skill_get_cast(skill_num,skill_lv) )
ud->canact_tick = tick + casttime + 100;
if( sd )
{
@@ -1180,7 +1180,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh
casttime = skill_castfix_sc(src, casttime);
ud->state.skillcastcancel = castcancel&&casttime>0?1:0;
- if( sd->skillitem == skill_num && skill_get_cast(skill_num,skill_lv) )
+ if( !sd || sd->skillitem != ud->skillid || skill_get_cast(skill_num,skill_lv) )
ud->canact_tick = tick + casttime + 100;
// if( sd )
// {