-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port several TBC raid progression improvements from mod_progression
- Loading branch information
1 parent
19727d9
commit e814c79
Showing
6 changed files
with
243 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* SSC Bosses should only drop 2 pieces of loot - was changed to 3 pieces after WotLK release */ | ||
DELETE FROM `creature_loot_template` WHERE (`Entry` = 21215) AND (`Item` IN (34059)); | ||
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES | ||
(21215, 34059, 34059, 100, 0, 1, 0, 1, 2, 'Leotheras the Blind - (ReferenceTable)'); | ||
|
||
DELETE FROM `creature_loot_template` WHERE (`Entry` = 21214) AND (`Item` IN (34060)); | ||
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES | ||
(21214, 34060, 34060, 100, 0, 1, 0, 1, 2, 'Fathom-Lord Karathress - (ReferenceTable)'); | ||
|
||
DELETE FROM `creature_loot_template` WHERE (`Entry` = 21212) AND (`Item` IN (34062)); | ||
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES | ||
(21212, 34062, 34062, 100, 0, 1, 3, 1, 2, 'Lady Vashj - (ReferenceTable)'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} |