summaryrefslogtreecommitdiff
path: root/src/map/pc.h
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2014-12-26 07:28:10 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2014-12-26 07:28:10 +0800
commit6dd08befa6064a652d0d98e7cb85f0e353992dd5 (patch)
tree1eba127574e172fc6802572d0be413887e0ced0d /src/map/pc.h
parentdfdbc6e81eb37c2b23d5dcbcf0f94e4a9d0de2a7 (diff)
downloadhercules-6dd08befa6064a652d0d98e7cb85f0e353992dd5.tar.gz
hercules-6dd08befa6064a652d0d98e7cb85f0e353992dd5.tar.bz2
hercules-6dd08befa6064a652d0d98e7cb85f0e353992dd5.tar.xz
hercules-6dd08befa6064a652d0d98e7cb85f0e353992dd5.zip
Updated KG/OB Spirit Charms to official behavior
-http://hercules.ws/board/tracker/issue-8170-oborokagerou-charm/ -http://hercules.ws/board/tracker/issue-8274-ninja-charms-not-giving-proper-bonuses/ Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map/pc.h')
-rw-r--r--src/map/pc.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/map/pc.h b/src/map/pc.h
index 0adb25a7b..28e6e4007 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -31,6 +31,15 @@
#define MAX_PC_FEELHATE 3
#define PVP_CALCRANK_INTERVAL 1000 // PVP calculation interval
+#define RESET_SPIRITS(target) do { \
+ if ( target ) { \
+ if ( target->spiritball ) \
+ pc->delspiritball(target, target->spiritball, 0); \
+ for ( int c = SPIRITS_TYPE_CHARM_WATER; c < SPIRITS_TYPE_SPHERE; c++ ) \
+ pc->del_charm(target, target->spiritcharm[c], c); \
+ } \
+}while ( 0 )
+
//Equip indexes constants. (eg: sd->equip_index[EQI_AMMO] returns the index
//where the arrows are equipped)
enum equip_index {
@@ -366,8 +375,8 @@ 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_SPIRITBALL];
- short charm[ELE_POISON+1]; // There are actually 5 charm Fire, Ice, Wind, Earth & Poison maybe because its color violet.
- int charm_timer[ELE_POISON+1][10];
+ short spiritcharm[SPIRITS_TYPE_SPHERE];
+ int charm_timer[SPIRITS_TYPE_SPHERE][MAX_SPIRITCHARM];
unsigned char potion_success_counter; //Potion successes in row counter
unsigned char mission_count; //Stores the bounty kill count for TK_MISSION
short mission_mobid; //Stores the target mob_id for TK_MISSION