diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-25 21:35:38 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-25 21:35:38 +0000 |
commit | 683822cc659024af2d5050e81e02622e0eb01884 (patch) | |
tree | 2474a20771e2b97a1f86bd126122c5bd960b1556 /src/map/pc.c | |
parent | 7d65a46135c8b8536f48f58ff2a0a26fd40932b6 (diff) | |
download | hercules-683822cc659024af2d5050e81e02622e0eb01884.tar.gz hercules-683822cc659024af2d5050e81e02622e0eb01884.tar.bz2 hercules-683822cc659024af2d5050e81e02622e0eb01884.tar.xz hercules-683822cc659024af2d5050e81e02622e0eb01884.zip |
- Cleaned up some more the event dequeue code, it will no longer clear out the npc_id if there's no events waiting to be executed (why does it clears the npc_id anyway?)
- Because of possible conflicts with this change and the on-login script, now the on-login script is executed when the player has finished loading into their start-up map rather than as soon as receiving the registry variables from the char-server.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9073 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index c3e68a807..663667207 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -861,8 +861,6 @@ int pc_reg_received(struct map_session_data *sd) sd->state.event_joblvup = 1; sd->state.event_loadmap = 1; } - - npc_script_event(sd, NPCE_LOGIN); return 0; } @@ -6131,7 +6129,7 @@ int pc_setregistry_str(struct map_session_data *sd,char *reg,char *val,int type) * イベントタイマ??理 *------------------------------------------ */ -int pc_eventtimer(int tid,unsigned int tick,int id,int data) +static int pc_eventtimer(int tid,unsigned int tick,int id,int data) { struct map_session_data *sd=map_id2sd(id); char *p = (char *)data; @@ -6142,9 +6140,9 @@ int pc_eventtimer(int tid,unsigned int tick,int id,int data) for(i=0;i < MAX_EVENTTIMER && sd->eventtimer[i]!=tid; i++); if(i < MAX_EVENTTIMER){ + sd->eventcount--; sd->eventtimer[i]=-1; npc_event(sd,p,0); - sd->eventcount--; } else if(battle_config.error_log) ShowError("pc_eventtimer: no such event timer\n"); @@ -6173,7 +6171,7 @@ int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name) pc_eventtimer,sd->bl.id,(int)evname); sd->eventcount++; - return 0; + return 1; } /*========================================== @@ -6197,7 +6195,7 @@ int pc_deleventtimer(struct map_session_data *sd,const char *name) sd->eventtimer[i]=-1; sd->eventcount--; aFree(p); - break; + return 1; } } |