mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
fix(Scripts/Ulduar): Hodir Door (#3346)
Co-authored-by: Krath <affannimattia@libero.it>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user