summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-07-27 18:09:01 -0300
committerJesusaves <cpntb1@ymail.com>2024-07-27 18:09:01 -0300
commitfed63bcb154f827a7b9af9532e82158461465a15 (patch)
tree7f52ba0f3b4b1f11929bd889a7c241afc0fd2167
parentda87a8bac8a45c5335628e33f8874e26d4dc0cae (diff)
downloadevol-hercules-fed63bcb154f827a7b9af9532e82158461465a15.tar.gz
evol-hercules-fed63bcb154f827a7b9af9532e82158461465a15.tar.bz2
evol-hercules-fed63bcb154f827a7b9af9532e82158461465a15.tar.xz
evol-hercules-fed63bcb154f827a7b9af9532e82158461465a15.zip
Fix theoretical bug I don't want to concern myself with
-rw-r--r--src/emap/homunculus.c6
-rw-r--r--src/emap/homunculus.h1
-rw-r--r--src/emap/init.c1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/emap/homunculus.c b/src/emap/homunculus.c
index fdf0b9d..cce18cf 100644
--- a/src/emap/homunculus.c
+++ b/src/emap/homunculus.c
@@ -15,6 +15,12 @@
#include "emap/send.h"
+enum homun_type ehomunculus_class2type_pre(int *class_ __attribute__ ((unused)))
+{
+ hookStop();
+ return HT_REG;
+}
+
int ehomunculus_gainexp_pre(struct homun_data **hdPtr,
unsigned int *expPtr)
{
diff --git a/src/emap/homunculus.h b/src/emap/homunculus.h
index 591e612..000b5f0 100644
--- a/src/emap/homunculus.h
+++ b/src/emap/homunculus.h
@@ -4,6 +4,7 @@
#ifndef EVOL_MAP_HOMUNCULUS
#define EVOL_MAP_HOMUNCULUS
+enum homun_type ehomunculus_class2type_pre(int *class_ __attribute__ ((unused)));
int ehomunculus_gainexp_pre(struct homun_data **hdPtr,
unsigned int *expPtr);
diff --git a/src/emap/init.c b/src/emap/init.c
index 9072d1d..9f0a9a0 100644
--- a/src/emap/init.c
+++ b/src/emap/init.c
@@ -388,6 +388,7 @@ HPExport void plugin_init (void)
addHookPre(status, calc_pc_additional, estatus_calc_pc_additional_pre);
addHookPre(status, calc_pc_recover_hp, estatus_calc_pc_recover_hp_pre);
addHookPre(homun, gainexp, ehomunculus_gainexp_pre);
+ addHookPre(homun, class2type, ehomunculus_class2type_pre);
// TMW2 Custom Pre Hooks
//addHookPre(battle, calc_weapon_attack, ebattle_calc_weapon_attack_pre);