summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-13 07:37:59 -0300
committershennetsind <ind@henn.et>2013-06-13 07:37:59 -0300
commit4b713e7e3eac34339285125d194ae4ff4627fc2a (patch)
tree294c6ae1f6e593fb3d82cc11778c319450e181cb /src/map/status.c
parenta6cb1ff637e5952322b5f29534a65f3f0db77e13 (diff)
downloadhercules-4b713e7e3eac34339285125d194ae4ff4627fc2a.tar.gz
hercules-4b713e7e3eac34339285125d194ae4ff4627fc2a.tar.bz2
hercules-4b713e7e3eac34339285125d194ae4ff4627fc2a.tar.xz
hercules-4b713e7e3eac34339285125d194ae4ff4627fc2a.zip
Fixed pre-re build warning
Special Thanks to ossi0110 Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c33
1 files changed, 7 insertions, 26 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 096e673c2..57858a493 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -4913,14 +4913,10 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def
return (defType)cap_value(def,DEFTYPE_MIN,DEFTYPE_MAX);
}
-signed short status_calc_def2(struct block_list *bl, struct status_change *sc, int def2, bool viewable)
+defType status_calc_def2(struct block_list *bl, struct status_change *sc, int def2, bool viewable)
{
if(!sc || !sc->count)
-#ifdef RENEWAL
- return (short)cap_value(def2,SHRT_MIN,SHRT_MAX);
-#else
- return (short)cap_value(def2,1,SHRT_MAX);
-#endif
+ return (defType)cap_value(def2,DEFTYPE_MIN,DEFTYPE_MAX);
if( !viewable ){
/* some statuses that are hidden in the status window */
@@ -4980,11 +4976,7 @@ signed short status_calc_def2(struct block_list *bl, struct status_change *sc, i
if (sc->data[SC_NEEDLE_OF_PARALYZE])
def2 -= def2 * sc->data[SC_NEEDLE_OF_PARALYZE]->val2 / 100;
-#ifdef RENEWAL
- return (short)cap_value(def2,SHRT_MIN,SHRT_MAX);
-#else
- return (short)cap_value(def2,1,SHRT_MAX);
-#endif
+ return (defType)cap_value(def2,DEFTYPE_MIN,DEFTYPE_MAX);
}
@@ -5036,24 +5028,17 @@ defType status_calc_mdef(struct block_list *bl, struct status_change *sc, int md
return (defType)cap_value(mdef,DEFTYPE_MIN,DEFTYPE_MAX);
}
-signed short status_calc_mdef2(struct block_list *bl, struct status_change *sc, int mdef2, bool viewable)
-{
+defType status_calc_mdef2(struct block_list *bl, struct status_change *sc, int mdef2, bool viewable) {
if(!sc || !sc->count)
-#ifdef RENEWAL
- return (short)cap_value(mdef2,SHRT_MIN,SHRT_MAX);
-#else
- return (short)cap_value(mdef2,1,SHRT_MAX);
-#endif
+ return (defType)cap_value(mdef2,DEFTYPE_MIN,DEFTYPE_MAX);
if( !viewable ){
/* some statuses that are hidden in the status window */
#ifdef RENEWAL
if(sc && sc->data[SC_ASSUMPTIO])
mdef2 <<= 1;
- return (short)cap_value(mdef2,SHRT_MIN,SHRT_MAX);
-#else
- return (short)cap_value(mdef2,1,SHRT_MAX);
#endif
+ return (defType)cap_value(mdef2,DEFTYPE_MIN,DEFTYPE_MAX);
}
if (sc->data[SC_BERSERK] || sc->data[SC__BLOODYLUST])
@@ -5065,11 +5050,7 @@ signed short status_calc_mdef2(struct block_list *bl, struct status_change *sc,
if(sc->data[SC_ANALYZE])
mdef2 -= mdef2 * ( 14 * sc->data[SC_ANALYZE]->val1 ) / 100;
-#ifdef RENEWAL
- return (short)cap_value(mdef2,SHRT_MIN,SHRT_MAX);
-#else
- return (short)cap_value(mdef2,1,SHRT_MAX);
-#endif
+ return (defType)cap_value(mdef2,DEFTYPE_MIN,DEFTYPE_MAX);
}
static unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc, int speed)