summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
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:
{