mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 08:17:56 +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;
|
addSpawnTimer = 5000;
|
||||||
|
|
||||||
if (pInstance && pInstance->GetData(TYPE_HODIR) != DONE)
|
if (pInstance && pInstance->GetData(TYPE_HODIR) != DONE)
|
||||||
|
{
|
||||||
pInstance->SetData(TYPE_HODIR, NOT_STARTED);
|
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*/)
|
void EnterCombat(Unit* /*pWho*/)
|
||||||
@@ -250,7 +257,14 @@ public:
|
|||||||
me->PlayDirectSound(SOUND_HODIR_AGGRO, 0);
|
me->PlayDirectSound(SOUND_HODIR_AGGRO, 0);
|
||||||
|
|
||||||
if (pInstance && pInstance->GetData(TYPE_HODIR) != DONE)
|
if (pInstance && pInstance->GetData(TYPE_HODIR) != DONE)
|
||||||
|
{
|
||||||
pInstance->SetData(TYPE_HODIR, IN_PROGRESS);
|
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); }
|
void JustReachedHome() { me->setActive(false); }
|
||||||
@@ -307,18 +321,27 @@ public:
|
|||||||
events.Reset();
|
events.Reset();
|
||||||
summons.DespawnAll();
|
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 )
|
if( d->GetGoState() != GO_STATE_ACTIVE )
|
||||||
{
|
{
|
||||||
d->SetLootState(GO_READY);
|
d->SetLootState(GO_READY);
|
||||||
d->UseDoorOrButton(0, false);
|
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 )
|
if( d->GetGoState() != GO_STATE_ACTIVE )
|
||||||
{
|
{
|
||||||
d->SetLootState(GO_READY);
|
d->SetLootState(GO_READY);
|
||||||
d->UseDoorOrButton(0, false);
|
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->MonsterYell(TEXT_HODIR_DEFEATED, LANG_UNIVERSAL, 0);
|
||||||
me->PlayDirectSound(SOUND_HODIR_DEFEATED, 0);
|
me->PlayDirectSound(SOUND_HODIR_DEFEATED, 0);
|
||||||
|
|||||||
@@ -199,6 +199,7 @@ enum UlduarGameObjects
|
|||||||
GO_MIMIRON_DOOR_3 = 194775,
|
GO_MIMIRON_DOOR_3 = 194775,
|
||||||
GO_HODIR_FROZEN_DOOR = 194441,
|
GO_HODIR_FROZEN_DOOR = 194441,
|
||||||
GO_HODIR_DOOR = 194634,
|
GO_HODIR_DOOR = 194634,
|
||||||
|
GO_HODIR_FRONTDOOR = 194442,
|
||||||
GO_VEZAX_DOOR = 194750,
|
GO_VEZAX_DOOR = 194750,
|
||||||
|
|
||||||
GO_SNOW_MOUND = 194907,
|
GO_SNOW_MOUND = 194907,
|
||||||
|
|||||||
Reference in New Issue
Block a user