вывод из самбомудлей модов для азероткор
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
||||
*/
|
||||
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
enum BlackUrn
|
||||
{
|
||||
DATA_NIGHTBANE = 11,
|
||||
NPC_NIGHTBANE = 17225,
|
||||
ITEM_BLACKENED_URN = 24140
|
||||
};
|
||||
|
||||
class go_blackened_urn_70 : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_blackened_urn_70() : GameObjectScript("go_blackened_urn") { }
|
||||
|
||||
//if we summon an entity instead of using a sort of invisible entity, we could unsummon boss on reset
|
||||
//right now that doesn't work because of how the urn works
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
|
||||
if (player->HasItemCount(ITEM_BLACKENED_URN, 1))
|
||||
{
|
||||
if (InstanceScript* pInstance = go->GetInstanceScript())
|
||||
{
|
||||
if (pInstance->GetData(DATA_NIGHTBANE) != DONE && !go->FindNearestCreature(NPC_NIGHTBANE, 40.0f))
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*player, pInstance->GetGuidData(DATA_NIGHTBANE)))
|
||||
cr->AI()->DoAction(0 /*ACTION_START_INTRO */);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player->SendSystemMessage("You must possess a Blackened Urn in order to summon Nightbane!");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_karazhan_70()
|
||||
{
|
||||
new go_blackened_urn_70();
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
||||
*/
|
||||
|
||||
#include "Config.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
enum SSCMisc
|
||||
{
|
||||
GO_LADY_VASHJ_BRIDGE_CONSOLE = 184568,
|
||||
MAP_SSC = 548,
|
||||
DATA_LURKER = 1,
|
||||
DATA_VASHJ = 6
|
||||
};
|
||||
|
||||
class GlobalSerpentshrineScript : public GlobalScript
|
||||
{
|
||||
public:
|
||||
GlobalSerpentshrineScript() : GlobalScript("GlobalSerpentshrineScript") { }
|
||||
|
||||
bool IsAnyBossAlive(Map* map, uint32 bossId = 0, uint32 newState = 0)
|
||||
{
|
||||
if (InstanceMap* instanceMap = map->ToInstanceMap())
|
||||
{
|
||||
if (InstanceScript* instance = instanceMap->GetInstanceScript())
|
||||
{
|
||||
uint32 bossCount = instance->GetEncounterCount() - 3;
|
||||
for (uint8 id = 0; id <= bossCount; ++id)
|
||||
{
|
||||
if (id == bossId && newState == DONE)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (id == DATA_LURKER)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (instance->GetBossState(id) != DONE)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void AfterInstanceGameObjectCreate(Map* map, GameObject* go) override
|
||||
{
|
||||
if (sConfigMgr->GetOption<int>("IndividualProgression.SerpentshrineCavern.RequireAllBosses", 1))
|
||||
{
|
||||
if (go->GetEntry() == GO_LADY_VASHJ_BRIDGE_CONSOLE)
|
||||
{
|
||||
if (IsAnyBossAlive(map))
|
||||
{
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnLoadSpellCustomAttr(SpellInfo* spellInfo) override
|
||||
{
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
case 38236: // Caribdis - Spawn Spitfire Totem
|
||||
spellInfo->Effects[EFFECT_0].BasePoints = 70000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnBeforeSetBossState(uint32 bossId, EncounterState newState, EncounterState /*oldState*/, Map* map) override
|
||||
{
|
||||
if (sConfigMgr->GetOption<int>("IndividualProgression.SerpentshrineCavern.RequireAllBosses", 1))
|
||||
{
|
||||
if (map->GetEntry()->MapID == MAP_SSC)
|
||||
{
|
||||
if (InstanceMap* instanceMap = map->ToInstanceMap())
|
||||
{
|
||||
if (InstanceScript* instance = instanceMap->GetInstanceScript())
|
||||
{
|
||||
if (!IsAnyBossAlive(map, bossId, newState))
|
||||
{
|
||||
if (Creature* vashj = instance->GetCreature(DATA_VASHJ))
|
||||
{
|
||||
if (GameObject* console = vashj->FindNearestGameObject(GO_LADY_VASHJ_BRIDGE_CONSOLE, 600.0f))
|
||||
{
|
||||
console->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_serpentshrine_cavern_70()
|
||||
{
|
||||
new GlobalSerpentshrineScript();
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
||||
*/
|
||||
|
||||
#include "Config.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
enum SSCMisc
|
||||
{
|
||||
GO_RIGHT_KAEL_DOOR = 184327,
|
||||
GO_LEFT_KAEL_DOOR = 184329,
|
||||
MAP_TK = 550,
|
||||
DATA_KAEL = 3
|
||||
};
|
||||
|
||||
class GlobalTheEyeScript : public GlobalScript
|
||||
{
|
||||
public:
|
||||
GlobalTheEyeScript() : GlobalScript("GlobalTheEyeScript") { }
|
||||
|
||||
bool IsAnyBossAlive(Map* map, uint32 bossId = 0, uint32 newState = 0)
|
||||
{
|
||||
if (InstanceMap* instanceMap = map->ToInstanceMap())
|
||||
{
|
||||
if (InstanceScript* instance = instanceMap->GetInstanceScript())
|
||||
{
|
||||
uint32 bossCount = instance->GetEncounterCount() - 1;
|
||||
for (uint8 id = 0; id < bossCount; ++id)
|
||||
{
|
||||
if (id == bossId && newState == DONE)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (instance->GetBossState(id) != DONE)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void AfterInstanceGameObjectCreate(Map* map, GameObject* go) override
|
||||
{
|
||||
if (sConfigMgr->GetOption<int>("IndividualProgression.TheEye.RequireAllBosses", 1))
|
||||
{
|
||||
if (go->GetEntry() == GO_RIGHT_KAEL_DOOR || go->GetEntry() == GO_LEFT_KAEL_DOOR)
|
||||
{
|
||||
if (IsAnyBossAlive(map))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnBeforeSetBossState(uint32 bossId, EncounterState newState, EncounterState /*oldState*/, Map* map) override
|
||||
{
|
||||
if (sConfigMgr->GetOption<int>("IndividualProgression.TheEye.RequireAllBosses", 1))
|
||||
{
|
||||
if (map->GetEntry()->MapID == MAP_TK)
|
||||
{
|
||||
if (InstanceMap* instanceMap = map->ToInstanceMap())
|
||||
{
|
||||
if (InstanceScript* instance = instanceMap->GetInstanceScript())
|
||||
{
|
||||
if (!IsAnyBossAlive(map, bossId, newState))
|
||||
{
|
||||
if (Creature* kael = instance->GetCreature(DATA_KAEL))
|
||||
{
|
||||
if (GameObject* rightDoor = kael->FindNearestGameObject(GO_RIGHT_KAEL_DOOR, 600.0f))
|
||||
{
|
||||
if (GameObject* leftDoor = kael->FindNearestGameObject(GO_LEFT_KAEL_DOOR, 600.0f))
|
||||
{
|
||||
rightDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
leftDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_the_eye_70()
|
||||
{
|
||||
new GlobalTheEyeScript();
|
||||
}
|
||||
Reference in New Issue
Block a user