fix(Scripts/Ulduar): Hodir Door (#3346)

Co-authored-by: Krath <affannimattia@libero.it>
This commit is contained in:
Krath
2020-09-12 20:10:12 +02:00
committed by GitHub
parent 9d32baca32
commit ce8db433cf
2 changed files with 26 additions and 2 deletions

View File

@@ -227,7 +227,14 @@ public:
addSpawnTimer = 5000;
if (pInstance && pInstance->GetData(TYPE_HODIR) != DONE)
{
pInstance->SetData(TYPE_HODIR, NOT_STARTED);
}
if (GameObject* go = me->FindNearestGameObject(GO_HODIR_FRONTDOOR, 300.0f))
{
go->SetGoState(GO_STATE_ACTIVE);
}
}
void EnterCombat(Unit* /*pWho*/)
@@ -250,7 +257,14 @@ public:
me->PlayDirectSound(SOUND_HODIR_AGGRO, 0);
if (pInstance && pInstance->GetData(TYPE_HODIR) != DONE)
{
pInstance->SetData(TYPE_HODIR, IN_PROGRESS);
}
if (GameObject* go = me->FindNearestGameObject(GO_HODIR_FRONTDOOR, 300.0f))
{
go->SetGoState(GO_STATE_READY);
}
}
void JustReachedHome() { me->setActive(false); }
@@ -307,18 +321,27 @@ public:
events.Reset();
summons.DespawnAll();
if( GameObject* d = me->FindNearestGameObject(GO_HODIR_FROZEN_DOOR, 250.0f) )
if( GameObject* d = me->FindNearestGameObject(GO_HODIR_FROZEN_DOOR, 250.0f))
{
if( d->GetGoState() != GO_STATE_ACTIVE )
{
d->SetLootState(GO_READY);
d->UseDoorOrButton(0, false);
}
if( GameObject* d = me->FindNearestGameObject(GO_HODIR_DOOR, 250.0f) )
}
if (GameObject* d = me->FindNearestGameObject(GO_HODIR_DOOR, 250.0f))
{
if( d->GetGoState() != GO_STATE_ACTIVE )
{
d->SetLootState(GO_READY);
d->UseDoorOrButton(0, false);
}
}
if (GameObject* go = me->FindNearestGameObject(GO_HODIR_FRONTDOOR, 300.0f))
{
go->SetGoState(GO_STATE_ACTIVE);
}
me->MonsterYell(TEXT_HODIR_DEFEATED, LANG_UNIVERSAL, 0);
me->PlayDirectSound(SOUND_HODIR_DEFEATED, 0);

View File

@@ -199,6 +199,7 @@ enum UlduarGameObjects
GO_MIMIRON_DOOR_3 = 194775,
GO_HODIR_FROZEN_DOOR = 194441,
GO_HODIR_DOOR = 194634,
GO_HODIR_FRONTDOOR = 194442,
GO_VEZAX_DOOR = 194750,
GO_SNOW_MOUND = 194907,