diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/map.h | 3 | ||||
-rw-r--r-- | src/map/pc.h | 4 | ||||
-rw-r--r-- | src/map/skill.c | 6 | ||||
-rw-r--r-- | src/map/status.c | 3 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 8 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 2 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 14 |
7 files changed, 22 insertions, 18 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; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 88f2a4575..034b14b79 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -829,8 +829,8 @@ struct { struct HPMHookPoint *HP_clif_specialeffect_value_post; struct HPMHookPoint *HP_clif_millenniumshield_pre; struct HPMHookPoint *HP_clif_millenniumshield_post; - struct HPMHookPoint *HP_clif_charm_pre; - struct HPMHookPoint *HP_clif_charm_post; + struct HPMHookPoint *HP_clif_spiritcharm_pre; + struct HPMHookPoint *HP_clif_spiritcharm_post; struct HPMHookPoint *HP_clif_charm_single_pre; struct HPMHookPoint *HP_clif_charm_single_post; struct HPMHookPoint *HP_clif_snap_pre; @@ -5912,8 +5912,8 @@ struct { int HP_clif_specialeffect_value_post; int HP_clif_millenniumshield_pre; int HP_clif_millenniumshield_post; - int HP_clif_charm_pre; - int HP_clif_charm_post; + int HP_clif_spiritcharm_pre; + int HP_clif_spiritcharm_post; int HP_clif_charm_single_pre; int HP_clif_charm_single_post; int HP_clif_snap_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index aca88dbaf..21f48134c 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -424,7 +424,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->specialeffect_single, HP_clif_specialeffect_single) }, { HP_POP(clif->specialeffect_value, HP_clif_specialeffect_value) }, { HP_POP(clif->millenniumshield, HP_clif_millenniumshield) }, - { HP_POP(clif->spiritcharm, HP_clif_charm) }, + { HP_POP(clif->spiritcharm, HP_clif_spiritcharm) }, { HP_POP(clif->charm_single, HP_clif_charm_single) }, { HP_POP(clif->snap, HP_clif_snap) }, { HP_POP(clif->weather_check, HP_clif_weather_check) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index c2e0f4a2f..9078efe2e 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -11012,13 +11012,13 @@ void HP_clif_millenniumshield(struct block_list *bl, short shields) { } return; } -void HP_clif_charm(struct map_session_data *sd, short type) { +void HP_clif_spiritcharm(struct map_session_data *sd, short type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_charm_pre ) { + if( HPMHooks.count.HP_clif_spiritcharm_pre ) { void (*preHookFunc) (struct map_session_data *sd, short *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_charm_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritcharm_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_spiritcharm_pre[hIndex].func; preHookFunc(sd, &type); } if( *HPMforce_return ) { @@ -11029,10 +11029,10 @@ void HP_clif_charm(struct map_session_data *sd, short type) { { HPMHooks.source.clif.spiritcharm(sd, type); } - if( HPMHooks.count.HP_clif_charm_post ) { + if( HPMHooks.count.HP_clif_spiritcharm_post ) { void (*postHookFunc) (struct map_session_data *sd, short *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_clif_charm_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritcharm_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_spiritcharm_post[hIndex].func; postHookFunc(sd, &type); } } |