summaryrefslogtreecommitdiff
path: root/src/emap/npc.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/npc.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/npc.c')
-rw-r--r--src/emap/npc.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/emap/npc.c b/src/emap/npc.c
index b7d7b37..3a6f395 100644
--- a/src/emap/npc.c
+++ b/src/emap/npc.c
@@ -24,14 +24,19 @@
#include "emap/struct/npcdext.h"
#include "emap/npc.h"
-void enpc_parse_unknown_mapflag(const char *name,
- const char *w3,
- const char *w4,
- const char* start,
- const char* buffer,
- const char* filepath,
- int *retval)
+void enpc_parse_unknown_mapflag_pre(const char **namePtr,
+ const char **w3Ptr,
+ const char **w4Ptr,
+ const char **startPtr,
+ const char **bufferPtr,
+ const char **filepathPtr,
+ int **retvalPtr)
{
+ const char *name = *namePtr;
+ const char *w3 = *w3Ptr;
+ const char *w4 = *w4Ptr;
+ int *retval = *retvalPtr;
+
if (!strcmpi(w3, "invisible"))
{
int16 m = map->mapname2mapid(name);
@@ -55,16 +60,22 @@ void enpc_parse_unknown_mapflag(const char *name,
}
else
{
- ShowError("npc_parse_mapflag: unrecognized mapflag '%s' in file '%s', line '%d'.\n", w3, filepath, strline(buffer,start-buffer));
+ ShowError("npc_parse_mapflag: unrecognized mapflag '%s' in file '%s', line '%d'.\n",
+ w3,
+ *filepathPtr,
+ strline(*bufferPtr, *startPtr - *bufferPtr));
if (retval)
*retval = EXIT_FAILURE;
}
hookStop();
}
-int enpc_buysellsel(TBL_PC* sd, int *id, int *type)
+int enpc_buysellsel_pre(TBL_PC **sdPtr,
+ int *id,
+ int *type)
{
TBL_NPC *nd;
+ TBL_PC *sd = *sdPtr;
if (!sd)
return 1;
@@ -121,7 +132,7 @@ int enpc_buysellsel(TBL_PC* sd, int *id, int *type)
return 0;
}
-bool enpc_db_checkid(int *idPtr)
+bool enpc_db_checkid_pre(const int *idPtr)
{
const int id = *idPtr;
hookStop();