summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorshinomori <shinomori@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-15 09:44:00 +0000
committershinomori <shinomori@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-15 09:44:00 +0000
commitc73cd00ae16ee8235f7e2929dfafabdeacbc4745 (patch)
tree8fbd9121a79731793c2ed2245abdfebd3e9b6c61 /src/map/pc.c
parent09af9729fa04300ecb6c98e95962afa22a5c96b3 (diff)
downloadhercules-c73cd00ae16ee8235f7e2929dfafabdeacbc4745.tar.gz
hercules-c73cd00ae16ee8235f7e2929dfafabdeacbc4745.tar.bz2
hercules-c73cd00ae16ee8235f7e2929dfafabdeacbc4745.tar.xz
hercules-c73cd00ae16ee8235f7e2929dfafabdeacbc4745.zip
fixed the spiritball timer list [Shinomori]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1109 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 8fb4188f8..80d15187d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -183,7 +183,9 @@ static int pc_spiritball_timer(int tid,unsigned int tick,int id,int data) {
}
sd->spiritball--;
- memcpy( &sd->spirit_timer[0], &sd->spirit_timer[1], sizeof(sd->spirit_timer[0]) * sd->spiritball );
+ // I leave this here as bad example [Shinomori]
+ //memcpy( &sd->spirit_timer[0], &sd->spirit_timer[1], sizeof(sd->spirit_timer[0]) * sd->spiritball );
+ memmove( sd->spirit_timer+0, sd->spirit_timer+1, (sd->spiritball)*sizeof(int) );
sd->spirit_timer[sd->spiritball]=-1;
clif_spiritball(sd);
@@ -202,7 +204,10 @@ int pc_addspiritball(struct map_session_data *sd,int interval,int max) {
if(sd->spiritball >= max) {
if(sd->spirit_timer[0] != -1)
delete_timer(sd->spirit_timer[0],pc_spiritball_timer);
- memcpy( &sd->spirit_timer[0], &sd->spirit_timer[1], sizeof(sd->spirit_timer[0]) * (sd->spiritball - 1));
+ // I leave this here as bad example [Shinomori]
+ //memcpy( &sd->spirit_timer[0], &sd->spirit_timer[1], sizeof(sd->spirit_timer[0]) * (sd->spiritball - 1));
+ memmove( sd->spirit_timer+0, sd->spirit_timer+1, (sd->spiritball - 1)*sizeof(int) );
+ //sd->spirit_timer[sd->spiritball-1] = -1; // intentionally, but will be overwritten
} else
sd->spiritball++;
@@ -3007,14 +3012,14 @@ static int pc_walk(int tid,unsigned int tick,int id,int data)
sd->inchealspiritsptick = 0;
sd->walkpath.path_half ^= 1;
- if(sd->walkpath.path_half==0){ // マス目中心へ途
+ if(sd->walkpath.path_half==0){ // マス目中心へ途
sd->walkpath.path_pos++;
if(sd->state.change_walk_target){
pc_walktoxy_sub(sd);
return 0;
}
- } else { // マス目境界へ途
+ } else { // マス目境界へ途
if(sd->walkpath.path[sd->walkpath.path_pos]>=8)
return 1;