summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-23 05:29:26 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-23 05:29:26 +0000
commit9b68ab5698a641e9ffa8b1f90cd0c5edfa6ce812 (patch)
treedb7eff4a75f7c59ef35bc609306ad5d744475098 /src/map/battle.c
parent317e424ab29a8d670657f639a46ec5519825fde3 (diff)
downloadhercules-9b68ab5698a641e9ffa8b1f90cd0c5edfa6ce812.tar.gz
hercules-9b68ab5698a641e9ffa8b1f90cd0c5edfa6ce812.tar.bz2
hercules-9b68ab5698a641e9ffa8b1f90cd0c5edfa6ce812.tar.xz
hercules-9b68ab5698a641e9ffa8b1f90cd0c5edfa6ce812.zip
Some minor code cleanup (gepard's idea from some time ago)
- Removed a dozen #REMODE checks. - Added a typedef for the def type var git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15776 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 95756c2f7..5addc4955 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2381,11 +2381,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if (!flag.idef || !flag.idef2)
{ //Defense reduction
short vit_def;
-#if REMODE
- short def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
-#else
- signed char def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
-#endif
+ defType def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
short def2 = (short)tstatus->def2;
if( sd )
@@ -3358,11 +3354,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
}
if(!flag.imdef){
-#if REMODE
- short mdef = tstatus->mdef;
-#else
- char mdef = tstatus->mdef;
-#endif
+ defType mdef = tstatus->mdef;
int mdef2= tstatus->mdef2;
if(sd) {
i = sd->ignore_mdef[is_boss(target)?RC_BOSS:RC_NONBOSS];