fix(Scripts/BRD): Rework Shadowforge Braziers (#8233)
- Both gates should open when both braziers are lit, regardless of the order - Added missing flavor text from Magmus, spoken once the gates open
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1633260465157196700');
|
||||||
|
|
||||||
|
DELETE FROM `creature_text` WHERE `CreatureID` = 9938 AND `GroupID` = 0;
|
||||||
|
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||||
|
(9938, 0, 0, 'Emperor Thaurissan does not wish to be disturbed! Turn back now or face your doom, weak mortals!', 14, 0, 100, 0, 0, 0, 5430, 3, 'Magmus - SAY_MAGMUS_BRAZIERS_LIT');
|
||||||
+27
-23
@@ -23,7 +23,10 @@
|
|||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
#include "WorldSession.h"
|
#include "WorldSession.h"
|
||||||
|
|
||||||
uint32 braziersUsed = 0;
|
enum ShadowforgeBrazier
|
||||||
|
{
|
||||||
|
SAY_MAGMUS_BRAZIER_LIT = 0
|
||||||
|
};
|
||||||
|
|
||||||
//go_shadowforge_brazier
|
//go_shadowforge_brazier
|
||||||
class go_shadowforge_brazier : public GameObjectScript
|
class go_shadowforge_brazier : public GameObjectScript
|
||||||
@@ -34,37 +37,38 @@ public:
|
|||||||
bool OnGossipHello(Player* /*player*/, GameObject* go) override
|
bool OnGossipHello(Player* /*player*/, GameObject* go) override
|
||||||
{
|
{
|
||||||
if (InstanceScript* instance = go->GetInstanceScript())
|
if (InstanceScript* instance = go->GetInstanceScript())
|
||||||
|
{
|
||||||
|
GameObject* northBrazier = ObjectAccessor::GetGameObject(*go, instance->GetGuidData(DATA_SF_BRAZIER_N));
|
||||||
|
GameObject* southBrazier = ObjectAccessor::GetGameObject(*go, instance->GetGuidData(DATA_SF_BRAZIER_S));
|
||||||
|
|
||||||
|
if (!northBrazier || !southBrazier)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if the opposite brazier is lit - if it is, open the gates.
|
||||||
|
if ((go->GetGUID() == northBrazier->GetGUID() && southBrazier->GetGoState() == GO_STATE_ACTIVE)
|
||||||
|
|| (go->GetGUID() == southBrazier->GetGUID() && northBrazier->GetGoState() == GO_STATE_ACTIVE))
|
||||||
{
|
{
|
||||||
if (instance->GetData(TYPE_LYCEUM) == IN_PROGRESS)
|
if (instance->GetData(TYPE_LYCEUM) == IN_PROGRESS)
|
||||||
|
{
|
||||||
instance->SetData(TYPE_LYCEUM, DONE);
|
instance->SetData(TYPE_LYCEUM, DONE);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
instance->SetData(TYPE_LYCEUM, IN_PROGRESS);
|
instance->SetData(TYPE_LYCEUM, IN_PROGRESS);
|
||||||
// If used brazier open linked doors (North or South)
|
|
||||||
if (go->GetGUID() == instance->GetGuidData(DATA_SF_BRAZIER_N))
|
|
||||||
{
|
|
||||||
if (braziersUsed == 0)
|
|
||||||
{
|
|
||||||
braziersUsed = 1;
|
|
||||||
}
|
}
|
||||||
else if(braziersUsed == 2)
|
|
||||||
|
if (Creature* magmus = ObjectAccessor::GetCreature(*go, instance->GetGuidData(DATA_MAGMUS)))
|
||||||
{
|
{
|
||||||
|
if (magmus->IsAlive())
|
||||||
|
{
|
||||||
|
magmus->AI()->Talk(SAY_MAGMUS_BRAZIER_LIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
instance->HandleGameObject(instance->GetGuidData(DATA_GOLEM_DOOR_N), true);
|
instance->HandleGameObject(instance->GetGuidData(DATA_GOLEM_DOOR_N), true);
|
||||||
instance->HandleGameObject(instance->GetGuidData(DATA_GOLEM_DOOR_S), true);
|
instance->HandleGameObject(instance->GetGuidData(DATA_GOLEM_DOOR_S), true);
|
||||||
braziersUsed = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (go->GetGUID() == instance->GetGuidData(DATA_SF_BRAZIER_S))
|
|
||||||
{
|
|
||||||
if (braziersUsed == 0)
|
|
||||||
{
|
|
||||||
braziersUsed = 2;
|
|
||||||
}
|
|
||||||
else if (braziersUsed == 1)
|
|
||||||
{
|
|
||||||
instance->HandleGameObject(instance->GetGuidData(DATA_GOLEM_DOOR_N), true);
|
|
||||||
instance->HandleGameObject(instance->GetGuidData(DATA_GOLEM_DOOR_S), true);
|
|
||||||
braziersUsed = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+8
-1
@@ -70,7 +70,14 @@ enum DataTypes
|
|||||||
DATA_OPEN_COFFER_DOORS = 30,
|
DATA_OPEN_COFFER_DOORS = 30,
|
||||||
|
|
||||||
DATA_GOLEM_LORD_ARGELMACH_INIT = 31,
|
DATA_GOLEM_LORD_ARGELMACH_INIT = 31,
|
||||||
DATA_GOLEM_LORD_ARGELMACH_ADDS = 32
|
DATA_GOLEM_LORD_ARGELMACH_ADDS = 32,
|
||||||
|
|
||||||
|
DATA_MAGMUS = 33
|
||||||
|
};
|
||||||
|
|
||||||
|
enum CreatureIds
|
||||||
|
{
|
||||||
|
NPC_MAGMUS = 9938
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class AI, class T>
|
template <class AI, class T>
|
||||||
|
|||||||
+4
-1
@@ -34,7 +34,6 @@ enum Creatures
|
|||||||
NPC_SEETHREL = 9038,
|
NPC_SEETHREL = 9038,
|
||||||
NPC_GLOOMREL = 9037,
|
NPC_GLOOMREL = 9037,
|
||||||
NPC_DOOMREL = 9039,
|
NPC_DOOMREL = 9039,
|
||||||
NPC_MAGMUS = 9938,
|
|
||||||
NPC_MOIRA = 8929,
|
NPC_MOIRA = 8929,
|
||||||
|
|
||||||
NPC_WATCHMAN_DOOMGRIP = 9476,
|
NPC_WATCHMAN_DOOMGRIP = 9476,
|
||||||
@@ -516,6 +515,10 @@ public:
|
|||||||
return GoGolemSGUID;
|
return GoGolemSGUID;
|
||||||
case DATA_GO_CHALICE:
|
case DATA_GO_CHALICE:
|
||||||
return GoSpectralChaliceGUID;
|
return GoSpectralChaliceGUID;
|
||||||
|
case DATA_MAGMUS:
|
||||||
|
{
|
||||||
|
return MagmusGUID;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ObjectGuid::Empty;
|
return ObjectGuid::Empty;
|
||||||
|
|||||||
Reference in New Issue
Block a user