Scripts/Instances: More #16346 follow-ups. Fixed this time: Halls of Reflection, Ignis the Furnace Master, Mimiron and Rend Blackhand.

(cherry picked from commit 27a3eaab334176af6714f98c2eeb27d93334d226)

Scripts/MoltenCore: Fix Ragnaros (#16346 follow-up).
(cherry picked from commit 83e5df563876e037ecc35d5cb5c4e6d3a9ab2355)

Scripts/BlackrockMountain: Nefarian. (#16346 f-u)
(cherry picked from commit 650d7ab596bf956d146a147fdc938d3c6bdae022)
This commit is contained in:
treeston
2017-01-12 00:28:10 +01:00
committed by joschiwald
parent cd7e2aabb5
commit 5e99388981
6 changed files with 13 additions and 4 deletions
@@ -187,6 +187,12 @@ public:
events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand(17000, 19000));
}
void IsSummonedBy(Unit* /*summoner*/) override
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
DoZoneInCombat();
}
void JustDied(Unit* /*killer*/) override
{
_JustDied();
@@ -208,6 +208,7 @@ public:
me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
DoCast(me, SPELL_NEFARIANS_BARRIER);
me->SetStandState(UNIT_STAND_STATE_STAND);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
AttackStart(target);
events.ScheduleEvent(EVENT_SHADOW_BOLT, urand(3000, 10000));
events.ScheduleEvent(EVENT_FEAR, urand(10000, 20000));
@@ -159,7 +159,7 @@ class boss_ragnaros : public CreatureScript
break;
case EVENT_INTRO_5:
me->SetReactState(REACT_AGGRESSIVE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
_introState = 2;
break;
default:
@@ -1921,6 +1921,7 @@ class npc_frostsworn_general : public CreatureScript
{
if (Creature* reflection = me->SummonCreature(NPC_REFLECTION, *target, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000))
{
reflection->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
target->CastSpell(reflection, SPELL_CLONE, true);
target->CastSpell(reflection, SPELL_GHOST_VISUAL, true);
reflection->AI()->AttackStart(target);
@@ -2155,6 +2156,7 @@ struct npc_escape_event_trash : public ScriptedAI
DoZoneInCombat(me, 0.0f);
if (Creature* leader = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_ESCAPE_LEADER)))
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetInCombatWith(leader);
leader->SetInCombatWith(me);
me->AddThreat(leader, 0.0f);
@@ -178,7 +178,7 @@ class boss_ignis : public CreatureScript
{
summon->setFaction(16);
summon->SetReactState(REACT_AGGRESSIVE);
summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED | UNIT_FLAG_STUNNED | UNIT_FLAG_REMOVE_CLIENT_CONTROL);
summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED | UNIT_FLAG_STUNNED | UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_IMMUNE_TO_PC);
}
summon->AI()->AttackStart(me->GetVictim());
@@ -972,7 +972,7 @@ class boss_vx_001 : public CreatureScript
events.ScheduleEvent(EVENT_FLAME_SUPPRESSANT_VX, 6000);
// Missing break intended.
case DO_START_VX001:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC);
me->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); // Remove emotestate.
//me->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER); Blizzard handles hover animation like this it seems.
@@ -1145,7 +1145,7 @@ class boss_aerial_command_unit : public CreatureScript
events.ScheduleEvent(EVENT_SUMMON_FIRE_BOTS, 1000, 0, PHASE_AERIAL_COMMAND_UNIT);
// Missing break intended.
case DO_START_AERIAL:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC);
me->SetReactState(REACT_AGGRESSIVE);
events.SetPhase(PHASE_AERIAL_COMMAND_UNIT);