浏览代码

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://svn.code.sf.net/p/rathena/svn/trunk@17064 54d463be-8e91-2dee-dedb-b68131a5f0ec

rud0lp20 12 年之前
父节点
当前提交
882ca9d44d
共有 3 个文件被更改,包括 15 次插入12 次删除
  1. 3 3
      conf/battle/skill.conf
  2. 4 4
      src/map/battle.c
  3. 8 5
      src/map/status.c

+ 3 - 3
conf/battle/skill.conf

@@ -158,10 +158,10 @@ chat_warpportal: no
 
 // What should the wizard's "Sense" skill display on the defense fields?
 // 0: Do not show defense
-// 1: Base defense
+// 1: Base defense [RE default]
 // 2: Vit/Int defense
-// 3: Both (the addition of both) [default]
-sense_type: 3
+// 3: Both (the addition of both) 
+sense_type: 1
 
 // Which finger offensive style will be used?
 // 0 = Aegis style (single multi-hit attack)

+ 4 - 4
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;

+ 8 - 5
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:
 			{