diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-05-02 19:06:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-05-02 19:06:39 +0300 |
commit | 1fc6228436311da0d70f14176fe47f3e37f6faa6 (patch) | |
tree | 9434c90ab44ac55200daa199f524fa11f3168678 /src/emap/npc.c | |
parent | 00d1b8bf9fc3648730904b6f86696417f4445037 (diff) | |
download | evol-hercules-1fc6228436311da0d70f14176fe47f3e37f6faa6.tar.gz evol-hercules-1fc6228436311da0d70f14176fe47f3e37f6faa6.tar.bz2 evol-hercules-1fc6228436311da0d70f14176fe47f3e37f6faa6.tar.xz evol-hercules-1fc6228436311da0d70f14176fe47f3e37f6faa6.zip |
Update function hook prototypes for support new hercules.
Diffstat (limited to 'src/emap/npc.c')
-rw-r--r-- | src/emap/npc.c | 31 |
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(); |