fix(CORE/Raid): Molten Core - Ragnaros hammer orientation (#1683)
* Fixed Ragnaros hammer when he dies * Removed useless comments
This commit is contained in:
@@ -76,7 +76,7 @@ class boss_ragnaros : public CreatureScript
|
|||||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset()
|
void Reset() override
|
||||||
{
|
{
|
||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
_emergeTimer = 90000;
|
_emergeTimer = 90000;
|
||||||
@@ -84,10 +84,12 @@ class boss_ragnaros : public CreatureScript
|
|||||||
_hasSubmergedOnce = false;
|
_hasSubmergedOnce = false;
|
||||||
_isBanished = false;
|
_isBanished = false;
|
||||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
|
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
|
||||||
me->SetOrientation(0.8f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* victim)
|
// Make Sulfuras fall in his correct position
|
||||||
|
void JustDied(Unit* /*killer*/) override { me->SetFacingTo(DEATH_ORIENTATION); }
|
||||||
|
|
||||||
|
void EnterCombat(Unit* victim) override
|
||||||
{
|
{
|
||||||
BossAI::EnterCombat(victim);
|
BossAI::EnterCombat(victim);
|
||||||
events.ScheduleEvent(EVENT_ERUPTION, 15000);
|
events.ScheduleEvent(EVENT_ERUPTION, 15000);
|
||||||
@@ -99,19 +101,19 @@ class boss_ragnaros : public CreatureScript
|
|||||||
events.ScheduleEvent(EVENT_SUBMERGE, 180000);
|
events.ScheduleEvent(EVENT_SUBMERGE, 180000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/)
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (urand(0, 99) < 25)
|
if (urand(0, 99) < 25)
|
||||||
Talk(SAY_KILL);
|
Talk(SAY_KILL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttackStart(Unit* target)
|
void AttackStart(Unit* target) override
|
||||||
{
|
{
|
||||||
if (target && me->Attack(target, true))
|
if (target && me->Attack(target, true))
|
||||||
DoStartNoMovement(target);
|
DoStartNoMovement(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 diff)
|
void UpdateAI(uint32 diff) override
|
||||||
{
|
{
|
||||||
if (_introState != 2)
|
if (_introState != 2)
|
||||||
{
|
{
|
||||||
@@ -169,18 +171,14 @@ class boss_ragnaros : public CreatureScript
|
|||||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||||
AttackStart(target);
|
AttackStart(target);
|
||||||
instance->SetData(DATA_RAGNAROS_ADDS, 0);
|
instance->SetData(DATA_RAGNAROS_ADDS, 0);
|
||||||
|
|
||||||
//DoCast(me, SPELL_RAGEMERGE); //"phase spells" didnt worked correctly so Ive commented them and wrote solution witch doesnt need core support
|
|
||||||
_isBanished = false;
|
_isBanished = false;
|
||||||
}
|
}
|
||||||
else if (_isBanished)
|
else if (_isBanished)
|
||||||
{
|
{
|
||||||
_emergeTimer -= diff;
|
_emergeTimer -= diff;
|
||||||
//Do nothing while banished
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Return since we have no target
|
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -220,7 +218,6 @@ class boss_ragnaros : public CreatureScript
|
|||||||
DoCastVictim(SPELL_MAGMA_BLAST);
|
DoCastVictim(SPELL_MAGMA_BLAST);
|
||||||
if (!_hasYelledMagmaBurst)
|
if (!_hasYelledMagmaBurst)
|
||||||
{
|
{
|
||||||
//Say our dialog
|
|
||||||
Talk(SAY_MAGMABURST);
|
Talk(SAY_MAGMABURST);
|
||||||
_hasYelledMagmaBurst = true;
|
_hasYelledMagmaBurst = true;
|
||||||
}
|
}
|
||||||
@@ -231,15 +228,11 @@ class boss_ragnaros : public CreatureScript
|
|||||||
{
|
{
|
||||||
if (!_isBanished)
|
if (!_isBanished)
|
||||||
{
|
{
|
||||||
//Creature spawning and ragnaros becomming unattackable
|
// TODO: There is a spell to summon him
|
||||||
//is not very well supported in the core //no it really isnt
|
|
||||||
//so added normaly spawning and banish workaround and attack again after 90 secs.
|
|
||||||
me->AttackStop();
|
me->AttackStop();
|
||||||
DoResetThreat();
|
DoResetThreat();
|
||||||
me->SetReactState(REACT_PASSIVE);
|
me->SetReactState(REACT_PASSIVE);
|
||||||
me->InterruptNonMeleeSpells(false);
|
me->InterruptNonMeleeSpells(false);
|
||||||
//Root self
|
|
||||||
//DoCast(me, 23973);
|
|
||||||
me->setFaction(35);
|
me->setFaction(35);
|
||||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED);
|
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED);
|
||||||
@@ -258,7 +251,6 @@ class boss_ragnaros : public CreatureScript
|
|||||||
|
|
||||||
_hasSubmergedOnce = true;
|
_hasSubmergedOnce = true;
|
||||||
_isBanished = true;
|
_isBanished = true;
|
||||||
//DoCast(me, SPELL_RAGSUBMERGE);
|
|
||||||
_emergeTimer = 90000;
|
_emergeTimer = 90000;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -272,7 +264,6 @@ class boss_ragnaros : public CreatureScript
|
|||||||
summoned->AI()->AttackStart(target);
|
summoned->AI()->AttackStart(target);
|
||||||
|
|
||||||
_isBanished = true;
|
_isBanished = true;
|
||||||
//DoCast(me, SPELL_RAGSUBMERGE);
|
|
||||||
_emergeTimer = 90000;
|
_emergeTimer = 90000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -289,6 +280,7 @@ class boss_ragnaros : public CreatureScript
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
float const DEATH_ORIENTATION = 4.0f;
|
||||||
uint32 _emergeTimer;
|
uint32 _emergeTimer;
|
||||||
uint8 _introState;
|
uint8 _introState;
|
||||||
bool _hasYelledMagmaBurst;
|
bool _hasYelledMagmaBurst;
|
||||||
@@ -307,19 +299,16 @@ class npc_son_of_flame : public CreatureScript
|
|||||||
public:
|
public:
|
||||||
npc_son_of_flame() : CreatureScript("npc_SonOfFlame") { }
|
npc_son_of_flame() : CreatureScript("npc_SonOfFlame") { }
|
||||||
|
|
||||||
struct npc_son_of_flameAI : public ScriptedAI //didnt work correctly in EAI for me...
|
struct npc_son_of_flameAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
npc_son_of_flameAI(Creature* creature) : ScriptedAI(creature)
|
npc_son_of_flameAI(Creature* creature) : ScriptedAI(creature)
|
||||||
{
|
{
|
||||||
instance = me->GetInstanceScript();
|
instance = me->GetInstanceScript();
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* /*killer*/)
|
void JustDied(Unit* /*killer*/) override { instance->SetData(DATA_RAGNAROS_ADDS, 1); }
|
||||||
{
|
|
||||||
instance->SetData(DATA_RAGNAROS_ADDS, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateAI(uint32 /*diff*/)
|
void UpdateAI(uint32 /*diff*/) override
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user