From 92412472c78d431a4d77637f43dd28365d849d42 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 15 May 2013 19:29:07 -0300 Subject: Fixed Bug #7243 http://hercules.ws/board/tracker/issue-7243-raising-dragon-sphere-count/ Signed-off-by: shennetsind --- src/config/classes/general.h | 10 ++++++++-- src/map/pc.c | 15 +++++++-------- src/map/pc.h | 2 +- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/config/classes/general.h b/src/config/classes/general.h index cab0180d7..206f57b37 100644 --- a/src/config/classes/general.h +++ b/src/config/classes/general.h @@ -1,5 +1,6 @@ -// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena Dev Teams #ifndef _CONFIG_GENERAL_H_ #define _CONFIG_GENERAL_H_ @@ -15,6 +16,11 @@ **/ #define MAGIC_REFLECTION_TYPE 1 +/** + * Spirit Sphere Limitation + **/ +#define MAX_SPIRITBALL 15 + /** * No settings past this point **/ 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;ispirit_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;ispirit_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]; -- cgit v1.2.3-60-g2f50