summaryrefslogtreecommitdiff
path: root/src/emap/itemdb.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-02 19:06:39 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-02 19:06:39 +0300
commit1fc6228436311da0d70f14176fe47f3e37f6faa6 (patch)
tree9434c90ab44ac55200daa199f524fa11f3168678 /src/emap/itemdb.c
parent00d1b8bf9fc3648730904b6f86696417f4445037 (diff)
downloadplugin-1fc6228436311da0d70f14176fe47f3e37f6faa6.tar.gz
plugin-1fc6228436311da0d70f14176fe47f3e37f6faa6.tar.bz2
plugin-1fc6228436311da0d70f14176fe47f3e37f6faa6.tar.xz
plugin-1fc6228436311da0d70f14176fe47f3e37f6faa6.zip
Update function hook prototypes for support new hercules.
Diffstat (limited to 'src/emap/itemdb.c')
-rw-r--r--src/emap/itemdb.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/emap/itemdb.c b/src/emap/itemdb.c
index 0a36a21..0c2ca9d 100644
--- a/src/emap/itemdb.c
+++ b/src/emap/itemdb.c
@@ -24,19 +24,22 @@
#include "emap/struct/itemdext.h"
#include "emap/npc.h"
-bool eitemdb_is_item_usable(struct item_data *item)
+bool eitemdb_is_item_usable_pre(struct item_data **itemPtr)
{
+ struct item_data *item = *itemPtr;
hookStop();
if (!item)
return false;
return item->type == IT_HEALING || item->type == IT_USABLE || item->type == IT_CASH || item->type == IT_PETEGG;
}
-void eitemdb_readdb_additional_fields(int *itemid,
- struct config_setting_t *it,
- int *n __attribute__ ((unused)),
- const char *source)
+void eitemdb_readdb_additional_fields_pre(int *itemid,
+ struct config_setting_t **itPtr,
+ int *n __attribute__ ((unused)),
+ const char **sourcePtr)
{
+ struct config_setting_t *it = *itPtr;
+ const char *source = *sourcePtr;
struct item_data *item = itemdb->exists(*itemid);
int i32 = 0;
const char *str = NULL;
@@ -161,9 +164,10 @@ void eitemdb_readdb_additional_fields(int *itemid,
hookStop();
}
-void edestroy_item_data(struct item_data* self,
- int *free_selfPtr __attribute__ ((unused)))
+void edestroy_item_data_pre(struct item_data **selfPtr,
+ int *free_selfPtr __attribute__ ((unused)))
{
+ struct item_data *self = *selfPtr;
struct ItemdExt *data = itemd_get(self);
if (!data)
return;