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:
@@ -0,0 +1,5 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1648906248199850600');
|
||||||
|
|
||||||
|
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=20038;
|
||||||
|
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||||
|
(13,1,20038,0,0,31,0,4,0,0,0,0,0,'','Explosion targets players');
|
||||||
@@ -4252,6 +4252,8 @@ void SpellMgr::LoadSpellInfoCorrections()
|
|||||||
ApplySpellFix({ 20038 }, [](SpellInfo* spellInfo)
|
ApplySpellFix({ 20038 }, [](SpellInfo* spellInfo)
|
||||||
{
|
{
|
||||||
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS);
|
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS);
|
||||||
|
spellInfo->Attributes |= SPELL_ATTR0_NO_IMMUNITIES;
|
||||||
|
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
|
||||||
});
|
});
|
||||||
|
|
||||||
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
|
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
|
||||||
|
|||||||
+13
-16
@@ -79,7 +79,6 @@ public:
|
|||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_Reset();
|
_Reset();
|
||||||
_died = false;
|
|
||||||
_charmerGUID.Clear();
|
_charmerGUID.Clear();
|
||||||
secondPhase = false;
|
secondPhase = false;
|
||||||
summons.DespawnAll();
|
summons.DespawnAll();
|
||||||
@@ -92,6 +91,18 @@ public:
|
|||||||
{
|
{
|
||||||
_JustDied();
|
_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
|
bool CanAIAttack(Unit const* target) const override
|
||||||
@@ -191,24 +202,11 @@ public:
|
|||||||
|
|
||||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
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);
|
Talk(SAY_DEATH);
|
||||||
DoCastAOE(SPELL_EXPLODE_ORB);
|
DoCastAOE(SPELL_EXPLODE_ORB);
|
||||||
DoCastAOE(SPELL_EXPLOSION);
|
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:
|
private:
|
||||||
bool secondPhase;
|
bool secondPhase;
|
||||||
bool _died;
|
|
||||||
ObjectGuid _charmerGUID;
|
ObjectGuid _charmerGUID;
|
||||||
GuidVector _summonGUIDS;
|
GuidVector _summonGUIDS;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user