summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-24 15:31:28 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-24 15:31:28 +0000
commit85fdcfa5c7831dc87a2b6810b3e2ebd5e3ec49c7 (patch)
tree3954f54f4adce21db6566710b1b02555b4d241a3 /src/map/npc.c
parent0e67259ca839671dac06dd804d6867ebe33df74a (diff)
downloadhercules-85fdcfa5c7831dc87a2b6810b3e2ebd5e3ec49c7.tar.gz
hercules-85fdcfa5c7831dc87a2b6810b3e2ebd5e3ec49c7.tar.bz2
hercules-85fdcfa5c7831dc87a2b6810b3e2ebd5e3ec49c7.tar.xz
hercules-85fdcfa5c7831dc87a2b6810b3e2ebd5e3ec49c7.zip
* Added 'map_charid2id'
* Changed monster damage logging to save char ID's * Implemented 'event_script_type' * Set Emsolute Develop as a learnable skill * Updated 'require_glory_guild' * Allow monsters to cast skills near themselves even when monster_nofootset is set to 'yes' * Print number of online users in online.txt/.html even if there's only 1 user git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1282 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c72
1 files changed, 13 insertions, 59 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 0e158bc77..1c5a0c585 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -311,62 +311,6 @@ int npc_event_export(void *key,void *data,va_list ap)
return 0;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/*==========================================
* 全てのNPCのOn*イベント実行
*------------------------------------------
@@ -376,16 +320,17 @@ int npc_event_doall_sub(void *key,void *data,va_list ap)
char *p=(char *)key;
struct event_data *ev;
int *c;
+ int rid;
const char *name;
nullpo_retr(0, ev=(struct event_data *)data);
nullpo_retr(0, ap);
nullpo_retr(0, c=va_arg(ap,int *));
-
name=va_arg(ap,const char *);
+ rid=va_arg(ap, int);
if( (p=strchr(p,':')) && p && strcmpi(name,p)==0 ){
- run_script(ev->nd->u.scr.script,ev->pos,0,ev->nd->bl.id);
+ run_script(ev->nd->u.scr.script,ev->pos,rid,ev->nd->bl.id);
(*c)++;
}
@@ -397,7 +342,16 @@ int npc_event_doall(const char *name)
char buf[64]="::";
strncpy(buf+2,name,62);
- strdb_foreach(ev_db,npc_event_doall_sub,&c,buf);
+ strdb_foreach(ev_db,npc_event_doall_sub,&c,buf,0);
+ return c;
+}
+int npc_event_doall_id(const char *name, int rid)
+{
+ int c=0;
+ char buf[64]="::";
+
+ strncpy(buf+2,name,62);
+ strdb_foreach(ev_db,npc_event_doall_sub,&c,buf,rid);
return c;
}