瀏覽代碼

- Fixed GTB card only working while you had a status-change active.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7623 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 年之前
父節點
當前提交
52718a90ec
共有 2 個文件被更改,包括 10 次插入7 次删除
  1. 2 0
      Changelog-Trunk.txt
  2. 8 7
      src/map/battle.c

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/07/11
+	* Fixed GTB card only working while you had a status-change active.
+	  [Skotlex]
 	* Fixed being unable to compound cards in armor. [Skotlex]
 	* Made @monsterignore be an universal ignore. Means you cannot be targetted
 	  as an enemy by anything. Also added alias "@battleignore" which does the

+ 8 - 7
src/map/battle.c

@@ -239,6 +239,14 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
 		md=(struct mob_data *)bl;
 	} else if (bl->type == BL_PC) {
 		sd=(struct map_session_data *)bl;
+		//Special no damage states
+		if(flag&BF_WEAPON && sd->special_state.no_weapon_damage)
+			damage -= damage*sd->special_state.no_weapon_damage/100;
+
+		if(flag&BF_MAGIC && sd->special_state.no_magic_damage)
+			damage -= damage*sd->special_state.no_magic_damage/100;
+
+		if(!damage) return 0;
 	}
 
 	sc = status_get_sc(bl);
@@ -391,13 +399,6 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
 				status_change_end(bl, SC_KYRIE, -1);
 		}
 
-		//Special no damage states
-		if(flag&BF_WEAPON && sd && sd->special_state.no_weapon_damage)
-			damage -= damage*sd->special_state.no_weapon_damage/100;
-
-		if(flag&BF_MAGIC && sd && sd->special_state.no_magic_damage)
-			damage -= damage*sd->special_state.no_magic_damage/100;
-
 		if (!damage) return 0;
 	}