summaryrefslogtreecommitdiff
path: root/src/map
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 /src/map
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
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c15
1 files changed, 8 insertions, 7 deletions
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;
}