summaryrefslogtreecommitdiff
path: root/src/map/status.h
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/status.h
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/status.h')
-rw-r--r--src/map/status.h25
1 files changed, 7 insertions, 18 deletions
diff --git a/src/map/status.h b/src/map/status.h
index e46f0b4a0..7ebe9627b 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -1384,13 +1384,12 @@ struct status_data {
short
hit, flee, cri, flee2,
def2, mdef2,
-#if REMODE
- /**
- * In RE def and mdef can go over 127 (signed char) limit, so in RE mode we use short
- **/
- def,mdef,
-#endif
aspd_rate;
+ /**
+ * defType is REMODE dependent and defined in src/map/config/data/const.h
+ **/
+ defType def,mdef;
+
unsigned char
def_ele, ele_lv,
#if REMODE
@@ -1400,13 +1399,7 @@ struct status_data {
wlv,
#endif
size, race;
-#if REMODE == 0
- /**
- * In NON-RE def and mdef are not required to be short, so we keep it signed char (ancient-default)
- **/
- signed char
- def, mdef;
-#endif
+
struct weapon_atk rhw, lhw; //Right Hand/Left Hand Weapon.
};
@@ -1522,11 +1515,7 @@ int status_get_lv(struct block_list *bl);
#define status_get_luk(bl) status_get_status_data(bl)->luk
#define status_get_hit(bl) status_get_status_data(bl)->hit
#define status_get_flee(bl) status_get_status_data(bl)->flee
-#if REMODE
- short status_get_def(struct block_list *bl);
-#else
- signed char status_get_def(struct block_list *bl);
-#endif
+defType status_get_def(struct block_list *bl);
#define status_get_mdef(bl) status_get_status_data(bl)->mdef
#define status_get_flee2(bl) status_get_status_data(bl)->flee2
#define status_get_def2(bl) status_get_status_data(bl)->def2