summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-05 13:57:07 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-05 13:57:07 +0000
commit9dc87bf9db25237ae4d904f92311352e6171d372 (patch)
treefe58100dd34d6ee12120f5a2d165b84cdb5a3ab2 /src/map/npc.c
parent0782cabc543c151f724f38f5132ab948f6346af4 (diff)
downloadhercules-9dc87bf9db25237ae4d904f92311352e6171d372.tar.gz
hercules-9dc87bf9db25237ae4d904f92311352e6171d372.tar.bz2
hercules-9dc87bf9db25237ae4d904f92311352e6171d372.tar.xz
hercules-9dc87bf9db25237ae4d904f92311352e6171d372.zip
- imported the latest working grfio code from stable
- re-added usage of managed allocation routines in grfio - eol-styled some new files - some cosmetic fixes here and there git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10468 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 97034402e..49cb4f1a0 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2930,7 +2930,6 @@ static int npc_read_event_script_sub(DBKey key,void *data,va_list ap)
void npc_read_event_script(void)
{
int i;
- unsigned char buf[64]="::";
struct {
char *name;
char *event_name;
@@ -2946,15 +2945,14 @@ void npc_read_event_script(void)
};
for (i = 0; i < NPCE_MAX; i++) {
- if (script_event[i].nd)
- script_event[i].nd = NULL;
- if (script_event[i].event_count)
- script_event[i].event_count = 0;
+ script_event[i].nd = NULL;
+ script_event[i].event_count = 0;
if (!script_config.event_script_type) {
//Use a single NPC as event source.
script_event[i].nd = npc_name2id(config[i].event_name);
} else {
//Use an array of Events
+ char buf[64]="::";
strncpy(buf+2,config[i].event_name,62);
ev_db->foreach(ev_db,npc_read_event_script_sub,buf,
&script_event[i].event,