Progression phased TBC Badge Vendor

This commit is contained in:
郑佩茹
2022-09-15 12:58:44 -06:00
parent 96f207b628
commit 2f1d419ee4
2 changed files with 122 additions and 0 deletions

View File

@@ -87,6 +87,58 @@ public:
}
};
class npc_ipp_tbc_t4 : public CreatureScript
{
public:
npc_ipp_tbc_t4() : CreatureScript("npc_ipp_tbc_t4") { }
struct npc_ipp_tbc_t4AI: ScriptedAI
{
npc_ipp_tbc_t4AI(Creature* creature) : ScriptedAI(creature) { };
bool CanBeSeen(Player const* player) override
{
if (player->IsGameMaster() || !enabled)
{
return true;
}
Player* target = ObjectAccessor::FindConnectedPlayer(player->GetGUID());
return target->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value >= PROGRESSION_TBC_TIER_3;
}
};
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_ipp_tbc_t4AI(creature);
}
};
class npc_ipp_tbc_pre_t4 : public CreatureScript
{
public:
npc_ipp_tbc_pre_t4() : CreatureScript("npc_ipp_tbc_pre_t4") { }
struct npc_ipp_tbc_pre_t4AI: ScriptedAI
{
npc_ipp_tbc_pre_t4AI(Creature* creature) : ScriptedAI(creature) { };
bool CanBeSeen(Player const* player) override
{
if (player->IsGameMaster() || !enabled)
{
return true;
}
Player* target = ObjectAccessor::FindConnectedPlayer(player->GetGUID());
return target->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value < PROGRESSION_TBC_TIER_3;
}
};
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_ipp_tbc_pre_t4AI(creature);
}
};
class npc_ipp_wotlk : public CreatureScript
{
public:
@@ -769,6 +821,8 @@ void AddSC_mod_individual_progression()
new npc_ipp_aq();
new npc_ipp_naxx40();
new npc_ipp_tbc();
new npc_ipp_tbc_t4();
new npc_ipp_tbc_pre_t4();
new npc_ipp_wotlk();
new gobject_ipp_tbc();
// new gobject_ipp_wotlk(); // Not used yet