summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-02-04 10:44:33 -0200
committershennetsind <ind@henn.et>2014-02-04 10:44:33 -0200
commit144a9eba25cd6773cd85e6446f72ca183bc8cc58 (patch)
treee1afe81de18c14533fea4afb74131d1d799bc2a1 /src/map/battle.c
parent250ec31ab4af9a3370d4412689802f9c46c45bea (diff)
downloadhercules-144a9eba25cd6773cd85e6446f72ca183bc8cc58.tar.gz
hercules-144a9eba25cd6773cd85e6446f72ca183bc8cc58.tar.bz2
hercules-144a9eba25cd6773cd85e6446f72ca183bc8cc58.tar.xz
hercules-144a9eba25cd6773cd85e6446f72ca183bc8cc58.zip
Fixed millenium shield crash with clones
Thanks to Michieru Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index fd31f5a1f..8ad54f413 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2253,7 +2253,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
case LG_RAGEBURST:
if( sc ){
skillratio += -100 + (status_get_max_hp(src) - status_get_hp(src)) / 100 + sc->fv_counter * 200;
- clif->millenniumshield(sd, (sc->fv_counter = 0));
+ clif->millenniumshield(src, (sc->fv_counter = 0));
}
RE_LVL_DMOD(100);
break;
@@ -2665,8 +2665,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
if( sce->val3 <= 0 ) { // Shield Down
sce->val2--;
if( sce->val2 > 0 ) {
- if( sd )
- clif->millenniumshield(sd,sce->val2);
+ clif->millenniumshield(bl,sce->val2);
sce->val3 = 1000; // Next Shield
} else
status_change_end(bl,SC_MILLENNIUMSHIELD,INVALID_TIMER); // All shields down
@@ -2932,9 +2931,9 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
rnd()%100 < sce->val3)
status->heal(src, damage*sce->val4/100, 0, 3);
- if( sd && (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON
+ if( (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON
&& rnd()%100 < sce->val2 && sc->fv_counter <= sce->val3 )
- clif->millenniumshield(sd, sc->fv_counter++);
+ clif->millenniumshield(bl, sc->fv_counter++);
if (sc->data[SC_STYLE_CHANGE] && rnd()%2) {
TBL_HOM *hd = BL_CAST(BL_HOM,bl);