From f9e592e9c7b758d8d61d43e7f2c6b09cc0c1dd7f Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 24 Dec 2012 18:24:30 -0500 Subject: Scripts/HallsOfOrigination: Some work on Halls of Origination. Temple Guardian Anhuur's script added. ToDo: Make the triggers invisible. Merry Christmas folks! --- .../IcecrownCitadel/boss_the_lich_king.cpp | 23 ++-------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'src/server/scripts/Northrend') diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index ec5172aeb83..a2663074de8 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -383,25 +383,6 @@ class NecroticPlagueTargetCheck : public std::unary_function uint32 _notAura2; }; -class HeightDifferenceCheck -{ - public: - HeightDifferenceCheck(GameObject* go, float diff, bool reverse) - : _baseObject(go), _difference(diff), _reverse(reverse) - { - } - - bool operator()(WorldObject* unit) const - { - return (unit->GetPositionZ() - _baseObject->GetPositionZ() > _difference) != _reverse; - } - - private: - GameObject* _baseObject; - float _difference; - bool _reverse; -}; - class FrozenThroneResetWorker { public: @@ -1535,7 +1516,7 @@ class npc_valkyr_shadowguard : public CreatureScript { std::list triggers; GetCreatureListWithEntryInGrid(triggers, me, NPC_WORLD_TRIGGER, 150.0f); - triggers.remove_if(HeightDifferenceCheck(platform, 5.0f, true)); + triggers.remove_if(Trinity::HeightDifferenceCheck(platform, 5.0f, true)); if (triggers.empty()) return; @@ -2325,7 +2306,7 @@ class spell_the_lich_king_quake : public SpellScriptLoader void FilterTargets(std::list& targets) { if (GameObject* platform = ObjectAccessor::GetGameObject(*GetCaster(), GetCaster()->GetInstanceScript()->GetData64(DATA_ARTHAS_PLATFORM))) - targets.remove_if(HeightDifferenceCheck(platform, 5.0f, false)); + targets.remove_if(Trinity::HeightDifferenceCheck(platform, 5.0f, false)); } void HandleSendEvent(SpellEffIndex /*effIndex*/) -- cgit v1.2.3