mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Scripts/TempleOfAhnQiraj): Correct Dark Glare's radius (#13350)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
--
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_cthun_dark_glare';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(26029, 'spell_cthun_dark_glare');
|
||||
@@ -25,6 +25,7 @@ EndScriptData */
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "TaskScheduler.h"
|
||||
#include "temple_of_ahnqiraj.h"
|
||||
|
||||
@@ -273,6 +274,9 @@ struct boss_eye_of_cthun : public BossAI
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
me->SetTarget(ObjectGuid::Empty);
|
||||
|
||||
//Freeze animation
|
||||
DoCast(me, SPELL_FREEZE_ANIM, true);
|
||||
|
||||
_scheduler.Schedule(1s, [this](TaskContext /*task*/)
|
||||
{
|
||||
//Select random target for dark beam to start on
|
||||
@@ -283,14 +287,9 @@ struct boss_eye_of_cthun : public BossAI
|
||||
DarkGlareTick = 0;
|
||||
ClockWise = RAND(true, false);
|
||||
|
||||
me->SetTarget(target->GetGUID());
|
||||
|
||||
//Add red coloration to C'thun
|
||||
DoCast(me, SPELL_RED_COLORATION, true);
|
||||
|
||||
//Freeze animation
|
||||
DoCast(me, SPELL_FREEZE_ANIM, true);
|
||||
|
||||
me->StopMoving();
|
||||
me->SetFacingToObject(target);
|
||||
me->SetOrientation(DarkGlareAngle);
|
||||
@@ -927,6 +926,22 @@ private:
|
||||
ObjectGuid _portalGUID;
|
||||
};
|
||||
|
||||
class spell_cthun_dark_glare : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_cthun_dark_glare);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
targets.remove_if([caster](WorldObject const* target) { return !caster->HasInLine(target, 5.0f); });
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_cthun_dark_glare::FilterTargets, EFFECT_ALL, TARGET_UNIT_CONE_ENEMY_24);
|
||||
}
|
||||
};
|
||||
|
||||
// 4033 - At C'thun's stomach
|
||||
class at_cthun_stomach_exit : public AreaTriggerScript
|
||||
{
|
||||
@@ -997,6 +1012,7 @@ void AddSC_boss_cthun()
|
||||
RegisterTempleOfAhnQirajCreatureAI(npc_claw_tentacle);
|
||||
RegisterTempleOfAhnQirajCreatureAI(npc_giant_claw_tentacle);
|
||||
RegisterTempleOfAhnQirajCreatureAI(npc_giant_eye_tentacle);
|
||||
RegisterSpellScript(spell_cthun_dark_glare);
|
||||
new at_cthun_stomach_exit();
|
||||
new at_cthun_center();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user