mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Scripts/Ulduar/Flame Leviathan: Make both dummy effects apply on the same target, and boost range of spell Pursue to 50000yds to prevent boss reseting during the encounter.
This commit is contained in:
@@ -2990,7 +2990,6 @@ void SpellMgr::LoadDbcDataCorrections()
|
||||
case 25425: // Shoot
|
||||
case 45761: // Shoot
|
||||
case 42611: // Shoot
|
||||
case 62374: // Pursued
|
||||
case 61588: // Blazing Harpoon
|
||||
case 52479: // Gift of the Harvester
|
||||
spellInfo->MaxAffectedTargets = 1;
|
||||
@@ -3177,6 +3176,9 @@ void SpellMgr::LoadDbcDataCorrections()
|
||||
break;
|
||||
// ULDUAR SPELLS
|
||||
//
|
||||
case 62374: // Pursued (Flame Leviathan)
|
||||
spellInfo->EffectRadiusIndex[0] = 28; // 50000yd
|
||||
break;
|
||||
case 63342: // Focused Eyebeam Summon Trigger (Kologarn)
|
||||
spellInfo->MaxAffectedTargets = 1;
|
||||
break;
|
||||
|
||||
@@ -541,9 +541,6 @@ class boss_flame_leviathan : public CreatureScript
|
||||
//! I also removed the spellInfo check
|
||||
void DoBatteringRamIfReady()
|
||||
{
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
if (me->isAttackReady())
|
||||
{
|
||||
Unit* target = ObjectAccessor::GetUnit(*me, _pursueTarget);
|
||||
@@ -1229,7 +1226,7 @@ public:
|
||||
//bool OnGossipSelect(Player* player, Creature* creature, uint32 uiSender, uint32 uiAction)
|
||||
//{
|
||||
// player->PlayerTalkClass->ClearMenus();
|
||||
// switch (uiAction)
|
||||
// switch(uiAction)
|
||||
// {
|
||||
// case GOSSIP_ACTION_INFO_DEF+1:
|
||||
// if (player)
|
||||
@@ -1660,10 +1657,25 @@ class spell_pursue : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<Unit*>& targets)
|
||||
{
|
||||
targets.remove_if (FlameLeviathanPursuedTargetSelector(GetCaster()));
|
||||
targets.remove_if(FlameLeviathanPursuedTargetSelector(GetCaster()));
|
||||
if (targets.empty())
|
||||
{
|
||||
if (Creature* caster = GetCaster()->ToCreature())
|
||||
caster->AI()->EnterEvadeMode();
|
||||
}
|
||||
else
|
||||
{
|
||||
//! In the end, only one target should be selected
|
||||
_target = SelectRandomContainerElement(targets);
|
||||
FilterTargetsSubsequently(targets);
|
||||
}
|
||||
}
|
||||
|
||||
void FilterTargetsSubsequently(std::list<Unit*>& targets)
|
||||
{
|
||||
ASSERT(_target);
|
||||
targets.clear();
|
||||
targets.push_back(_target);
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex /*eff*/)
|
||||
@@ -1687,8 +1699,11 @@ class spell_pursue : public SpellScriptLoader
|
||||
void Register()
|
||||
{
|
||||
OnUnitTargetSelect += SpellUnitTargetFn(spell_pursue_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnUnitTargetSelect += SpellUnitTargetFn(spell_pursue_SpellScript::FilterTargetsSubsequently, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_pursue_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
|
||||
Unit* _target;
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
|
||||
Reference in New Issue
Block a user