Scripts/Misc: Cherry-pick cleanups

This commit is contained in:
Shauren
2026-06-30 20:25:29 +02:00
parent c5a71e4796
commit d56e65b4a2
8 changed files with 18 additions and 25 deletions
@@ -166,7 +166,7 @@ struct npc_core_rager : public ScriptedAI
{
if (me->HealthBelowPctDamaged(50, damage))
{
_scheduler.Schedule(0s, [this](TaskContext /*task*/)
_scheduler.Schedule(0s, [this](TaskContext const& /*task*/)
{
DoCastSelf(SPELL_FULL_HEAL);
});
@@ -162,7 +162,7 @@ struct boss_ragnaros : public BossAI
_deadSonsOfFlameCount = 0;
me->SetStandState(UNIT_STAND_STATE_STAND);
me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
me->SetUninteractible(false);
me->SetReactState(REACT_AGGRESSIVE);
}
@@ -298,7 +298,7 @@ struct boss_ragnaros : public BossAI
DoCastSelf(SPELL_SUBMERGE_VISUAL);
DoCastSelf(SPELL_SUBMERGE_EFFECT);
me->SetStandState(UNIT_STAND_STATE_SUBMERGED);
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
me->SetUninteractible(true);
me->SetReactState(REACT_PASSIVE);
Talk(!_hasSubmergedOnce ? SAY_REINFORCEMENTS_1 : SAY_REINFORCEMENTS_2);
@@ -316,7 +316,7 @@ struct boss_ragnaros : public BossAI
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_VISUAL);
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_EFFECT);
me->SetStandState(UNIT_STAND_STATE_STAND);
me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
me->SetUninteractible(false);
me->SetReactState(REACT_AGGRESSIVE);
_isSubmerged = false;
@@ -61,7 +61,7 @@ struct boss_landslide : public BossAI
{
_landslide = true;
scheduler.Schedule(0s, [this](TaskContext task)
scheduler.Schedule(0s, [this](TaskContext& task)
{
DoCastSelf(SPELL_LANDSLIDE);
task.Repeat(30s, 40s);
@@ -26,7 +26,6 @@ static constexpr ObjectData creatureData[] =
{ BOSS_TAAHBAT, DATA_TAAHBAT },
{ BOSS_AWAZJ, DATA_AWAZJ },
{ BOSS_SOUL_SCRIBE, DATA_SOUL_SCRIBE },
{ 0, 0 } // END
};
static constexpr DungeonEncounterData encounters[] =
@@ -130,7 +130,7 @@ struct ControllerBaseAI : public BossAI
_Reset();
OtherFeignsDeath = false;
IsAboutToFeignDeath = false;
me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
me->SetUninteractible(false);
me->SetReactState(REACT_AGGRESSIVE);
}
}
@@ -174,7 +174,7 @@ struct ControllerBaseAI : public BossAI
case ACTION_CLEANUP_AND_DIE:
summons.DespawnAll();
DoCastSelf(SPELL_QUIET_SUICIDE, true);
me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
me->SetUninteractible(false);
break;
default:
break;
@@ -210,7 +210,7 @@ struct ControllerBaseAI : public BossAI
Talk(SAY_DIED_FIRST);
DoCastSelf(OtherBossData == DATA_DALRONN ? SPELL_SUMMON_SKARVALD_GHOST : SPELL_SUMMON_DALRONN_GHOST, true);
DoCastSelf(SPELL_PERMANENT_FEIGN_DEATH);
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
me->SetUninteractible(true);
me->SetReactState(REACT_PASSIVE);
break;
default:
@@ -63,8 +63,7 @@ enum Misc
static constexpr ObjectData creatureData[] =
{
{ NPC_LADY_VASHJ, BOSS_LADY_VASHJ },
{ 0, 0 } // END
{ NPC_LADY_VASHJ, BOSS_LADY_VASHJ }
};
static constexpr ObjectData gameObjectData[] =
@@ -75,8 +74,7 @@ static constexpr ObjectData gameObjectData[] =
{ GO_SHIELD_GENERATOR_1, DATA_SHIELD_GENERATOR_1 },
{ GO_SHIELD_GENERATOR_2, DATA_SHIELD_GENERATOR_2 },
{ GO_SHIELD_GENERATOR_3, DATA_SHIELD_GENERATOR_3 },
{ GO_SHIELD_GENERATOR_4, DATA_SHIELD_GENERATOR_4 },
{ 0, 0 } //END
{ GO_SHIELD_GENERATOR_4, DATA_SHIELD_GENERATOR_4 }
};
static constexpr DungeonEncounterData encounters[] =
@@ -714,7 +714,7 @@ struct boss_kaelthas : public BossAI
case EVENT_TRANSITION_2:
me->SetFacingTo(3.176499128341674804f);
Talk(SAY_PHASE_5_NUTS);
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
me->SetUninteractible(true);
specialEvents.ScheduleEvent(EVENT_TRANSITION_3, 2s);
break;
case EVENT_TRANSITION_3:
@@ -797,7 +797,7 @@ struct boss_kaelthas : public BossAI
me->SetHover(false);
me->RemoveAurasDueToSpell(SPELL_KAEL_FULL_POWER);
me->SetReactState(REACT_AGGRESSIVE);
me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
me->SetUninteractible(false);
ScheduleCombatEventsForStage(COMBAT_STAGE_PHASE_5_INITIAL);
break;
@@ -872,7 +872,7 @@ struct boss_kaelthas : public BossAI
// Phase 1
case EVENT_START_ENCOUNTER_1:
Talk(SAY_INTRO);
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
me->SetUninteractible(true);
events.ScheduleEvent(EVENT_START_ENCOUNTER_2, 25s);
break;
case EVENT_START_ENCOUNTER_2:
@@ -930,7 +930,7 @@ struct boss_kaelthas : public BossAI
_phase = PHASE_4_ENGAGED;
me->RemoveAurasDueToSpell(SPELL_ROOT_SELF);
me->RemoveAurasDueToSpell(SPELL_PACIFY_SELF);
me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
me->SetUninteractible(false);
me->SetReactState(REACT_AGGRESSIVE);
Talk(SAY_PHASE_4_INTRO_2);
ResetThreatList();
@@ -1067,7 +1067,7 @@ struct AdvisorBaseAI : public ScriptedAI
DoCastSelf(SPELL_PERMANENT_FEIGN_DEATH);
DoInformController();
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
me->SetUninteractible(true);
me->SetReactState(REACT_PASSIVE);
});
}
@@ -1088,7 +1088,7 @@ struct AdvisorBaseAI : public ScriptedAI
task.Repeat(2500ms);
break;
case 1:
me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
me->SetUninteractible(false);
me->SetReactState(REACT_AGGRESSIVE);
ResetThreatList();
ScheduleEvents();
@@ -1439,7 +1439,7 @@ struct npc_phoenix_the_eye : public ScriptedAI
DoCastSelf(SPELL_EMBER_BLAST);
DoCastSelf(SPELL_SUMMON_PHOENIX_EGG);
me->SetReactState(REACT_PASSIVE);
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
me->SetUninteractible(true);
me->SetStandState(UNIT_STAND_STATE_DEAD);
_scheduler.Schedule(15s, [this](TaskContext& task)
@@ -1461,7 +1461,7 @@ struct npc_phoenix_the_eye : public ScriptedAI
_isDepleted = false;
DoCastSelf(SPELL_FULL_HEAL);
DoCastSelf(SPELL_BURN_PERIODIC);
me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
me->SetUninteractible(false);
task.Repeat(2s);
break;
case 3:
-4
View File
@@ -4242,8 +4242,6 @@ enum ThrallmarAndHonorHoldFavor
// 32098 - Honor Hold's Favor
class spell_item_thrallmar_and_honor_hold_favor : public AuraScript
{
PrepareAuraScript(spell_item_thrallmar_and_honor_hold_favor);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_BUFFBOT_BUFF_EFFECT });
@@ -4274,8 +4272,6 @@ enum DarkmoonCardIllusion
// 57350 - Illusionary Barrier
class spell_item_darkmoon_card_illusion : public AuraScript
{
PrepareAuraScript(spell_item_darkmoon_card_illusion);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_DARKMOON_CARD_ILLUSION });