mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 23:44:51 +08:00
Caverns of Time door
This commit is contained in:
8
sql/world/base/zone_tanaris.sql
Normal file
8
sql/world/base/zone_tanaris.sql
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
/* Caverns of Time Door */
|
||||||
|
DELETE FROM `gameobject` WHERE `guid`=2993000;
|
||||||
|
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`) VALUES
|
||||||
|
(2993000, 176996, 1, 0, 0, 1, 1, -8173.02, -4747.2, 34.2107, 1.80084, -0, -0, -0.783588, -0.621281, 0, 0, 0, '', 0);
|
||||||
|
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = "go_cavernsoftimedoor" WHERE `entry` = 176996;
|
||||||
|
|
||||||
|
UPDATE `creature` SET `position_x` = -8175.67, `position_y` = -4718.28, `position_z` = 26.3489, `orientation` = 1.88496 WHERE `id1` = 15192;
|
||||||
@@ -32,6 +32,7 @@ void AddSC_boss_thaddius_40();
|
|||||||
void AddSC_npc_omarion();
|
void AddSC_npc_omarion();
|
||||||
void AddSC_Ipp_Wotlk_Modded_Scripts();
|
void AddSC_Ipp_Wotlk_Modded_Scripts();
|
||||||
void AddSC_aq_scripts();
|
void AddSC_aq_scripts();
|
||||||
|
void AddSC_cot_scripts();
|
||||||
|
|
||||||
|
|
||||||
void Addmod_individual_progressionScripts()
|
void Addmod_individual_progressionScripts()
|
||||||
@@ -65,5 +66,6 @@ void Addmod_individual_progressionScripts()
|
|||||||
AddSC_npc_omarion();
|
AddSC_npc_omarion();
|
||||||
AddSC_Ipp_Wotlk_Modded_Scripts();
|
AddSC_Ipp_Wotlk_Modded_Scripts();
|
||||||
AddSC_aq_scripts();
|
AddSC_aq_scripts();
|
||||||
|
AddSC_cot_scripts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
45
src/vanillaScripts/cot_scripts.cpp
Normal file
45
src/vanillaScripts/cot_scripts.cpp
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
#include "IndividualProgression.h"
|
||||||
|
#include "ScriptMgr.h"
|
||||||
|
#include "Player.h"
|
||||||
|
#include "GameObjectAI.h"
|
||||||
|
#include "ScriptedCreature.h"
|
||||||
|
#include "ScriptedGossip.h"
|
||||||
|
|
||||||
|
class go_cavernsoftimedoor : public GameObjectScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
go_cavernsoftimedoor() : GameObjectScript("go_cavernsoftimedoor") { }
|
||||||
|
|
||||||
|
struct go_cavernsoftimedoorAI : GameObjectAI
|
||||||
|
{
|
||||||
|
|
||||||
|
explicit go_cavernsoftimedoorAI(GameObject *object) : GameObjectAI(object)
|
||||||
|
{
|
||||||
|
object->SetGoState(GO_STATE_READY);
|
||||||
|
object->SetGameObjectFlag(GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE);
|
||||||
|
object->EnableCollision(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
bool CanBeSeen(Player const* player) override
|
||||||
|
{
|
||||||
|
if (player->IsGameMaster())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Player* target = ObjectAccessor::FindConnectedPlayer(player->GetGUID());
|
||||||
|
return target->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value < PROGRESSION_NAXX40;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
GameObjectAI *GetAI(GameObject *object) const override
|
||||||
|
{
|
||||||
|
return new go_cavernsoftimedoorAI(object);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void AddSC_cot_scripts()
|
||||||
|
{
|
||||||
|
new go_cavernsoftimedoor();
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user