summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-11 23:24:26 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-11 23:24:26 +0000
commitcfe7a018ed95f18c8523ed8ba66764800d21a146 (patch)
tree445236b8b7fa8da8adb3b42c480c0e2cc5e5abd0
parentf4a4fa0c1dce4a905b777f599297d97816e7fad5 (diff)
downloadhercules-cfe7a018ed95f18c8523ed8ba66764800d21a146.tar.gz
hercules-cfe7a018ed95f18c8523ed8ba66764800d21a146.tar.bz2
hercules-cfe7a018ed95f18c8523ed8ba66764800d21a146.tar.xz
hercules-cfe7a018ed95f18c8523ed8ba66764800d21a146.zip
- Fixed GTB card only working while you had a status-change active.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7623 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/battle.c15
2 files changed, 10 insertions, 7 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 5f355a99b..a964394bd 100644
--- a/Changelog-Trunk.txt
+++ b/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
diff --git a/src/map/battle.c b/src/map/battle.c
index 5b5889284..c74179db2 100644
--- a/src/map/battle.c
+++ b/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;
}