summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2020-07-13 23:11:15 +0000
committergumi <git@gumi.ca>2020-07-13 23:11:15 +0000
commitb483a1380df50dafb647b0250d2406657a71aa09 (patch)
treeeb12773b5be6f0090757f9ee6d3f6be09414d2ab
parent858de334b4e9dd4d81b7f78aeadd195ecf9ca342 (diff)
downloadevol-hercules-b483a1380df50dafb647b0250d2406657a71aa09.tar.gz
evol-hercules-b483a1380df50dafb647b0250d2406657a71aa09.tar.bz2
evol-hercules-b483a1380df50dafb647b0250d2406657a71aa09.tar.xz
evol-hercules-b483a1380df50dafb647b0250d2406657a71aa09.zip
fix the hooks for npc->unload and mob->spawn_dataset, remove the unused hook for status->change_end_
-rw-r--r--src/emap/init.c1
-rw-r--r--src/emap/mob.c3
-rw-r--r--src/emap/mob.h3
-rw-r--r--src/emap/npc.c3
-rw-r--r--src/emap/npc.h3
-rw-r--r--src/emap/status.c20
-rw-r--r--src/emap/status.h5
7 files changed, 8 insertions, 30 deletions
diff --git a/src/emap/init.c b/src/emap/init.c
index 2151121..dc2976c 100644
--- a/src/emap/init.c
+++ b/src/emap/init.c
@@ -375,7 +375,6 @@ HPExport void plugin_init (void)
addHookPost(status, calc_def, estatus_calc_def_post);
addHookPost(status, calc_fix_aspd, estatus_calc_fix_aspd_post);
addHookPost(status, change_start, estatus_change_start_post);
- addHookPost(status, change_end_, estatus_change_end__post);
addHookPost(map, addflooritem, emap_addflooritem_post);
addHookPost(mob, read_db_mode_sub, emob_read_db_mode_sub_post);
addHookPost(mob, spawn_dataset, emob_spawn_dataset_post);
diff --git a/src/emap/mob.c b/src/emap/mob.c
index fbc75b6..e4adec5 100644
--- a/src/emap/mob.c
+++ b/src/emap/mob.c
@@ -294,7 +294,8 @@ uint32 emob_read_db_mode_sub_post(uint32 retVal,
}
struct mob_data *emob_spawn_dataset_post(struct mob_data *retVal,
- struct spawn_data *data __attribute__ ((unused)))
+ struct spawn_data *data __attribute__ ((unused)),
+ int npc_id __attribute__ ((unused)))
{
if (retVal)
{
diff --git a/src/emap/mob.h b/src/emap/mob.h
index ea0013c..0a76fff 100644
--- a/src/emap/mob.h
+++ b/src/emap/mob.h
@@ -16,7 +16,8 @@ uint32 emob_read_db_mode_sub_post(uint32 retVal,
struct mob_db *entry,
struct config_setting_t *t);
struct mob_data *emob_spawn_dataset_post(struct mob_data *retVal,
- struct spawn_data *data);
+ struct spawn_data *data,
+ int npc_id);
int emob_dead_pre(struct mob_data **mdPtr,
struct block_list **srcPtr,
int *typePtr);
diff --git a/src/emap/npc.c b/src/emap/npc.c
index 5b6d66a..cf7d72c 100644
--- a/src/emap/npc.c
+++ b/src/emap/npc.c
@@ -272,7 +272,8 @@ int enpc_get_var_num(const TBL_NPC *const npc,
}
int enpc_unload_pre(struct npc_data** ndPtr,
- bool *singlePtr __attribute__ ((unused)))
+ bool *singlePtr __attribute__ ((unused)),
+ bool *unloadMobsPtr __attribute__ ((unused)))
{
struct npc_data *nd = *ndPtr;
nullpo_ret(nd);
diff --git a/src/emap/npc.h b/src/emap/npc.h
index ea6c77f..7e6289e 100644
--- a/src/emap/npc.h
+++ b/src/emap/npc.h
@@ -32,6 +32,7 @@ int enpc_get_var_num(const TBL_NPC *const npc,
const char *var);
int enpc_unload_pre(struct npc_data** ndPtr,
- bool *singlePtr);
+ bool *singlePtr,
+ bool *unloadMobsPtr);
#endif // EVOL_MAP_NPC
diff --git a/src/emap/status.c b/src/emap/status.c
index 88f96f9..a9bbdf5 100644
--- a/src/emap/status.c
+++ b/src/emap/status.c
@@ -214,26 +214,6 @@ int estatus_change_start_post(int retVal,
return retVal;
}
-int estatus_change_end__post(int retVal,
- struct block_list* bl __attribute__ ((unused)),
- enum sc_type type __attribute__ ((unused)),
- int tid __attribute__ ((unused)),
- const char* file __attribute__ ((unused)),
- int line __attribute__ ((unused)))
-{
- if (!retVal)
- return retVal;
-
-/*
- switch ((esc_type)type)
- {
- default:
- break;
- }
-*/
- return retVal;
-}
-
void estatus_calc_pc_recover_hp_pre(struct map_session_data **sdPtr __attribute__ ((unused)),
struct status_data **bstatusPtr)
{
diff --git a/src/emap/status.h b/src/emap/status.h
index 4fa5a34..f76c607 100644
--- a/src/emap/status.h
+++ b/src/emap/status.h
@@ -37,11 +37,6 @@ int estatus_change_start_post(int retVal,
int rate, int val1, int val2,
int val3, int val4, int tick, int flag);
-int estatus_change_end__post(int retVal,
- struct block_list* bl,
- enum sc_type type, int tid,
- const char* file, int line);
-
void estatus_calc_pc_recover_hp_pre(struct map_session_data **sdPtr,
struct status_data **bstatusPtr);