summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-09-14 22:17:34 -0300
committerJesusaves <cpntb1@ymail.com>2019-09-14 22:17:34 -0300
commitc6cb659fb409a8079c986e9099a8f8f312a02249 (patch)
treec62058b429eb1d93a90240ea7b3f51e7d494813a /src
parentfc236458d578be63c6fda0e59428f098a01e9a88 (diff)
downloadevol-hercules-c6cb659fb409a8079c986e9099a8f8f312a02249.tar.gz
evol-hercules-c6cb659fb409a8079c986e9099a8f8f312a02249.tar.bz2
evol-hercules-c6cb659fb409a8079c986e9099a8f8f312a02249.tar.xz
evol-hercules-c6cb659fb409a8079c986e9099a8f8f312a02249.zip
Fix remaining bugs but one
../../src/emap/status.c: In function 'estatus_calc_homunculus_postHook': ../../../common/HPMi.h:115:78: error: invalid type argument of '->' (have 'struct map_session_data') define getFromMSD(ptr,classid) (HPMi->getFromHPData(HPDT_MSD,HPMi->pid,(ptr)->hdata,(classid))) ^ ../../src/emap/status.c:307:15: note: in expansion of macro 'getFromMSD' if ((hdatk = getFromMSD(*sd,0)) != NULL) { ^~~~~~~~~~
Diffstat (limited to 'src')
-rw-r--r--src/emap/pc.c6
-rw-r--r--src/emap/pc.h4
-rw-r--r--src/emap/status.c10
-rw-r--r--src/emap/status.h2
4 files changed, 14 insertions, 8 deletions
diff --git a/src/emap/pc.c b/src/emap/pc.c
index b2acafe..4e50781 100644
--- a/src/emap/pc.c
+++ b/src/emap/pc.c
@@ -36,13 +36,11 @@
#include "emap/struct/mapdext.h"
#include "emap/struct/sessionext.h"
+#include "common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
+
int langScriptId;
int mountScriptId;
-int bHomunculusAtk = -1;
-int bHomunculusDef = -1;
-int bHomunculusMaxHP = -1;
-
int64 epc_readparam_pre(const TBL_PC **sdPtr,
int *type)
{
diff --git a/src/emap/pc.h b/src/emap/pc.h
index 8f55af7..3c3b8ea 100644
--- a/src/emap/pc.h
+++ b/src/emap/pc.h
@@ -9,6 +9,10 @@ enum VarConst
Const_ClientVersion = 10000
};
+int bHomunculusAtk = -1;
+int bHomunculusDef = -1;
+int bHomunculusMaxHP = -1;
+
struct s_homunculus_atk {
int rate;
};
diff --git a/src/emap/status.c b/src/emap/status.c
index a76d296..16f552c 100644
--- a/src/emap/status.c
+++ b/src/emap/status.c
@@ -14,6 +14,7 @@
#include "common/socket.h"
#include "common/strlib.h"
#include "common/utils.h"
+#include "map/homunculus.h"
#include "map/itemdb.h"
#include "map/map.h"
#include "map/npc.h"
@@ -28,6 +29,7 @@
#include "emap/effects.h"
#include "emap/horse.h"
#include "emap/skill_const.h"
+#include "emap/pc.h"
#include "emap/status.h"
#include "emap/data/itemd.h"
#include "emap/data/npcd.h"
@@ -37,6 +39,8 @@
#include "emap/enum/esctype.h"
#include "emap/enum/esitype.h"
+#include "common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
+
int class_move_speed[CLASS_COUNT];
void eInitChangeTables(void)
@@ -301,15 +305,15 @@ int estatus_calc_homunculus_postHook(int retVal, struct homun_data *hd, enum e_s
const struct s_homunculus_maxhp *hdmaxhp;
if ((hdatk = getFromMSD(*sd,0)) != NULL) {
- hd->battle_status->rhw.atk+=hdatk->rate;
+ hd->battle_status.rhw.atk+=hdatk->rate;
}
if ((hddef = getFromMSD(*sd,0)) != NULL) {
- hd->battle_status->def+=hddef->rate;
+ hd->battle_status.def+=hddef->rate;
}
if ((hdmaxhp = getFromMSD(*sd,0)) != NULL) {
- hd->battle_status->max_hp+=hdmaxhp->rate;
+ hd->battle_status.max_hp+=hdmaxhp->rate;
}
// We're done
diff --git a/src/emap/status.h b/src/emap/status.h
index 63e0a42..ff69bf3 100644
--- a/src/emap/status.h
+++ b/src/emap/status.h
@@ -50,6 +50,6 @@ int estatus_calc_pc_preHook(struct map_session_data **sd,
int estatus_calc_homunculus_postHook(int retVal,
struct homun_data *hd,
- enum e_status_calc_opt opt)
+ enum e_status_calc_opt opt);
#endif // EVOL_MAP_STATUS