summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-12-15 20:20:12 +0100
committerHaru <haru@dotalux.com>2015-12-15 20:21:28 +0100
commitb6efa351c0a55a2f45ef8724c066f26e1c67a90f (patch)
tree3f4a806852108fd9c94a47158a91d718c975e762 /src/map/npc.c
parent83ec8701872e38ca2d801ab3812972cc19e8167e (diff)
downloadhercules-b6efa351c0a55a2f45ef8724c066f26e1c67a90f.tar.gz
hercules-b6efa351c0a55a2f45ef8724c066f26e1c67a90f.tar.bz2
hercules-b6efa351c0a55a2f45ef8724c066f26e1c67a90f.tar.xz
hercules-b6efa351c0a55a2f45ef8724c066f26e1c67a90f.zip
Added const qualifier to the w1~w4 arguments of npc_parse_unknown_object
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 5a7c46f95..eb0d73ae2 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -4279,7 +4279,24 @@ const char *npc_parse_mapflag(const char *w1, const char *w2, const char *w3, co
return strchr(start,'\n');// continue
}
-const char* npc_parse_unknown_object(char *w1, char *w2, char *w3, char *w4, const char* start, const char* buffer, const char* filepath, int *retval)
+/**
+ * Parses an unknown NPC object. This function may be used as override or hooking point by plugins.
+ *
+ * @param[in] w1 First tab-delimited part of the string to parse.
+ * @param[in] w2 Second tab-delimited part of the string to parse.
+ * @param[in] w3 Third tab-delimited part of the string to parse.
+ * @param[in] w4 Fourth tab-delimited part of the string to parse.
+ * @param[in] start Pointer to the beginning of the string inside buffer.
+ * This must point to the same buffer as `buffer`.
+ * @param[in] buffer Pointer to the buffer containing the script. For
+ * single-line mapflags not inside a script, this may be
+ * an empty (but initialized) single-character buffer.
+ * @param[in] filepath Source file path.
+ * @param[out] retval Pointer to return the success (EXIT_SUCCESS) or failure
+ * (EXIT_FAILURE) status. May be NULL.
+ * @return A pointer to the advanced buffer position.
+ */
+const char *npc_parse_unknown_object(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval)
{
ShowError("npc_parsesrcfile: Unable to parse, probably a missing or extra TAB in file '%s', line '%d'. Skipping line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
start = strchr(start,'\n');// skip and continue