Profession fixes, some phasing improvements

This commit is contained in:
郑佩茹
2022-06-21 17:48:31 -06:00
parent 855184959c
commit 8376f73bcb
7 changed files with 394 additions and 12 deletions

View File

@@ -85,6 +85,32 @@ public:
}
};
class npc_ipp_wotlk : public CreatureScript
{
public:
npc_ipp_wotlk() : CreatureScript("npc_ipp_wotlk") { }
struct npc_ipp_wotlkAI: ScriptedAI
{
npc_ipp_wotlkAI(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_5;
}
};
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_ipp_wotlkAI(creature);
}
};
class npc_ipp_aq : public CreatureScript
{
public:
@@ -555,6 +581,7 @@ void AddSC_mod_individual_progression()
new IndividualPlayerProgression_PetScript();
new npc_ipp_aq();
new npc_ipp_tbc();
new npc_ipp_wotlk();
new gobject_ipp_tbc();
new gobject_ipp_wotlk();
}