diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-10 15:25:24 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-10 15:25:24 +0000 |
commit | f4d39edff58dc2a8db9e517a6ffbe738e36b31e9 (patch) | |
tree | 8439f43fc788c0df4fb5b412a7a8cfe828cb9368 /src/map/pc.c | |
parent | 2ef5d159733a6d8ee3fd3ff2d9c887874acc3b5f (diff) | |
download | hercules-f4d39edff58dc2a8db9e517a6ffbe738e36b31e9.tar.gz hercules-f4d39edff58dc2a8db9e517a6ffbe738e36b31e9.tar.bz2 hercules-f4d39edff58dc2a8db9e517a6ffbe738e36b31e9.tar.xz hercules-f4d39edff58dc2a8db9e517a6ffbe738e36b31e9.zip |
* Completed adding packet DB reading
* Added Shinomori's suggestions for npc timers,
* Removed checking for script event timers' length, and added Shinomori's changes
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@947 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 5ff5f06fd..2954dfddf 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6791,14 +6791,12 @@ int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name) nullpo_retr(0, sd); - Assert(strlen(name) < script_config.max_eventtimer_len); - for(i=0;i<MAX_EVENTTIMER;i++) if( sd->eventtimer[i]==-1 ) break; if(i<MAX_EVENTTIMER){ - char *evname=(char *)aCalloc(script_config.max_eventtimer_len,sizeof(char)); - memcpy(evname,name,script_config.max_eventtimer_len); + char *evname=(char *)aMalloc((strlen(name)+1)*sizeof(char)); + memcpy(evname,name,(strlen(name)+1)); sd->eventtimer[i]=add_timer(gettick()+tick, pc_eventtimer,sd->bl.id,(int)evname); sd->eventcount++; |