mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
fix(Core/Spells): Razorgore's Explosion ignores LoS. (#11253)
* fix(Core/Spells): Razorgore's Explosion ignores LoS. Fixes #11180 * Update. * Update. * Update.
This commit is contained in:
@@ -79,7 +79,6 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
_died = false;
|
||||
_charmerGUID.Clear();
|
||||
secondPhase = false;
|
||||
summons.DespawnAll();
|
||||
@@ -92,6 +91,18 @@ public:
|
||||
{
|
||||
_JustDied();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Respawn shorty in case of failure during phase 1.
|
||||
me->SetCorpseRemoveTime(25);
|
||||
me->SetRespawnTime(30);
|
||||
me->SaveRespawnTime();
|
||||
|
||||
// Might not be required, safe measure.
|
||||
me->SetLootRecipient(nullptr);
|
||||
|
||||
instance->SetData(DATA_EGG_EVENT, FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
bool CanAIAttack(Unit const* target) const override
|
||||
@@ -191,24 +202,11 @@ public:
|
||||
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if (!secondPhase && damage >= me->GetHealth() && !_died)
|
||||
if (!secondPhase && damage >= me->GetHealth())
|
||||
{
|
||||
// This is required because he kills himself with the explosion spell, causing a loop.
|
||||
_died = true;
|
||||
|
||||
Talk(SAY_DEATH);
|
||||
DoCastAOE(SPELL_EXPLODE_ORB);
|
||||
DoCastAOE(SPELL_EXPLOSION);
|
||||
|
||||
// Respawn shorty in case of failure during phase 1.
|
||||
me->SetCorpseRemoveTime(25);
|
||||
me->SetRespawnTime(30);
|
||||
me->SaveRespawnTime();
|
||||
|
||||
// Might not be required, safe measure.
|
||||
me->SetLootRecipient(nullptr);
|
||||
|
||||
instance->SetData(DATA_EGG_EVENT, FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,7 +254,6 @@ public:
|
||||
|
||||
private:
|
||||
bool secondPhase;
|
||||
bool _died;
|
||||
ObjectGuid _charmerGUID;
|
||||
GuidVector _summonGUIDS;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user