Fix(Core/Instance): Chromaggus reset (#10473)
* Fix(Core/BWL): Chromaggus reset * add comment
This commit is contained in:
+19
@@ -67,6 +67,14 @@ enum Events
|
|||||||
EVENT_FRENZY = 5
|
EVENT_FRENZY = 5
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum Misc
|
||||||
|
{
|
||||||
|
DATA_LEVER_USED = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
// not sniffed yet.
|
||||||
|
Position const homePos = { -7487.577148f, -1074.366943f, 476.555023f, 5.325001f };
|
||||||
|
|
||||||
class boss_chromaggus : public CreatureScript
|
class boss_chromaggus : public CreatureScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -187,6 +195,14 @@ public:
|
|||||||
Enraged = false;
|
Enraged = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetData(uint32 id, uint32 /*data*/) override
|
||||||
|
{
|
||||||
|
if (id == DATA_LEVER_USED)
|
||||||
|
{
|
||||||
|
me->SetHomePosition(homePos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_Reset();
|
_Reset();
|
||||||
@@ -314,7 +330,10 @@ class go_chromaggus_lever : public GameObjectScript
|
|||||||
_instance->SetBossState(DATA_CHROMAGGUS, IN_PROGRESS);
|
_instance->SetBossState(DATA_CHROMAGGUS, IN_PROGRESS);
|
||||||
|
|
||||||
if (Creature* creature = _instance->instance->GetCreature(_instance->GetGuidData(DATA_CHROMAGGUS)))
|
if (Creature* creature = _instance->instance->GetCreature(_instance->GetGuidData(DATA_CHROMAGGUS)))
|
||||||
|
{
|
||||||
creature->AI()->AttackStart(player);
|
creature->AI()->AttackStart(player);
|
||||||
|
creature->AI()->SetData(DATA_LEVER_USED, 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (GameObject* go = _instance->instance->GetGameObject(_instance->GetGuidData(DATA_GO_CHROMAGGUS_DOOR)))
|
if (GameObject* go = _instance->instance->GetGameObject(_instance->GetGuidData(DATA_GO_CHROMAGGUS_DOOR)))
|
||||||
_instance->HandleGameObject(ObjectGuid::Empty, true, go);
|
_instance->HandleGameObject(ObjectGuid::Empty, true, go);
|
||||||
|
|||||||
Reference in New Issue
Block a user