summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.c15
-rw-r--r--src/map/pc.h2
2 files changed, 8 insertions, 9 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 50188aeb3..87cb52895 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -180,13 +180,12 @@ int pc_addspiritball(struct map_session_data *sd,int interval,int max)
nullpo_ret(sd);
- if(max > MAX_SKILL_LEVEL)
- max = MAX_SKILL_LEVEL;
+ if(max > MAX_SPIRITBALL)
+ max = MAX_SPIRITBALL;
if(sd->spiritball < 0)
sd->spiritball = 0;
- if( sd->spiritball && sd->spiritball >= max )
- {
+ if( sd->spiritball && sd->spiritball >= max ) {
if(sd->spirit_timer[0] != INVALID_TIMER)
delete_timer(sd->spirit_timer[0],pc_spiritball_timer);
sd->spiritball--;
@@ -225,8 +224,8 @@ int pc_delspiritball(struct map_session_data *sd,int count,int type)
if(count > sd->spiritball)
count = sd->spiritball;
sd->spiritball -= count;
- if(count > MAX_SKILL_LEVEL)
- count = MAX_SKILL_LEVEL;
+ if(count > MAX_SPIRITBALL)
+ count = MAX_SPIRITBALL;
for(i=0;i<count;i++) {
if(sd->spirit_timer[i] != INVALID_TIMER) {
@@ -234,7 +233,7 @@ int pc_delspiritball(struct map_session_data *sd,int count,int type)
sd->spirit_timer[i] = INVALID_TIMER;
}
}
- for(i=count;i<MAX_SKILL_LEVEL;i++) {
+ for(i=count;i<MAX_SPIRITBALL;i++) {
sd->spirit_timer[i-count] = sd->spirit_timer[i];
sd->spirit_timer[i] = INVALID_TIMER;
}
@@ -979,7 +978,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
sd->cansendmail_tick = tick;
sd->hchsysch_tick = tick;
- for(i = 0; i < MAX_SKILL_LEVEL; i++)
+ for(i = 0; i < MAX_SPIRITBALL; i++)
sd->spirit_timer[i] = INVALID_TIMER;
for(i = 0; i < ARRAYLENGTH(sd->autobonus); i++)
sd->autobonus[i].active = INVALID_TIMER;
diff --git a/src/map/pc.h b/src/map/pc.h
index 5eec607db..014f93d99 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -366,7 +366,7 @@ struct map_session_data {
short catch_target_class; // pet catching, stores a pet class to catch (short now) [zzo]
short spiritball, spiritball_old;
- int spirit_timer[MAX_SKILL_LEVEL];
+ int spirit_timer[MAX_SPIRITBALL];
short talisman[ELE_POISON+1]; // There are actually 5 talisman Fire, Ice, Wind, Earth & Poison maybe because its color violet.
int talisman_timer[ELE_POISON+1][10];