mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Scripts/Instances: Fix a bug that would cause the Hodir encounter to never properly begin. Tagging issue #17302.
This commit is contained in:
2
sql/updates/world/3.3.5/2016_06_07_00_world.sql
Normal file
2
sql/updates/world/3.3.5/2016_06_07_00_world.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- remove incorrect trigger flag from hodir ice blocks that prevents encounter from starting
|
||||
UPDATE `creature_template` SET `flags_extra`=(`flags_extra`&~128) WHERE `entry` IN (32938,33353);
|
||||
@@ -32,6 +32,7 @@ enum Say
|
||||
|
||||
enum Spells
|
||||
{
|
||||
// @todo orb uses the wrong spell, this needs sniffs
|
||||
SPELL_MINDCONTROL = 42013,
|
||||
SPELL_CHANNEL = 45537,
|
||||
SPELL_EGG_DESTROY = 19873,
|
||||
@@ -103,7 +104,7 @@ public:
|
||||
|
||||
secondPhase = true;
|
||||
me->RemoveAllAuras();
|
||||
me->SetHealth(me->GetMaxHealth());
|
||||
me->SetFullHealth();
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
@@ -114,6 +115,7 @@ public:
|
||||
|
||||
void DamageTaken(Unit* /*who*/, uint32& damage) override
|
||||
{
|
||||
// @todo this is wrong - razorgore should still take damage, he should just nuke the whole room and respawn if he dies during P1
|
||||
if (!secondPhase)
|
||||
damage = 0;
|
||||
}
|
||||
@@ -146,6 +148,7 @@ public:
|
||||
break;
|
||||
case EVENT_CONFLAGRATION:
|
||||
DoCastVictim(SPELL_CONFLAGRATION);
|
||||
// @todo is this even necessary? pretty sure AI ignores targets with disorient by default
|
||||
if (me->GetVictim() && me->EnsureVictim()->HasAura(SPELL_CONFLAGRATION))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
me->TauntApply(target);
|
||||
@@ -175,10 +178,10 @@ public:
|
||||
{
|
||||
if (InstanceScript* instance = go->GetInstanceScript())
|
||||
if (instance->GetData(DATA_EGG_EVENT) != DONE)
|
||||
if (Creature* razor = instance->GetCreature(DATA_RAZORGORE_THE_UNTAMED))
|
||||
if (Creature* razorgore = instance->GetCreature(DATA_RAZORGORE_THE_UNTAMED))
|
||||
{
|
||||
razor->Attack(player, true);
|
||||
player->CastSpell(razor, SPELL_MINDCONTROL);
|
||||
razorgore->Attack(player, true);
|
||||
player->CastSpell(razorgore, SPELL_MINDCONTROL);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
Destroying of Toasty Fires
|
||||
*/
|
||||
|
||||
/* @todo Hodir aggro behavior is wonky. He gets set to _PASSIVE, but never to _AGGRESSIVE unless you kill an ice block which doesn't spawn unless you have*/
|
||||
|
||||
enum HodirYells
|
||||
{
|
||||
SAY_AGGRO = 0,
|
||||
@@ -375,7 +377,7 @@ class boss_hodir : public CreatureScript
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*who*/, uint32& damage) override
|
||||
void DamageTaken(Unit* who, uint32& damage) override
|
||||
{
|
||||
if (damage >= me->GetHealth())
|
||||
{
|
||||
@@ -403,6 +405,12 @@ class boss_hodir : public CreatureScript
|
||||
|
||||
_JustDied();
|
||||
}
|
||||
else if (!me->IsInCombat())
|
||||
{
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->AI()->DoZoneInCombat();
|
||||
me->AI()->AttackStart(who);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
Reference in New Issue
Block a user