summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-22 10:01:13 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-22 10:01:13 +0000
commit6a2a8a7d451f394b132383b20e499985d026aaae (patch)
treeb7ba6c56985fee723f214dc68a30c12473204acb /src/map/pc.c
parente18d01b53500c4d4744cfe31cacaed56f414f0da (diff)
downloadhercules-6a2a8a7d451f394b132383b20e499985d026aaae.tar.gz
hercules-6a2a8a7d451f394b132383b20e499985d026aaae.tar.bz2
hercules-6a2a8a7d451f394b132383b20e499985d026aaae.tar.xz
hercules-6a2a8a7d451f394b132383b20e499985d026aaae.zip
* Check if the player has been authentified by the char server before clearing any timers in map_quit
* Added eventtimercount and timerskill_count * Added sc_count check in skill_stop_dancing git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@723 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 076d72c18..4e429f378 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -785,6 +785,7 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
sd->spirit_timer[i] = -1;
for(i = 0; i < MAX_SKILLTIMERSKILL; i++)
sd->skilltimerskill[i].timer = -1;
+ sd->timerskill_count=0;
memset(&sd->dev,0,sizeof(struct square));
for(i = 0; i < 5; i++) {
@@ -837,6 +838,7 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
memset(sd->eventqueue, 0, sizeof(sd->eventqueue));
for(i = 0; i < MAX_EVENTTIMER; i++)
sd->eventtimer[i] = -1;
+ sd->eventcount=0;
// 位置の設定
if (pc_setpos(sd,sd->status.last_point.map, sd->status.last_point.x, sd->status.last_point.y, 0) != 0) {
@@ -6746,6 +6748,7 @@ int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name)
memcpy(evname,name,24);
sd->eventtimer[i]=add_timer(gettick()+tick,
pc_eventtimer,sd->bl.id,(int)evname);
+ sd->eventcount++;
}
return 0;
@@ -6761,11 +6764,15 @@ int pc_deleventtimer(struct map_session_data *sd,const char *name)
nullpo_retr(0, sd);
+ if (sd->eventcount <= 0)
+ return 0;
+
for(i=0;i<MAX_EVENTTIMER;i++)
if( sd->eventtimer[i]!=-1 && strcmp(
(char *)(get_timer(sd->eventtimer[i])->data), name)==0 ){
delete_timer(sd->eventtimer[i],pc_eventtimer);
sd->eventtimer[i]=-1;
+ sd->eventcount--;
break;
}
@@ -6802,6 +6809,9 @@ int pc_cleareventtimer(struct map_session_data *sd)
nullpo_retr(0, sd);
+ if (sd->eventcount <= 0)
+ return 0;
+
for(i=0;i<MAX_EVENTTIMER;i++)
if( sd->eventtimer[i]!=-1 ){
delete_timer(sd->eventtimer[i],pc_eventtimer);