Skip to content

Commit

Permalink
Fix several NPCs sending players to Isle of Quel'Danas early
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhengPeiRu21 committed Mar 4, 2024
1 parent a92ce5b commit 19727d9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sql/world/base/ipp_aware_npcs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ UPDATE `gameobject_template` SET `ScriptName` = 'gobject_ipp_tbc' WHERE `entry`
-- Drop source for 2.3 Jewelcrafting Recipe
UPDATE `creature_template` SET `ScriptName` = 'npc_ipp_tbc_t4' WHERE `entry` IN (19768, 19227, 23761);

-- 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);

-- Argent Tournament
UPDATE `creature` SET `phaseMask` = @IPPPHASE WHERE `guid` IN (25, 63129, 63236, 63370, 63371, 65274, 65275, 65283, 65284, 65285, 65325, 65327, 65350, 65351, 65371, 65451,
65522, 65523, 65526, 65901, 66478, 66479, 66741, 66753, 66788, 66790, 66792, 66910, 66941, 67185, 67187, 68005, 68457, 68583, 68906, 68941, 68947, 68987, 68989, 68990, 69010,
Expand Down
27 changes: 27 additions & 0 deletions src/IndividualProgressionAwarenessScripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,32 @@ class npc_ipp_tbc_t4 : public CreatureScript
}
};

class npc_ipp_tbc_t5 : public CreatureScript
{
public:
npc_ipp_tbc_t5() : CreatureScript("npc_ipp_tbc_t5") { }

struct npc_ipp_tbc_t5AI: ScriptedAI
{
explicit npc_ipp_tbc_t5AI(Creature* creature) : ScriptedAI(creature) { };

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);
}
};

CreatureAI* GetAI(Creature* creature) const override
{
return new npc_ipp_tbc_t5AI(creature);
}
};

class npc_ipp_tbc_pre_t4 : public CreatureScript
{
public:
Expand Down Expand Up @@ -323,6 +349,7 @@ void AddSC_mod_individual_progression_awareness()
new npc_ipp_ds2();
new npc_ipp_tbc();
new npc_ipp_tbc_t4();
new npc_ipp_tbc_t5();
new npc_ipp_tbc_pre_t4();
new npc_ipp_wotlk();
new npc_ipp_wotlk_ulduar();
Expand Down

0 comments on commit 19727d9

Please sign in to comment.