From 70265291d62280c525adc317158e9f531e0147ff Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 17 Sep 2015 01:21:28 +0200 Subject: Cleanup of the HPluginData implementation (First part) - Several explicit casts are removed, to have a slightly better type-checking at compile time. - A destructor function is provided, to remove code duplication. Signed-off-by: Haru --- src/map/mob.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/map/mob.h') diff --git a/src/map/mob.h b/src/map/mob.h index 4b8a054b5..1142502f4 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -11,6 +11,8 @@ #include "common/hercules.h" #include "common/mmo.h" // struct item +struct hplugin_data_store; + #define MAX_RANDOMMONSTER 5 // Change this to increase the table size in your mob_db to accommodate a larger mob database. @@ -140,8 +142,7 @@ struct mob_db { struct spawn_info spawn[10]; /* HPM Custom Struct */ - struct HPluginData **hdata; - unsigned int hdatac; + struct hplugin_data_store *hdata; }; struct mob_data { @@ -210,12 +211,10 @@ struct mob_data { int tomb_nid; /* HPM Custom Struct */ - struct HPluginData **hdata; - unsigned int hdatac; + struct hplugin_data_store *hdata; }; - enum { MST_TARGET = 0, MST_RANDOM, //Random Target! -- cgit v1.2.3-60-g2f50