mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 23:44:51 +08:00
Update IndividualProgressionAwarenessScripts.cpp
This commit is contained in:
@@ -97,6 +97,41 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class gobject_ipp_si : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
gobject_ipp_si() : GameObjectScript("gobject_ipp_si") { }
|
||||
|
||||
struct gobject_ipp_siAI: GameObjectAI
|
||||
{
|
||||
explicit gobject_ipp_siAI(GameObject* object) : GameObjectAI(object) { };
|
||||
|
||||
bool CanBeSeen(Player const* player) override
|
||||
{
|
||||
if (player->IsGameMaster())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Player* target = ObjectAccessor::FindConnectedPlayer(player->GetGUID());
|
||||
|
||||
if (sIndividualProgression->hasPassedProgression(target, PROGRESSION_NAXX40))
|
||||
{
|
||||
return sIndividualProgression->isBeforeProgression(target, PROGRESSION_NAXX40);
|
||||
}
|
||||
else
|
||||
{
|
||||
return sIndividualProgression->hasPassedProgression(target, PROGRESSION_AQ);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
GameObjectAI* GetAI(GameObject* object) const override
|
||||
{
|
||||
return new gobject_ipp_siAI(object);
|
||||
}
|
||||
};
|
||||
|
||||
class gobject_ipp_naxx40 : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
@@ -236,14 +271,49 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class npc_ipp_aqwar : public CreatureScript
|
||||
class npc_ipp_si : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_ipp_aqwar() : CreatureScript("npc_ipp_aqwar") { }
|
||||
npc_ipp_si() : CreatureScript("npc_ipp_si") { }
|
||||
|
||||
struct npc_ipp_aqwarAI: ScriptedAI
|
||||
struct npc_ipp_siAI: ScriptedAI
|
||||
{
|
||||
explicit npc_ipp_aqwarAI(Creature* creature) : ScriptedAI(creature) { };
|
||||
explicit npc_ipp_siAI(Creature* creature) : ScriptedAI(creature) { };
|
||||
|
||||
bool CanBeSeen(Player const* player) override
|
||||
{
|
||||
if (player->IsGameMaster())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Player* target = ObjectAccessor::FindConnectedPlayer(player->GetGUID());
|
||||
|
||||
if (sIndividualProgression->hasPassedProgression(target, PROGRESSION_NAXX40))
|
||||
{
|
||||
return sIndividualProgression->isBeforeProgression(target, PROGRESSION_NAXX40);
|
||||
}
|
||||
else
|
||||
{
|
||||
return sIndividualProgression->hasPassedProgression(target, PROGRESSION_AQ);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_ipp_siAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_ipp_pre_naxx40 : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_ipp_pre_naxx40() : CreatureScript("npc_ipp_pre_naxx40") { }
|
||||
|
||||
struct npc_ipp_pre_naxx40AI: ScriptedAI
|
||||
{
|
||||
explicit npc_ipp_pre_naxx40AI(Creature* creature) : ScriptedAI(creature) { };
|
||||
|
||||
bool CanBeSeen(Player const* player) override
|
||||
{
|
||||
@@ -251,23 +321,14 @@ public:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Player* target = ObjectAccessor::FindConnectedPlayer(player->GetGUID());
|
||||
|
||||
if (sIndividualProgression->hasPassedProgression(target, PROGRESSION_AQ_WAR))
|
||||
{
|
||||
return sIndividualProgression->isBeforeProgression(target, PROGRESSION_AQ_WAR);
|
||||
}
|
||||
else
|
||||
{
|
||||
return sIndividualProgression->hasPassedProgression(target, PROGRESSION_PRE_AQ);
|
||||
}
|
||||
return sIndividualProgression->isBeforeProgression(target, PROGRESSION_AQ);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_ipp_aqwarAI(creature);
|
||||
return new npc_ipp_pre_naxx40AI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -538,15 +599,17 @@ public:
|
||||
// Add all scripts in one
|
||||
void AddSC_mod_individual_progression_awareness()
|
||||
{
|
||||
new gobject_ipp_preaq(); // wanted poster cenarion hold
|
||||
new gobject_ipp_we(); // war effort supplies in cities
|
||||
new gobject_ipp_aqwar(); // aq war crystals
|
||||
new gobject_ipp_preaq(); // wanted poster Cenarion Hold
|
||||
new gobject_ipp_we(); // War Effort supplies in cities
|
||||
new gobject_ipp_aqwar(); // AQ war crystals
|
||||
new gobject_ipp_si(); // Scourge Invasion
|
||||
new gobject_ipp_naxx40();
|
||||
new gobject_ipp_tbc();
|
||||
new gobject_ipp_wotlk();
|
||||
new npc_ipp_preaq(); // cenarion hold npcs
|
||||
new npc_ipp_we(); // war effort npcs in cities
|
||||
// new npc_ipp_aqwar(); // not used atm
|
||||
new npc_ipp_preaq(); // Cenarion Hold NPCs
|
||||
new npc_ipp_we(); // War Effort NPCs in cities
|
||||
new npc_ipp_si(); // Scourge Invasion
|
||||
new npc_ipp_pre_naxx40(); // Scourge Invasion
|
||||
new npc_ipp_naxx40();
|
||||
new npc_ipp_tbc();
|
||||
new npc_ipp_tbc_pre_t4();
|
||||
|
||||
Reference in New Issue
Block a user