summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-05-15 19:29:07 -0300
committershennetsind <ind@henn.et>2013-05-15 19:29:07 -0300
commit92412472c78d431a4d77637f43dd28365d849d42 (patch)
treef9ddd468f56e2e39a4995f30153b423f79e9ca0e /src
parent07272f7a16db87970583286db03167ca79604a69 (diff)
downloadhercules-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')
-rw-r--r--src/config/classes/general.h10
-rw-r--r--src/map/pc.c15
-rw-r--r--src/map/pc.h2
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_
@@ -16,6 +17,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;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];