Scripts/Auchindoun: Implement Auchindoun events until first boss (#30034)

This commit is contained in:
Aqua Deus
2025-02-01 18:58:48 +01:00
committed by GitHub
parent 4db19d3a1a
commit fa75f796d5
5 changed files with 678 additions and 0 deletions

View File

@@ -0,0 +1,123 @@
SET @CGUID := 5000557;
SET @SPAWNGROUP := 1264;
UPDATE `creature` SET `StringId`='npc_auchenai_defender_intro' WHERE `guid`= 5000442; -- Auchenai Defender
UPDATE `creature_template` SET `ScriptName` = 'npc_auchindoun_soulbinder_tuulani' WHERE `entry`=79248; -- Soulbinder Tuulani
UPDATE `creature_template` SET `ScriptName` = 'npc_auchindoun_auchenai_defender' WHERE `entry`=77693; -- Auchenai Defender
-- Texts
DELETE FROM `creature_text` WHERE `CreatureID` IN (77693, 79248);
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(77693, 0, 0, 'Nyami awaits you in the western ritual chamber, champions.', 12, 0, 100, 0, 0, 0, 83111, 0, 'Auchenai Defender to Player'),
(79248, 0, 0, 'Good! We must have arrived before Teron\'gor and Gul\'dan!', 12, 0, 100, 3, 0, 44644, 81528, 0, 'Soulbinder Tuulani to Player'),
(79248, 1, 0, 'Nyami is working to bolster the defenses against their assault - follow me, we will report to her.', 12, 0, 100, 1, 0, 44654, 81529, 0, 'Soulbinder Tuulani to Player'),
(79248, 2, 0, 'Beautiful, isn\'t it? Just think - you\'re one of the first outsiders to see inside Auchindoun.', 12, 0, 100, 6, 0, 44655, 81530, 0, 'Soulbinder Tuulani to Player'),
(79248, 3, 0, 'Strange... why is the door sealed? No matter...', 12, 0, 100, 6, 0, 44656, 81531, 0, 'Soulbinder Tuulani to Player'),
(79248, 4, 0, 'Let us proceed.', 12, 0, 100, 25, 0, 44657, 81532, 0, 'Soulbinder Tuulani'),
(79248, 5, 0, 'The Vindicators and Exarchs of the past. Heroes all - their souls still remain with us here.', 12, 0, 100, 25, 0, 44658, 81533, 0, 'Soulbinder Tuulani');
-- Waypoints
SET @ENTRY := 79248;
SET @PATHOFFSET := 0;
SET @PATH := @ENTRY * 100 + @PATHOFFSET;
DELETE FROM `waypoint_path` WHERE `PathId`= @PATH;
INSERT INTO `waypoint_path` (`PathId`, `MoveType`, `Flags`, `Comment`) VALUES
(@PATH, 1, 0, 'Soulbinder Tuulani path to holy barrier');
DELETE FROM `waypoint_path_node` WHERE `PathId`= @PATH;
INSERT INTO `waypoint_path_node` (`PathId`, `NodeId`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `Delay`) VALUES
(@PATH, 0, 1581.05, 2953.418, 35.2387, NULL, 0),
(@PATH, 1, 1599.741, 2952.971, 35.23116, NULL, 0),
(@PATH, 2, 1617.514, 2953.21, 35.22284, NULL, 6486),
(@PATH, 3, 1649.21, 2953.6, 34.80952, NULL, 0),
(@PATH, 4, 1654.767, 2960.552, 34.27824, NULL, 0),
(@PATH, 5, 1658.876, 2968.664, 35.31583, NULL, 0),
(@PATH, 6, 1660.462, 2981.102, 34.7626, NULL, 0),
(@PATH, 7, 1663.101, 2997.4, 34.76278, NULL, 0),
(@PATH, 8, 1664.323, 3002.953, 34.89674, NULL, 0);
SET @ENTRY := 79248;
SET @PATHOFFSET := 1;
SET @PATH := @ENTRY * 100 + @PATHOFFSET;
DELETE FROM `waypoint_path` WHERE `PathId`= @PATH;
INSERT INTO `waypoint_path` (`PathId`, `MoveType`, `Flags`, `Comment`) VALUES
(@PATH, 1, 0, 'Soulbinder Tuulani path to first boss');
DELETE FROM `waypoint_path_node` WHERE `PathId`= @PATH;
INSERT INTO `waypoint_path_node` (`PathId`, `NodeId`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `Delay`) VALUES
(@PATH, 0, 1666.299, 3032.361, 35.15017, NULL, 0),
(@PATH, 1, 1677.693, 3045.896, 35.1377, NULL, 0),
(@PATH, 2, 1681.016, 3064.814, 35.13763, NULL, 0),
(@PATH, 3, 1683.851, 3078.6, 35.13764, NULL, 0),
(@PATH, 4, 1694.418, 3081.378, 35.13764, NULL, 0),
(@PATH, 5, 1697.734, 3086.925, 35.13764, NULL, 7960),
(@PATH, 6, 1718.639, 3116.199, 35.13764, NULL, 0),
(@PATH, 7, 1728.587, 3128.338, 35.13763, NULL, 0),
(@PATH, 8, 1747.014, 3144.337, 35.13762, NULL, 0),
(@PATH, 9, 1775.142, 3162.625, 35.13763, NULL, 0),
(@PATH, 10, 1789.036, 3174.038, 35.13765, NULL, 0),
(@PATH, 11, 1798.358, 3179.212, 35.13763, NULL, 0),
(@PATH, 12, 1806.295, 3182.313, 35.11731, 3.70009, 0);
-- Conditions
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` = 160415;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 1, 160415, 0, 2, 51, 0, 5, 79417, 0, '', 0, 0, 0, '', 'Spell \'Tuulani Unlock Visual\' can only hit \'Invisible Stalker\'');
-- Spells
UPDATE `spell_target_position` SET `PositionX`=1855.673583984375, `PositionY`=3198.618896484375, `VerifiedBuild`=54988 WHERE (`ID`=178799 AND `EffectIndex`=0); -- Spell: 178799 (Grimrail Depot) Efffect: 252 (SPELL_EFFECT_TELEPORT_UNITS)
DELETE FROM `spell_script_names` WHERE `spell_id` IN (157762, 178800);
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(157762, 'spell_auchindoun_halo'),
(178800, 'spell_auchindoun_grimrail_depot_scene_selector');
-- Areatrigger
DELETE FROM `areatrigger_scripts` WHERE `entry` IN (9973, 10072, 9974, 10280);
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
(9973, 'at_auchindoun_entrance'),
(10072, 'at_auchindoun_auchenai_defender_intro'),
(9974, 'at_auchindoun_barrier'),
(10280, 'at_auchindoun_soulbinder_nyami_scene');
UPDATE `areatrigger_create_properties` SET `ScriptName`= 'at_auchindoun_npc_reaction' WHERE `Id` = 1725;
-- Scene
DELETE FROM `scene_template` WHERE `SceneId`=913;
INSERT INTO `scene_template` (`SceneId`, `Flags`, `ScriptPackageID`, `Encrypted`, `ScriptName`) VALUES
(913, 17, 1365, 0, 'scene_auchindoun_soulbinder_nyami');
-- Phase
DELETE FROM `phase_name` WHERE `ID`=4346;
INSERT INTO `phase_name` (`ID`, `Name`) VALUES
(4346, 'Auchindoun Instance Scene');
DELETE FROM `phase_area` WHERE `AreaId`=6912 AND `PhaseId`=4346;
INSERT INTO `phase_area` (`AreaId`, `PhaseId`, `Comment`) VALUES
(6912, 4346, 'Auchindoun Instance See Scene');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=26 AND `SourceGroup`=4346;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(26, 4346, 0, 0, 0, 56, 0, 31506, 0, 0, '', 0, 0, 0, '', 'Apply Phase 4346 if PlayerCondition 31506 is satisfied');
-- Spawngroup
DELETE FROM `creature` WHERE `guid` = @CGUID;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `PhaseId`, `PhaseGroup`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `VerifiedBuild`) VALUES
(@CGUID, 79248, 1182, 6912, 6912, '1,2,8,23', 0, 0, 0, 1, 1859.0208740234375, 3197.3203125, 29.50753593444824218, 0.019564647227525711, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54904); -- Soulbinder Tuulani (Area: Auchindoun - Difficulty: Normal) CreateObject1 (Auras: 154840 - Void Stasis)
DELETE FROM `creature_addon` WHERE `guid` = @CGUID;
INSERT INTO `creature_addon` (`guid`, `PathId`, `mount`, `StandState`, `AnimTier`, `VisFlags`, `SheathState`, `PvpFlags`, `emote`, `aiAnimKit`, `movementAnimKit`, `meleeAnimKit`, `visibilityDistanceType`, `auras`) VALUES
(@CGUID, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 5, '154840'); -- Soulbinder Tuulani - 154840 - Void Stasis -
DELETE FROM `spawn_group` WHERE `groupId`=@SPAWNGROUP;
INSERT INTO `spawn_group` (`groupId`, `spawnType`, `spawnId`) VALUES
(@SPAWNGROUP, 0, @CGUID);
DELETE FROM `spawn_group_template` WHERE `groupId`=@SPAWNGROUP;
INSERT INTO `spawn_group_template` (`groupId`, `groupName`, `groupFlags`) VALUES
(@SPAWNGROUP, 'Auchindoun - Soulbinder Tuulani Imprisoned', 4);
DELETE FROM `instance_template` WHERE `map`=1182;
INSERT INTO `instance_template` (`map`, `parent`, `script`) VALUES
(1182, 0, 'instance_auchindoun');

View File

@@ -0,0 +1,410 @@
/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AreaTrigger.h"
#include "AreaTriggerAI.h"
#include "GameObject.h"
#include "InstanceScript.h"
#include "Map.h"
#include "MotionMaster.h"
#include "ObjectAccessor.h"
#include "PhasingHandler.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "ScriptMgr.h"
#include "SpellScript.h"
#include "TaskScheduler.h"
#include "auchindoun.h"
enum AuchindounSpells
{
SPELL_HALO_HEAL = 157795,
SPELL_TUULANI_UNLOCK_VISUAL = 160415,
SPELL_GRIMRAIL_DEPOT_SCENE = 178747,
SPELL_GRIMRAIL_DEPOT_SELECTOR = 178800,
SPELL_GRIMRAIL_DEPOT_TELEPORT = 178799,
SPELL_GRIMRAIL_DEPOT_REMOVE_AURA = 178746
// SPELL_INSTANCE_BOOTSTRAPPER = 171344 // This spell appears in a lot of sniffs, but the purpose is unknown
};
enum AuchindounActions
{
ACTION_TUULANI_INTRO = 1,
ACTION_TUULANI_BREAK_BARRIER,
ACTION_AUCHENAI_DEFENDER_TALK
};
enum AuchindounTexts
{
// Auchenai Defender
SAY_NYAMI_AWAITS = 0,
// Soulbinder Tuulani
SAY_WELCOME_1 = 0,
SAY_WELCOME_2 = 1,
SAY_WELCOME_3 = 2,
SAY_BREAK_BARRIER_1 = 3,
SAY_BREAK_BARRIER_2 = 4,
SAY_HEROES_SOULS = 5
};
enum AuchindounMisc
{
// Waypoint
PATH_BARRIER = 7924800,
PATH_MOVE_TO_BOSS = 7924801,
POINT_TALK = 2,
POINT_BARRIER = 8,
POINT_SOULS = 5,
// Spawngroups
SPAWNGROUP_TUULANI_IMPRISONED = 1264
};
// 9973 - Areatrigger
class at_auchindoun_entrance : public OnlyOnceAreaTriggerScript
{
public:
at_auchindoun_entrance() : OnlyOnceAreaTriggerScript("at_auchindoun_entrance") { }
bool TryHandleOnce(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
{
if (InstanceScript* instance = player->GetInstanceScript())
{
if (Creature* tuulani = instance->GetCreature(DATA_SOULBINDER_TUULANI))
tuulani->AI()->DoAction(ACTION_TUULANI_INTRO);
}
return true;
}
};
// 10072 - Areatrigger
class at_auchindoun_auchenai_defender_intro : public OnlyOnceAreaTriggerScript
{
public:
at_auchindoun_auchenai_defender_intro() : OnlyOnceAreaTriggerScript("at_auchindoun_auchenai_defender_intro") { }
bool TryHandleOnce(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
{
if (Creature* auchenaiDefender = player->FindNearestCreatureWithOptions(30.0f, { .StringId = "npc_auchenai_defender_intro" }))
auchenaiDefender->AI()->DoAction(ACTION_AUCHENAI_DEFENDER_TALK);
return true;
}
};
// 9974 - Areatrigger
// Not OnlyOnce because players can trigger this AT before Tuulani reaches the barrier
class at_auchindoun_barrier : public AreaTriggerScript
{
public:
at_auchindoun_barrier() : AreaTriggerScript("at_auchindoun_barrier") { }
bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
{
if (InstanceScript* instance = player->GetInstanceScript())
{
if (Creature* tuulani = instance->GetCreature(DATA_SOULBINDER_TUULANI))
tuulani->AI()->DoAction(ACTION_TUULANI_BREAK_BARRIER);
}
return true;
}
};
// 10280 - Areatrigger
class at_auchindoun_soulbinder_nyami_scene : public OnlyOnceAreaTriggerScript
{
public:
at_auchindoun_soulbinder_nyami_scene() : OnlyOnceAreaTriggerScript("at_auchindoun_soulbinder_nyami_scene") { }
bool TryHandleOnce(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
{
player->CastSpell(player, SPELL_GRIMRAIL_DEPOT_SELECTOR, true);
if (InstanceScript* instance = player->GetInstanceScript())
{
if (Creature* tuulani = instance->GetCreature(DATA_SOULBINDER_TUULANI))
tuulani->DespawnOrUnsummon();
}
return true;
}
};
// 77693 - Auchenai Defender
struct npc_auchindoun_auchenai_defender : public ScriptedAI
{
npc_auchindoun_auchenai_defender(Creature* creature) : ScriptedAI(creature) { }
void DoAction(int32 action) override
{
if (action == ACTION_AUCHENAI_DEFENDER_TALK)
{
me->SetStandState(UNIT_STAND_STATE_STAND);
_scheduler.Schedule(1s + 300ms, [this](TaskContext /*task*/)
{
me->SetFacingTo(3.8194849f);
Talk(SAY_NYAMI_AWAITS);
});
}
}
void UpdateAI(uint32 diff) override
{
_scheduler.Update(diff);
}
private:
TaskScheduler _scheduler;
};
// 79248 - Soulbinder Tuulani
struct npc_auchindoun_soulbinder_tuulani : public ScriptedAI
{
npc_auchindoun_soulbinder_tuulani(Creature* creature) : ScriptedAI(creature), _isAtBarrier(false), _actionStarted(false) { }
void DoAction(int32 action) override
{
if (action == ACTION_TUULANI_INTRO)
{
Talk(SAY_WELCOME_1);
_scheduler.Schedule(4s + 300ms, [this](TaskContext task)
{
Talk(SAY_WELCOME_2);
task.Schedule(6s, [this](TaskContext /*task*/)
{
me->GetMotionMaster()->MovePath(PATH_BARRIER, false);
});
});
}
else if (action == ACTION_TUULANI_BREAK_BARRIER)
{
if (!_isAtBarrier || _actionStarted)
return;
_actionStarted = true;
Talk(SAY_BREAK_BARRIER_1);
_scheduler.Schedule(3s, [this](TaskContext task)
{
DoCast(SPELL_TUULANI_UNLOCK_VISUAL);
task.Schedule(4s, [this](TaskContext task)
{
if (GameObject* holyBarrier = me->GetInstanceScript()->GetGameObject(DATA_HOLY_BARRIER))
holyBarrier->SetGoState(GO_STATE_ACTIVE);
task.Schedule(2s + 300ms, [this](TaskContext task)
{
Talk(SAY_BREAK_BARRIER_2);
task.Schedule(1s + 300ms, [this](TaskContext /*task*/)
{
me->GetMotionMaster()->MovePath(PATH_MOVE_TO_BOSS, false);
});
});
});
});
}
}
void WaypointReached(uint32 waypointId, uint32 pathId) override
{
if (pathId == PATH_BARRIER)
{
switch (waypointId)
{
case POINT_TALK:
{
_scheduler.Schedule(500ms, [this](TaskContext /*task*/)
{
Talk(SAY_WELCOME_3);
});
break;
}
case POINT_BARRIER:
{
_isAtBarrier = true;
break;
}
default:
break;
}
}
else if (pathId == PATH_MOVE_TO_BOSS)
{
if (waypointId == POINT_SOULS)
{
_scheduler.Schedule(500ms, [this](TaskContext /*task*/)
{
me->SetFacingTo(1.727875f);
Talk(SAY_HEROES_SOULS);
});
}
}
}
void UpdateAI(uint32 diff) override
{
_scheduler.Update(diff);
}
private:
TaskScheduler _scheduler;
bool _isAtBarrier;
bool _actionStarted;
};
// 155647 - NPC Reaction
struct at_auchindoun_npc_reaction : AreaTriggerAI
{
at_auchindoun_npc_reaction(AreaTrigger* areatrigger) : AreaTriggerAI(areatrigger) { }
void OnUnitEnter(Unit* unit) override
{
if (!unit->IsCreature() || unit->GetEmoteState() == EMOTE_STATE_READY1H_ALLOW_MOVEMENT || unit->GetEntry() == NPC_SOULBINDER_TUULANI)
return;
_scheduler.Schedule(1500ms, [this, unitGUID = unit->GetGUID()](TaskContext task)
{
Creature* auchenaiDefender = ObjectAccessor::GetCreature(*at, unitGUID);
if (!auchenaiDefender)
return;
if (Unit* caster = at->GetCaster())
auchenaiDefender->SetFacingToObject(caster);
auchenaiDefender->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
task.Schedule(4s, [this, unitGUID](TaskContext /*task*/)
{
Creature* auchenaiDefender = ObjectAccessor::GetCreature(*at, unitGUID);
if (!auchenaiDefender)
return;
auchenaiDefender->SetFacingTo(auchenaiDefender->GetHomePosition().GetOrientation());
});
});
}
void OnUpdate(uint32 diff) override
{
_scheduler.Update(diff);
}
private:
TaskScheduler _scheduler;
};
// 157762 - Halo
class spell_auchindoun_halo : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HALO_HEAL });
}
void HandleHit(SpellEffIndex /*effIndex*/) const
{
if (!GetHitUnit()->IsCreature())
return;
GetCaster()->CastSpell(GetHitUnit(), SPELL_HALO_HEAL, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_auchindoun_halo::HandleHit, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
// 178800 - Grimrail Depot
class spell_auchindoun_grimrail_depot_scene_selector : public SpellScript
{
void HandleDummy(SpellEffIndex /*effIndex*/) const
{
GetCaster()->CastSpell(GetHitUnit(), SPELL_GRIMRAIL_DEPOT_SCENE, true);
// GetCaster()->CastSpell(GetHitUnit(), SPELL_INSTANCE_BOOTSTRAPPER, false);
}
void HandleEvent(SpellEffIndex /*effIndex*/) const
{
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
instance->SendEncounterUnit(ENCOUNTER_FRAME_PHASE_SHIFT_CHANGED, nullptr);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_auchindoun_grimrail_depot_scene_selector::HandleDummy, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHit += SpellEffectFn(spell_auchindoun_grimrail_depot_scene_selector::HandleEvent, EFFECT_1, SPELL_EFFECT_SEND_EVENT);
}
};
// 178747 - Grimrail Depot
class scene_auchindoun_soulbinder_nyami : public SceneScript
{
public:
scene_auchindoun_soulbinder_nyami() : SceneScript("scene_auchindoun_soulbinder_nyami") { }
static void HandleScene(Player* player)
{
player->ClearUnitState(UNIT_STATE_ROOT);
player->CastSpell(player, SPELL_GRIMRAIL_DEPOT_TELEPORT, true);
player->CastSpell(player, SPELL_GRIMRAIL_DEPOT_REMOVE_AURA, TRIGGERED_FULL_MASK);
PhasingHandler::OnConditionChange(player);
Map* map = player->GetMap();
if (!map->IsSpawnGroupActive(SPAWNGROUP_TUULANI_IMPRISONED))
map->SpawnGroupSpawn(SPAWNGROUP_TUULANI_IMPRISONED);
}
void OnSceneStart(Player* player, uint32 /*sceneInstanceID*/, SceneTemplate const* /*sceneTemplate*/) override
{
player->AddUnitState(UNIT_STATE_ROOT);
}
void OnSceneComplete(Player* player, uint32 /*sceneInstanceID*/, SceneTemplate const* /*sceneTemplate*/) override
{
HandleScene(player);
}
void OnSceneCancel(Player* player, uint32 /*sceneInstanceID*/, SceneTemplate const* /*sceneTemplate*/) override
{
HandleScene(player);
}
};
void AddSC_auchindoun()
{
new at_auchindoun_entrance();
new at_auchindoun_auchenai_defender_intro();
new at_auchindoun_barrier();
new at_auchindoun_soulbinder_nyami_scene();
RegisterAuchindounCreatureAI(npc_auchindoun_auchenai_defender);
RegisterAuchindounCreatureAI(npc_auchindoun_soulbinder_tuulani);
RegisterAreaTriggerAI(at_auchindoun_npc_reaction);
RegisterSpellScript(spell_auchindoun_halo);
RegisterSpellScript(spell_auchindoun_grimrail_depot_scene_selector);
new scene_auchindoun_soulbinder_nyami();
}

View File

@@ -0,0 +1,66 @@
/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _Auchindoun_h__
#define _Auchindoun_h__
#include "CreatureAIImpl.h"
constexpr char const* DataHeader = "Auchindoun";
constexpr char const* AuchindounScriptName = "instance_auchindoun";
constexpr uint32 EncounterCount = 4;
enum AuchindounDataTypes
{
// Encounters
DATA_VIGILANT_KAATHAR = 0,
DATA_SOULBINDER_NYAMI = 1,
DATA_AZZAKEL = 2,
DATA_TERONGOR = 3,
DATA_SOULBINDER_TUULANI,
// GameObjects
DATA_HOLY_BARRIER,
};
enum AuchindounCreatureIds
{
// Bosses
BOSS_VIGILANT_KAATHAR = 75839,
BOSS_SOULBINDER_NYAMI = 76177,
BOSS_AZZAKEL = 75927,
BOSS_TERONGOR = 77734,
NPC_SOULBINDER_TUULANI = 79248
};
enum AuchindounGameobjectIds
{
GO_HOLY_BARRIER = 230398
};
template <class AI, class T>
inline AI* GetAuchindounAI(T* obj)
{
return GetInstanceAI<AI>(obj, AuchindounScriptName);
}
#define RegisterAuchindounCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetAuchindounAI)
#endif // _Auchindoun_h__

View File

@@ -0,0 +1,71 @@
/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "InstanceScript.h"
#include "ScriptMgr.h"
#include "auchindoun.h"
constexpr ObjectData creatureData[] =
{
{ BOSS_VIGILANT_KAATHAR, DATA_VIGILANT_KAATHAR },
{ BOSS_SOULBINDER_NYAMI, DATA_SOULBINDER_NYAMI },
{ BOSS_AZZAKEL, DATA_AZZAKEL },
{ BOSS_TERONGOR, DATA_TERONGOR },
{ NPC_SOULBINDER_TUULANI, DATA_SOULBINDER_TUULANI },
{ 0, 0 } // END
};
constexpr ObjectData objectData[] =
{
{ GO_HOLY_BARRIER, DATA_HOLY_BARRIER },
{ 0, 0 } // END
};
constexpr DungeonEncounterData encounters[] =
{
{ DATA_VIGILANT_KAATHAR, {{ 1678 }} },
{ DATA_SOULBINDER_NYAMI, {{ 1685 }} },
{ DATA_AZZAKEL, {{ 1686 }} },
{ DATA_TERONGOR, {{ 1714 }} }
};
class instance_auchindoun : public InstanceMapScript
{
public:
instance_auchindoun() : InstanceMapScript("instance_auchindoun", 1182) { }
struct instance_auchindoun_InstanceMapScript : public InstanceScript
{
instance_auchindoun_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
{
SetHeaders(DataHeader);
SetBossNumber(EncounterCount);
LoadObjectData(creatureData, objectData);
LoadDungeonEncounterData(encounters);
}
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_auchindoun_InstanceMapScript(map);
}
};
void AddSC_instance_auchindoun()
{
new instance_auchindoun();
}

View File

@@ -20,6 +20,10 @@ void AddSC_assault_on_the_dark_portal();
void AddSC_draenor_shadowmoon_valley();
void AddSC_garrison_generic();
// Auchindoun
void AddSC_instance_auchindoun();
void AddSC_auchindoun();
// The name of this function should match:
// void Add${NameOfDirectory}Scripts()
void AddDraenorScripts()
@@ -27,4 +31,8 @@ void AddDraenorScripts()
AddSC_assault_on_the_dark_portal();
AddSC_draenor_shadowmoon_valley();
AddSC_garrison_generic();
// Auchindoun
AddSC_instance_auchindoun();
AddSC_auchindoun();
}