From 78d148b352731f8af910251e3700d3eaa9d59cf7 Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Mon, 9 Apr 2007 13:03:34 +0000 Subject: * Changed db key from 'unsigned char*' to 'const char*'. * Defined out the dump function in util.h/c. Notes: saw some suspicious code in npc.c so kept the 'const char*' propagation to a minimum for now git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10193 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/npc.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/map/npc.c') diff --git a/src/map/npc.c b/src/map/npc.c index 941eec4c8..bf10e6230 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1,12 +1,6 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#include -#include -#include -#include -#include - #include "../common/cbasetypes.h" #include "../common/timer.h" #include "../common/nullpo.h" @@ -17,7 +11,6 @@ #include "../common/db.h" #include "map.h" #include "log.h" -#include "npc.h" #include "clif.h" #include "intif.h" #include "pc.h" @@ -29,11 +22,18 @@ #include "battle.h" #include "skill.h" #include "unit.h" +#include "npc.h" + +#include +#include +#include +#include +#include + struct npc_src_list { struct npc_src_list * next; -// struct npc_src_list * prev; //[Shinomori] char name[4]; }; @@ -67,7 +67,7 @@ static struct { //Holds pointers to the commonly executed scripts for speedup. [Skotlex] struct npc_data *nd; struct event_data *event[UCHAR_MAX]; - unsigned char *event_name[UCHAR_MAX]; + const char *event_name[UCHAR_MAX]; unsigned char event_count; } script_event[NPCE_MAX]; @@ -320,7 +320,7 @@ int npc_event_sub(struct map_session_data *, struct event_data *, const unsigned */ int npc_event_doall_sub(DBKey key,void *data,va_list ap) { - unsigned char*p = key.str; + const char*p = key.str; struct event_data *ev; int *c; int rid; @@ -362,7 +362,7 @@ int npc_event_doall_id(const unsigned char *name, int rid) int npc_event_do_sub(DBKey key,void *data,va_list ap) { - unsigned char *p = key.str; + const char *p = key.str; struct event_data *ev; int *c; const unsigned char *name; @@ -511,7 +511,7 @@ int npc_cleareventtimer(struct npc_data *nd) int npc_do_ontimer_sub(DBKey key,void *data,va_list ap) { - unsigned char *p = key.str; + const char *p = key.str; struct event_data *ev = (struct event_data *)data; int *c = va_arg(ap,int *); // struct map_session_data *sd=va_arg(ap,struct map_session_data *); @@ -2900,10 +2900,10 @@ int npc_script_event(TBL_PC* sd, int type) { static int npc_read_event_script_sub(DBKey key,void *data,va_list ap) { - unsigned char *p = key.str; + const char *p = key.str; unsigned char *name = va_arg(ap,unsigned char *); struct event_data **event_buf = va_arg(ap,struct event_data**); - unsigned char **event_name = va_arg(ap,unsigned char **); + const char **event_name = va_arg(ap,const char **); unsigned char *count = va_arg(ap,char *);; if (*count >= UCHAR_MAX) return 0; -- cgit v1.2.3-60-g2f50