diff options
author | Haru <haru@dotalux.com> | 2015-12-15 20:12:36 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-12-15 20:21:28 +0100 |
commit | 83ec8701872e38ca2d801ab3812972cc19e8167e (patch) | |
tree | 94d4ae9af7477dfb29572f87e0ccb5d9a65b0254 /src | |
parent | 417a9ab25eb346be8ae383bf521b213e19fe0ac2 (diff) | |
download | hercules-83ec8701872e38ca2d801ab3812972cc19e8167e.tar.gz hercules-83ec8701872e38ca2d801ab3812972cc19e8167e.tar.bz2 hercules-83ec8701872e38ca2d801ab3812972cc19e8167e.tar.xz hercules-83ec8701872e38ca2d801ab3812972cc19e8167e.zip |
Added const qualifier to the w1~w4 arguments of npc_parse_mob
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/map/npc.c | 20 | ||||
-rw-r--r-- | src/map/npc.h | 2 |
2 files changed, 20 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 8bc874615..5a7c46f95 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3645,7 +3645,25 @@ void npc_parse_mob2(struct spawn_data* mobspawn) } } -const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) { +/** + * Parses a mob permanent spawn. + * + * @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_mob(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) +{ int num, class_, m,x,y,xs,ys, i,j; int mob_lv = -1, ai = -1, size = -1; char mapname[32], mobname[NAME_LENGTH]; diff --git a/src/map/npc.h b/src/map/npc.h index 969f77f3d..829b915d7 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -256,7 +256,7 @@ struct npc_interface { int (*do_atcmd_event) (struct map_session_data *sd, const char *command, const char *message, const char *eventname); const char *(*parse_function) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); void (*parse_mob2) (struct spawn_data *mobspawn); - const char* (*parse_mob) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + const char *(*parse_mob) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); const char *(*parse_mapflag) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); void (*parse_unknown_mapflag) (const char *name, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); int (*parsesrcfile) (const char *filepath, bool runOnInit); |