mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 23:44:51 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19727d9f0e | ||
|
|
a92ce5b139 | ||
|
|
e34fbacba4 | ||
|
|
803638a767 | ||
|
|
c9d5eefa8b |
3
sql/world/base/aq_gate.sql
Normal file
3
sql/world/base/aq_gate.sql
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
UPDATE `acore_world`.`gameobject_template` SET `ScriptName`='aq_gate' WHERE `entry`=176148;
|
||||||
|
UPDATE `acore_world`.`gameobject_template` SET `ScriptName`='aq_gate' WHERE `entry`=176147;
|
||||||
|
UPDATE `acore_world`.`gameobject_template` SET `ScriptName`='aq_gate' WHERE `entry`=176146;
|
||||||
@@ -27,7 +27,10 @@ UPDATE `creature_template` SET `ScriptName` = 'npc_ipp_wotlk_icc' WHERE `entry`
|
|||||||
UPDATE `gameobject_template` SET `ScriptName` = 'gobject_ipp_tbc' WHERE `entry` IN (195141);
|
UPDATE `gameobject_template` SET `ScriptName` = 'gobject_ipp_tbc' WHERE `entry` IN (195141);
|
||||||
|
|
||||||
-- Drop source for 2.3 Jewelcrafting Recipe
|
-- Drop source for 2.3 Jewelcrafting Recipe
|
||||||
UPDATE `creature_template` SET `ScriptName` = 'npc_ipp_tbc_t4' WHERE `entry` = 19768;
|
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
|
-- 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,
|
UPDATE `creature` SET `phaseMask` = @IPPPHASE WHERE `guid` IN (25, 63129, 63236, 63370, 63371, 65274, 65275, 65283, 65284, 65285, 65325, 65327, 65350, 65351, 65371, 65451,
|
||||||
|
|||||||
@@ -104,6 +104,32 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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
|
class npc_ipp_tbc_pre_t4 : public CreatureScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -323,6 +349,7 @@ void AddSC_mod_individual_progression_awareness()
|
|||||||
new npc_ipp_ds2();
|
new npc_ipp_ds2();
|
||||||
new npc_ipp_tbc();
|
new npc_ipp_tbc();
|
||||||
new npc_ipp_tbc_t4();
|
new npc_ipp_tbc_t4();
|
||||||
|
new npc_ipp_tbc_t5();
|
||||||
new npc_ipp_tbc_pre_t4();
|
new npc_ipp_tbc_pre_t4();
|
||||||
new npc_ipp_wotlk();
|
new npc_ipp_wotlk();
|
||||||
new npc_ipp_wotlk_ulduar();
|
new npc_ipp_wotlk_ulduar();
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#include "IndividualProgression.h"
|
||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "GameObjectAI.h"
|
#include "GameObjectAI.h"
|
||||||
@@ -61,17 +62,32 @@ public:
|
|||||||
{
|
{
|
||||||
switch (eventStage)
|
switch (eventStage)
|
||||||
{
|
{
|
||||||
case STAGE_OPEN_GATES:
|
case STAGE_OPEN_GATES:
|
||||||
return HandleOpeningStage();
|
HandleOpeningStage();
|
||||||
case STAGE_WAR:
|
break;
|
||||||
return HandleWarStage();
|
case STAGE_WAR:
|
||||||
case STAGE_RESET:
|
HandleWarStage();
|
||||||
return ResetAQGates();
|
break;
|
||||||
|
case STAGE_RESET:
|
||||||
|
ResetAQGates();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
eventTimer -= diff;
|
eventTimer -= diff;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
bool CanBeSeen(Player const* player) override
|
||||||
|
{
|
||||||
|
Player* target = ObjectAccessor::FindConnectedPlayer(player->GetGUID());
|
||||||
|
if (!target)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sIndividualProgression->isBeforeProgression(target, PROGRESSION_AQ);
|
||||||
|
}
|
||||||
|
|
||||||
void NextStage(uint32 timeUntil = 100)
|
void NextStage(uint32 timeUntil = 100)
|
||||||
{
|
{
|
||||||
@@ -84,28 +100,26 @@ public:
|
|||||||
{
|
{
|
||||||
switch (eventStep)
|
switch (eventStep)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
go_aq_gate_roots->ResetDoorOrButton();
|
go_aq_gate_roots->ResetDoorOrButton();
|
||||||
go_aq_gate_roots->UseDoorOrButton();
|
go_aq_gate_roots->UseDoorOrButton();
|
||||||
me->PlayDirectSound(SOUND_ROOTS_OPEN);
|
me->PlayDirectSound(SOUND_ROOTS_OPEN);
|
||||||
|
eventTimer = 5000;
|
||||||
|
break;
|
||||||
|
|
||||||
eventTimer = 5000;
|
case 1:
|
||||||
break;
|
go_aq_gate_runes->ResetDoorOrButton();
|
||||||
|
go_aq_gate_runes->UseDoorOrButton();
|
||||||
|
me->PlayDirectSound(SOUND_RUNES_OPEN);
|
||||||
|
eventTimer = 8000;
|
||||||
|
break;
|
||||||
|
|
||||||
case 1:
|
case 2:
|
||||||
go_aq_gate_runes->ResetDoorOrButton();
|
go_aq_barrier->ResetDoorOrButton();
|
||||||
go_aq_gate_runes->UseDoorOrButton();
|
go_aq_barrier->UseDoorOrButton();
|
||||||
me->PlayDirectSound(SOUND_RUNES_OPEN);
|
me->PlayDirectSound(SOUND_DOOR_OPEN);
|
||||||
|
NextStage(10000);
|
||||||
eventTimer = 8000;
|
return;
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
go_aq_barrier->ResetDoorOrButton();
|
|
||||||
go_aq_barrier->UseDoorOrButton();
|
|
||||||
me->PlayDirectSound(SOUND_DOOR_OPEN);
|
|
||||||
|
|
||||||
NextStage(10000);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
eventStep++;
|
eventStep++;
|
||||||
@@ -117,15 +131,8 @@ public:
|
|||||||
NextStage(5 * MINUTE * IN_MILLISECONDS);
|
NextStage(5 * MINUTE * IN_MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventDone()
|
|
||||||
{
|
|
||||||
NextStage(0);
|
|
||||||
eventStage = STAGE_OPEN_GATES;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ResetAQGates()
|
void ResetAQGates()
|
||||||
{
|
{
|
||||||
// go_aq_ghost_gate->SetGoState(GO_STATE_READY);
|
|
||||||
go_aq_barrier->SetGoState(GO_STATE_READY);
|
go_aq_barrier->SetGoState(GO_STATE_READY);
|
||||||
go_aq_gate_runes->SetGoState(GO_STATE_READY);
|
go_aq_gate_runes->SetGoState(GO_STATE_READY);
|
||||||
go_aq_gate_roots->ResetDoorOrButton();
|
go_aq_gate_roots->ResetDoorOrButton();
|
||||||
@@ -134,6 +141,13 @@ public:
|
|||||||
EventDone();
|
EventDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EventDone()
|
||||||
|
{
|
||||||
|
NextStage(0);
|
||||||
|
eventStage = STAGE_OPEN_GATES; // Reset to the initial stage for potential future events
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void OpenGate(Player *player, bool announce)
|
void OpenGate(Player *player, bool announce)
|
||||||
{
|
{
|
||||||
go_aq_barrier = GetClosestGameObjectWithEntry(me, GO_GATE_OF_AHN_QIRAJ, 150);
|
go_aq_barrier = GetClosestGameObjectWithEntry(me, GO_GATE_OF_AHN_QIRAJ, 150);
|
||||||
@@ -188,8 +202,37 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class aq_gate : public GameObjectScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
aq_gate() : GameObjectScript("aq_gate") {}
|
||||||
|
|
||||||
|
struct aq_gateAI : public GameObjectAI
|
||||||
|
{
|
||||||
|
explicit aq_gateAI(GameObject* go) : GameObjectAI(go) {}
|
||||||
|
|
||||||
|
bool CanBeSeen(Player const* player) override
|
||||||
|
{
|
||||||
|
|
||||||
|
Player* target = ObjectAccessor::FindConnectedPlayer(player->GetGUID());
|
||||||
|
if (!target)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sIndividualProgression->isBeforeProgression(target, PROGRESSION_AQ);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
GameObjectAI* GetAI(GameObject* go) const override
|
||||||
|
{
|
||||||
|
return new aq_gateAI(go);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_aq_scripts()
|
void AddSC_aq_scripts()
|
||||||
{
|
{
|
||||||
|
new aq_gate();
|
||||||
new gobject_scarab_gong();
|
new gobject_scarab_gong();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user