mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 23:44:51 +08:00
Progression phased TBC Badge Vendor
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user