diff --git a/data/sql/world/base/ipp_aware_npcs.sql b/data/sql/world/base/ipp_aware_npcs.sql index b3055d8..a49c912 100644 --- a/data/sql/world/base/ipp_aware_npcs.sql +++ b/data/sql/world/base/ipp_aware_npcs.sql @@ -63,6 +63,16 @@ UPDATE `creature_template` SET `ScriptName` = 'npc_ipp_tbc_t4' WHERE `entry` IN -- Phasing TBC vendors and trainers - Copies are added to replace them until TBC T4. UPDATE `creature_template` SET `ScriptName` = 'npc_ipp_tbc_t4' WHERE `entry` IN (18754, 18771, 19187, 21087); +-- TBC, Terrace of Light, phasing Shattered Sun offensive NPCs +UPDATE `creature` SET `phaseMask` = @IPPPHASE WHERE `id1` IN (24932, 25115, 25142, 25153, 25155); + +-- TBC, Terrace of Light, phasing T5 game objects +UPDATE `gameobject_template` SET `ScriptName` = 'gobject_ipp_tbc_t4' WHERE `entry` IN +(187056, -- Shattrath portal to Isle of Quel'Danas + 187345, -- Sunwell Plateau model + 187356, -- Shattered Sun Banner + 187357); -- Shattered Sun Banner + -- Phasing for General Tiras'alan and Dathris Sunstriker - prevent early access to Isle of Quel'Danas UPDATE `creature_template` SET `ScriptName` = 'npc_ipp_tbc_t5' WHERE `entry` IN (25167, 18594); diff --git a/src/IndividualProgression.h b/src/IndividualProgression.h index 973087d..12f2dfa 100644 --- a/src/IndividualProgression.h +++ b/src/IndividualProgression.h @@ -145,6 +145,7 @@ enum ProgressionAreas AREA_HIVE_ASHI = 2742, AREA_HIVE_ZORA = 2743, AREA_HIVE_REGAL = 2744, + AREA_TERRACE_OF_LIGHT = 3897, AREA_ARGENT_SUNREAVER_PAVILION = 4666, AREA_ARGENT_SILVER_COVENANT_PAVILION = 4667, AREA_ARGENT_PAVILION = 4674 diff --git a/src/IndividualProgressionAwarenessScripts.cpp b/src/IndividualProgressionAwarenessScripts.cpp index 3798047..08bd049 100644 --- a/src/IndividualProgressionAwarenessScripts.cpp +++ b/src/IndividualProgressionAwarenessScripts.cpp @@ -210,6 +210,32 @@ public: } }; +class gobject_ipp_tbc_t4 : public GameObjectScript +{ +public: + gobject_ipp_tbc_t4() : GameObjectScript("gobject_ipp_tbc_t4") { } + + struct gobject_ipp_tbc_t4AI: GameObjectAI + { + explicit gobject_ipp_tbc_t4AI(GameObject* object) : GameObjectAI(object) { }; + + bool CanBeSeen(Player const* player) override + { + if (player->IsGameMaster() || !sIndividualProgression->enabled) + { + return true; + } + Player* target = ObjectAccessor::FindConnectedPlayer(player->GetGUID()); + return sIndividualProgression->hasPassedProgression(target, PROGRESSION_TBC_TIER_4); + } + }; + + GameObjectAI* GetAI(GameObject* object) const override + { + return new gobject_ipp_tbc_t4AI(object); + } +}; + class gobject_ipp_wotlk : public GameObjectScript { public: @@ -757,6 +783,7 @@ void AddSC_mod_individual_progression_awareness() new gobject_ipp_naxx40(); new gobject_ipp_pre_tbc(); // Stormwind pvp room new gobject_ipp_tbc(); + new gobject_ipp_tbc_t4(); // Shattered Sun new gobject_ipp_wotlk(); new gobject_ipp_pvp_closed(); // pvp officer doors new gobject_ipp_pvp_open(); // pvp officer doors diff --git a/src/IndividualProgressionPlayer.cpp b/src/IndividualProgressionPlayer.cpp index 7a4c238..a5f37db 100644 --- a/src/IndividualProgressionPlayer.cpp +++ b/src/IndividualProgressionPlayer.cpp @@ -1017,7 +1017,15 @@ public: player->CastSpell(player, IPP_PHASE, false); } break; - case AREA_LIGHTS_HOPE: + case AREA_TERRACE_OF_LIGHT: + if (sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_4)) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->RemoveAura(IPP_PHASE_III); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_ARGENT_TOURNAMENT_GROUNDS: case AREA_ARGENT_SUNREAVER_PAVILION: case AREA_ARGENT_SILVER_COVENANT_PAVILION: