summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-09 01:49:50 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-09 01:49:50 +0000
commite7beef1499ae660af01f163a16b9040bd60d8845 (patch)
treecefcd0a5eff2a2f041ab5e07f6f14cbc8549d567 /src/map/npc.c
parent6f96f2dea64de97bd5a16a146c8ce943b01563de (diff)
downloadhercules-e7beef1499ae660af01f163a16b9040bd60d8845.tar.gz
hercules-e7beef1499ae660af01f163a16b9040bd60d8845.tar.bz2
hercules-e7beef1499ae660af01f163a16b9040bd60d8845.tar.xz
hercules-e7beef1499ae660af01f163a16b9040bd60d8845.zip
- Added info on packet 0x86 (simple move packet). Not usable until a clear separation between entering sight/leaving sight/walking in sight is done.
- Propagating const char* from the script engine. - ".gat" is appended to the map name before sending the changemapserver packet to the client. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9979 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 695037b8d..70fac3c5c 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -914,13 +914,13 @@ int npc_event (struct map_session_data *sd, const unsigned char *eventname, int
int npc_command_sub(DBKey key,void *data,va_list ap)
{
- unsigned char *p = key.str;
+ const char* p = (const char*)key.str;
struct event_data *ev=(struct event_data *)data;
- unsigned char *npcname=va_arg(ap,char *);
- char *command=va_arg(ap,char *);
+ const char* npcname = va_arg(ap, const char*);
+ const char* command = va_arg(ap, const char*);
unsigned char temp[100];
- if(strcmp(ev->nd->name,npcname)==0 && (p=strchr(p,':')) && p && strnicmp("::OnCommand",p,10)==0 ){
+ if(strcmp(ev->nd->name,npcname)==0 && (p=strchr(p,':')) && strnicmp("::OnCommand",p,10)==0 ){
sscanf(&p[11],"%s",temp);
if (strcmp(command,temp)==0)
@@ -930,9 +930,9 @@ int npc_command_sub(DBKey key,void *data,va_list ap)
return 0;
}
-int npc_command(struct map_session_data *sd,const unsigned char *npcname,char *command)
+int npc_command(struct map_session_data* sd, const char* npcname, const char* command)
{
- ev_db->foreach(ev_db,npc_command_sub,npcname,command);
+ ev_db->foreach(ev_db, npc_command_sub, npcname, command);
return 0;
}
@@ -1152,7 +1152,7 @@ TBL_NPC *npc_checknear(struct map_session_data *sd,struct block_list *bl)
* NPCのオープンチャット発言
*------------------------------------------
*/
-int npc_globalmessage(const char *name,char *mes)
+int npc_globalmessage(const char *name,const char *mes)
{
struct npc_data *nd=(struct npc_data *) strdb_get(npcname_db,(unsigned char*)name);
char temp[100];