summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-08 23:17:13 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-08 23:17:13 +0000
commitc738a816d668872f9d0c52968cf6b4eef433c0ce (patch)
tree24f99865f861d48432c45b10fbf54ec89e84537e /src
parent9baf4da3cd57320fd8619816c7b7eeee689b3b89 (diff)
downloadhercules-c738a816d668872f9d0c52968cf6b4eef433c0ce.tar.gz
hercules-c738a816d668872f9d0c52968cf6b4eef433c0ce.tar.bz2
hercules-c738a816d668872f9d0c52968cf6b4eef433c0ce.tar.xz
hercules-c738a816d668872f9d0c52968cf6b4eef433c0ce.zip
Fixed waterball not canceling magic power if target is killed while not all spheres were fired, credit to wildcard for the fix. bugreport:5303
- also removed a unused instance of status_change in skill_counter_additional_effect git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15548 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/skill.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index a535d312b..81ffb2333 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1483,7 +1483,6 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
int rate;
struct map_session_data *sd=NULL;
struct map_session_data *dstsd=NULL;
- struct status_change *tsc;
nullpo_ret(src);
nullpo_ret(bl);
@@ -1491,10 +1490,6 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
if(skillid < 0) return 0;
if(skillid > 0 && skilllv <= 0) return 0; // don't forget auto attacks! - celest
- tsc = status_get_sc(bl);
- if (tsc && !tsc->count)
- tsc = NULL;
-
sd = BL_CAST(BL_PC, src);
dstsd = BL_CAST(BL_PC, bl);
@@ -1571,10 +1566,19 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
sp += sd->sp_gain_race[is_boss(bl)?RC_BOSS:RC_NONBOSS];
hp += sd->hp_gain_value;
}
- if( attack_type&BF_MAGIC )
- {
+ if( attack_type&BF_MAGIC ) {
sp += sd->magic_sp_gain_value;
hp += sd->magic_hp_gain_value;
+ if( skillid == WZ_WATERBALL ) {//(bugreport:5303)
+ struct status_change *sc = NULL;
+ if( ( sc = status_get_sc(src) ) ) {
+ status_change_end(src, SC_MAGICPOWER, INVALID_TIMER);
+ if(sc->data[SC_SPIRIT] &&
+ sc->data[SC_SPIRIT]->val2 == SL_WIZARD &&
+ sc->data[SC_SPIRIT]->val3 == WZ_WATERBALL)
+ sc->data[SC_SPIRIT]->val3 = 0; //Clear bounced spell check.
+ }
+ }
}
if( hp || sp )
{// updated to force healing to allow healing through berserk