From d2bc97170e91765de7ab67b017085370a26e3f93 Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 31 Jan 2009 12:57:07 -0700 Subject: When running out of spell charges, make sure to use spell attack delay for last attack, too --- src/map/pc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 0eac9eb..e6efe45 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4149,7 +4149,7 @@ int pc_attack_timer(int tid,unsigned int tick,int id,int data) struct status_change *sc_data; short *opt; int dist,skill,range; - + int attack_spell_delay; sd=map_id2sd(id); if(sd == NULL) @@ -4203,10 +4203,11 @@ int pc_attack_timer(int tid,unsigned int tick,int id,int data) if (sd->attackabletime > tick) return 0; // cannot attack yet + attack_spell_delay = sd->attack_spell_delay; if (sd->attack_spell_override // [Fate] If we have an active attack spell, use that && spell_attack(id, sd->attacktarget)) { // Return if the spell succeeded. If the spell had disspiated, spell_attack() may fail. - sd->attackabletime = tick + sd->attack_spell_delay; + sd->attackabletime = tick + attack_spell_delay; } else { dist = distance(sd->bl.x,sd->bl.y,bl->x,bl->y); -- cgit v1.2.3-70-g09d2