diff options
author | shennetsind <ind@henn.et> | 2014-02-04 10:44:33 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-02-04 10:44:33 -0200 |
commit | 144a9eba25cd6773cd85e6446f72ca183bc8cc58 (patch) | |
tree | e1afe81de18c14533fea4afb74131d1d799bc2a1 /src/map/skill.c | |
parent | 250ec31ab4af9a3370d4412689802f9c46c45bea (diff) | |
download | hercules-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/skill.c')
-rw-r--r-- | src/map/skill.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 0df90a538..2e520454f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7778,10 +7778,10 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin break; case RK_MILLENNIUMSHIELD: - if( sd ){ + { short shields = (rnd()%100<50) ? 4 : ((rnd()%100<80) ? 3 : 2); sc_start4(bl,type,100,skill_lv,shields,1000,0,skill->get_time(skill_id,skill_lv)); - clif->millenniumshield(sd,shields); + clif->millenniumshield(src,shields); clif->skill_nodamage(src,bl,skill_id,1,1); } break; @@ -7811,12 +7811,10 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin int value = 0; type = SC_NONE; if( skill->area_temp[5]&0x10 ){ - if( dstsd ){ - value = (rnd()%100<50) ? 4 : ((rnd()%100<80) ? 3 : 2); - clif->millenniumshield(dstsd,value); - skill->area_temp[5] &= ~0x10; - type = SC_MILLENNIUMSHIELD; - } + value = (rnd()%100<50) ? 4 : ((rnd()%100<80) ? 3 : 2); + clif->millenniumshield(bl,value); + skill->area_temp[5] &= ~0x10; + type = SC_MILLENNIUMSHIELD; }else if( skill->area_temp[5]&0x20 ){ value = status_get_max_hp(bl) * 25 / 100; status->change_clear_buffs(bl,4); |