summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-30 07:13:29 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-30 07:13:29 +0000
commita31cce3c60cc170db0d4a8ff707626e8777b0801 (patch)
tree2be623075db810596f0f1716c5513e356c08f3b1 /src/map
parenta337fe03f0d79b3f091ccbb4c1e6d10212910615 (diff)
downloadhercules-a31cce3c60cc170db0d4a8ff707626e8777b0801.tar.gz
hercules-a31cce3c60cc170db0d4a8ff707626e8777b0801.tar.bz2
hercules-a31cce3c60cc170db0d4a8ff707626e8777b0801.tar.xz
hercules-a31cce3c60cc170db0d4a8ff707626e8777b0801.zip
Follow up r17062 where ignore def is not working properly.XD
Fixed bugreport:6408 where casting WL_WHITEIMPRISON caster is not attach to trigger autoloot and events. Update WZ_ESTIMATION settings to RE default. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17064 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c8
-rw-r--r--src/map/status.c13
2 files changed, 12 insertions, 9 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index aab2ad3eb..f80148d57 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3214,11 +3214,11 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
flag.pdef ?(def1+vit_def):0,
flag.pdef2?(def1+vit_def):0
);
- if (!flag.idef || !flag.idef2){
+ if( !flag.idef )
wd.damage = wd.damage * (4000+def1) / (4000+10*def1) - vit_def;
- if(flag.lh)
- wd.damage2 = wd.damage2 * (4000+def1) / (4000+10*def1) - vit_def;
- }
+ if( flag.lh && !flag.idef2 )
+ wd.damage2 = wd.damage2 * (4000+def1) / (4000+10*def1) - vit_def;
+
#else
if (def1 > 100) def1 = 100;
diff --git a/src/map/status.c b/src/map/status.c
index 659fcff2d..adad3f98e 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -8633,11 +8633,12 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
if (sd && pc_issit(sd)) //Avoid sprite sync problems.
pc_setstand(sd);
case SC_TRICKDEAD:
- unit_stop_attack(bl);
status_change_end(bl, SC_DANCING, INVALID_TIMER);
// Cancel cast when get status [LuzZza]
if (battle_config.sc_castcancel&bl->type)
unit_skillcastcancel(bl, 0);
+ case SC_WHITEIMPRISON:
+ unit_stop_attack(bl);
case SC_STOP:
case SC_CONFUSION:
case SC_CLOSECONFINE:
@@ -8649,7 +8650,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_THORNSTRAP:
case SC__MANHOLE:
case SC_CRYSTALIZE:
- case SC_WHITEIMPRISON:
case SC_CURSEDCIRCLE_ATKER:
case SC_CURSEDCIRCLE_TARGET:
case SC_FEAR:
@@ -9476,9 +9476,12 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
sc_start(bl,SC_HALLUCINATIONWALK_POSTDELAY,100,sce->val1,skill_get_time2(GC_HALLUCINATIONWALK,sce->val1));
break;
case SC_WHITEIMPRISON:
- if( tid == -1 )
- break; // Terminated by Damage
- status_fix_damage(bl,bl,400*sce->val1,clif_damage(bl,bl,gettick(),0,0,400*sce->val1,0,0,0));
+ {
+ struct block_list* src = map_id2bl(sce->val2);
+ if( tid == -1 || !src)
+ break; // Terminated by Damage
+ status_fix_damage(src,bl,400*sce->val1,clif_damage(bl,bl,gettick(),0,0,400*sce->val1,0,0,0));
+ }
break;
case SC_WUGDASH:
{