diff options
author | shennetsind <ind@henn.et> | 2013-05-15 19:29:07 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-05-15 19:29:07 -0300 |
commit | 92412472c78d431a4d77637f43dd28365d849d42 (patch) | |
tree | f9ddd468f56e2e39a4995f30153b423f79e9ca0e /src/map | |
parent | 07272f7a16db87970583286db03167ca79604a69 (diff) | |
download | hercules-92412472c78d431a4d77637f43dd28365d849d42.tar.gz hercules-92412472c78d431a4d77637f43dd28365d849d42.tar.bz2 hercules-92412472c78d431a4d77637f43dd28365d849d42.tar.xz hercules-92412472c78d431a4d77637f43dd28365d849d42.zip |
Fixed Bug #7243
http://hercules.ws/board/tracker/issue-7243-raising-dragon-sphere-count/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/pc.c | 15 | ||||
-rw-r--r-- | src/map/pc.h | 2 |
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]; |