summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/map.h3
-rw-r--r--src/map/pc.h4
-rw-r--r--src/map/skill.c6
-rw-r--r--src/map/status.c3
4 files changed, 10 insertions, 6 deletions
diff --git a/src/map/map.h b/src/map/map.h
index 1374c61fe..9a5fa8ba3 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -301,7 +301,8 @@ enum {
SPIRITS_TYPE_CHARM_LAND,
SPIRITS_TYPE_CHARM_FIRE,
SPIRITS_TYPE_CHARM_WIND,
- SPIRITS_TYPE_SPHERE
+ SPIRITS_TYPE_SPHERE,
+ SPIRITS_TYPE_END
};
enum auto_trigger_flag {
diff --git a/src/map/pc.h b/src/map/pc.h
index 641a8ee7c..8472eb34e 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -366,8 +366,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 spiritcharm[SPIRITS_TYPE_SPHERE];
- int charm_timer[SPIRITS_TYPE_SPHERE][MAX_SPIRITCHARM];
+ short spiritcharm[SPIRITS_TYPE_END];
+ int charm_timer[SPIRITS_TYPE_END][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
diff --git a/src/map/skill.c b/src/map/skill.c
index e70625866..ebcb31680 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6041,6 +6041,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case MO_ABSORBSPIRITS:
{
int sp = 0;
+ int i;
if ( dstsd && dstsd->spiritball
&& (sd == dstsd || map_flag_vs(src->m) || (sd->duel_group && sd->duel_group == dstsd->duel_group))
&& ((dstsd->class_&MAPID_BASEMASK) != MAPID_GUNSLINGER || (dstsd->class_&MAPID_UPPERMASK) != MAPID_REBELLION)
@@ -6054,7 +6055,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
mob->target(dstmd,src,0);
}
if ( dstsd ) {
- for ( int i = SPIRITS_TYPE_CHARM_WATER; i < SPIRITS_TYPE_SPHERE; i++ )
+ for (i = SPIRITS_TYPE_CHARM_WATER; i < SPIRITS_TYPE_SPHERE; i++)
pc->del_charm(dstsd, dstsd->spiritcharm[i], i);
}
if (sp) status->heal(src, 0, sp, 3);
@@ -8922,7 +8923,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
status_percent_heal(src, 0, sp);
}
if ( dstsd ) {
- for ( int i = SPIRITS_TYPE_CHARM_WATER; i < SPIRITS_TYPE_SPHERE; i++ )
+ int i;
+ for (i = SPIRITS_TYPE_CHARM_WATER; i < SPIRITS_TYPE_SPHERE; i++)
pc->del_charm(dstsd, dstsd->spiritcharm[i], i);
}
clif->skill_nodamage(src, bl, skill_id, skill_lv, sp ? 1:0);
diff --git a/src/map/status.c b/src/map/status.c
index 3c2aeb939..d3fa25aaa 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -8636,8 +8636,9 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC__ENERVATION:
val2 = 20 + 10 * val1; // ATK Reduction
if ( sd ) {
+ int i;
pc->delspiritball(sd, sd->spiritball, 0);
- for ( int i = SPIRITS_TYPE_CHARM_WATER; i < SPIRITS_TYPE_SPHERE; i++ )
+ for (i = SPIRITS_TYPE_CHARM_WATER; i < SPIRITS_TYPE_SPHERE; i++)
pc->del_charm(sd, sd->spiritcharm[i], i);
}
break;