瀏覽代碼

* Some minor changes to Sacrifice in battle.c
* Set the Emperium to be immune to Sacrifice
* Set the Emperium to be have max status effects immunity

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1294 54d463be-8e91-2dee-dedb-b68131a5f0ec

celest 20 年之前
父節點
當前提交
6765fd327f
共有 3 個文件被更改,包括 13 次插入4 次删除
  1. 3 0
      Changelog-SVN.txt
  2. 3 1
      src/map/battle.c
  3. 7 3
      src/map/status.c

+ 3 - 0
Changelog-SVN.txt

@@ -1,6 +1,9 @@
 Date	Added
 
 03/25
+	* Some minor changes to Sacrifice in battle.c [celest]
+	* Set the Emperium to be immune to Sacrifice [celest]
+	* Set the Emperium to be have max status effects immunity [celest]
 	* Fixed indoorsrwstable.txt reading even when 'indoors_override_grffile' is
 	  set to 'no' [celest]
 	* Fixed @monsterbig/@monstersmall not working [celest]

+ 3 - 1
src/map/battle.c

@@ -402,7 +402,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
 
 	if(class_ == 1288 || class_ == 1287 || class_ == 1286 || class_ == 1285) {
 //	if(class_ == 1288) {
-		if(class_ == 1288 && (flag&BF_SKILL || skill_num == ASC_BREAKER))
+		if(class_ == 1288 && (flag&BF_SKILL || skill_num == ASC_BREAKER || skill_num == PA_SACRIFICE))
 			damage=0;
 		if(src->type == BL_PC) {
 			struct guild *g=guild_search(((struct map_session_data *)src)->status.guild_id);
@@ -2436,6 +2436,8 @@ static struct Damage battle_calc_pc_weapon_attack(
 			hitrate = 1000000;
 			s_ele = 0;
 			s_ele_ = 0;
+			skill_num = PA_SACRIFICE;
+			//clif_skill_nodamage(src,target,skill_num,skill_lv,1);	// this doesn't show effect either.. hmm =/
 			sc_data[SC_SACRIFICE].val2 --;
 			if (sc_data[SC_SACRIFICE].val2 == 0)
 				status_change_end(src, SC_SACRIFICE,-1);

+ 7 - 3
src/map/status.c

@@ -2978,9 +2978,13 @@ int status_get_sc_def(struct block_list *bl, int type)
 		break;
 	}
 
-	if(bl->type == BL_MOB && sc_def < 50)
-		sc_def = 50;
-	else if(bl->type == BL_PC) {
+	if(bl->type == BL_MOB) {
+		struct mob_data *md = (struct mob_data *)bl;
+		if (md && md->class_ == 1288)
+			return 0;
+		if (sc_def < 50)
+			sc_def = 50;
+	} else if(bl->type == BL_PC) {
 		struct status_change* sc_data = status_get_sc_data(bl);
 		if (sc_data && sc_data[SC_GOSPEL].timer != -1 &&
 			sc_data[SC_GOSPEL].val4 == BCT_PARTY &&