mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 21:57:01 +01:00
Scripts/BoT: fixed respawn mechanics for Halfus Wyrmbreaker and Ascendant Council that has been broken due to dynamic spawn
This commit is contained in:
@@ -69,6 +69,9 @@ enum BoTDataTypes
|
||||
DATA_COLLAPSING_TWILIGHT_PORTAL_COUNT,
|
||||
DATA_VALIONA_AURA_DUMMY,
|
||||
|
||||
/*Ascendant Council*/
|
||||
DATA_RESPAWN_ASCENDANT_COUNCIL,
|
||||
|
||||
/*Cho'Gall*/
|
||||
DATA_FULL_HEROIC_ID
|
||||
};
|
||||
@@ -196,6 +199,11 @@ enum BoTSpells
|
||||
SPELL_DANCING_FLAMES_VISUAL = 83962
|
||||
};
|
||||
|
||||
enum BoTSpawnGroups
|
||||
{
|
||||
SPAWN_GROUP_ASCENDANT_COUNCIL = 53
|
||||
};
|
||||
|
||||
template<class AI>
|
||||
AI* GetBastionOfTwilightAI(Creature* creature)
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "Player.h"
|
||||
#include "DataStores\DBCStores.h"
|
||||
#include "bastion_of_twilight.h"
|
||||
|
||||
enum Texts
|
||||
@@ -285,6 +286,11 @@ enum AchievementData
|
||||
DATA_ELEMENTARY = 1
|
||||
};
|
||||
|
||||
enum SummonProperties
|
||||
{
|
||||
PROPERTY_DEFAULT = 64
|
||||
};
|
||||
|
||||
Position const arionMiddlePosition = { -1007.961f, -582.0203f, 831.9003f };
|
||||
Position const terrastraMiddlePosition = { -1009.37f, -583.4302f, 831.901f };
|
||||
Position const feludiusMiddlePosition = { -1007.965f, -583.4254f, 831.901f };
|
||||
@@ -301,9 +307,8 @@ class boss_ascendant_council_controller : public CreatureScript
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
if (instance->GetBossState(DATA_ASCENDANT_COUNCIL) != DONE)
|
||||
instance->SetData(DATA_ASCENDANT_COUNCIL, NOT_STARTED);
|
||||
|
||||
_Reset();
|
||||
instance->SetData(DATA_RESPAWN_ASCENDANT_COUNCIL, IN_PROGRESS);
|
||||
events.SetPhase(PHASE_FELUDIUS_IGNACIOUS);
|
||||
}
|
||||
|
||||
@@ -441,6 +446,7 @@ class boss_ascendant_council_controller : public CreatureScript
|
||||
{
|
||||
case EVENT_RESET_BOSS_STATE:
|
||||
instance->SetBossState(DATA_ASCENDANT_COUNCIL, NOT_STARTED);
|
||||
instance->SetData(DATA_RESPAWN_ASCENDANT_COUNCIL, IN_PROGRESS);
|
||||
break;
|
||||
case EVENT_SUMMON_ELEMENTIUM_MONSTROSITY:
|
||||
if (Creature* feludius = instance->GetCreature(DATA_FELUDIUS))
|
||||
@@ -455,7 +461,8 @@ class boss_ascendant_council_controller : public CreatureScript
|
||||
if (Creature* terrastra = instance->GetCreature(DATA_TERRASTRA))
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, terrastra);
|
||||
|
||||
me->GetMap()->SummonCreature(BOSS_ELEMENTIUM_MONSTROSITY, me->GetPosition());
|
||||
if (SummonPropertiesEntry const* entry = sSummonPropertiesStore.LookupEntry(PROPERTY_DEFAULT))
|
||||
me->GetMap()->SummonCreature(BOSS_ELEMENTIUM_MONSTROSITY, me->GetPosition(), entry, 0, me);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -520,7 +527,7 @@ class npc_feludius : public CreatureScript
|
||||
{
|
||||
_EnterEvadeMode();
|
||||
_summons.DespawnAll();
|
||||
me->DespawnOrUnsummon(0, Seconds(30));
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -711,7 +718,7 @@ class npc_ignacious : public CreatureScript
|
||||
{
|
||||
_EnterEvadeMode();
|
||||
_summons.DespawnAll();
|
||||
me->DespawnOrUnsummon(0, Seconds(30));
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
@@ -933,7 +940,7 @@ class npc_arion : public CreatureScript
|
||||
{
|
||||
_EnterEvadeMode();
|
||||
_summons.DespawnAll();
|
||||
me->DespawnOrUnsummon(0, Seconds(30));
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
@@ -1125,7 +1132,7 @@ class npc_terrastra : public CreatureScript
|
||||
{
|
||||
_EnterEvadeMode();
|
||||
_summons.DespawnAll();
|
||||
me->DespawnOrUnsummon(0, Seconds(30));
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
|
||||
@@ -237,23 +237,12 @@ class instance_bastion_of_twilight : public InstanceMapScript
|
||||
|
||||
for (ObjectGuid guid : _halfusEncounterGUIDs)
|
||||
if (Creature* creature = instance->GetCreature(guid))
|
||||
{
|
||||
if (creature->GetEntry() != NPC_ORPHANED_EMERALD_WELP)
|
||||
{
|
||||
creature->SendSetPlayHoverAnim(false);
|
||||
creature->SetDisableGravity(false);
|
||||
creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
|
||||
}
|
||||
|
||||
creature->DespawnOrUnsummon(Milliseconds(0), Seconds(30));
|
||||
}
|
||||
|
||||
if (GameObject* cage = GetGameObject(DATA_WHELP_CAGE))
|
||||
{
|
||||
cage->ResetDoorOrButton();
|
||||
cage->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
cage->DespawnOrUnsummon(Milliseconds(0), Seconds(30));
|
||||
|
||||
_halfusEncounterGUIDs.clear();
|
||||
_deadOrphanedEmeraldWhelps = 0;
|
||||
events.CancelEvent(EVENT_CAST_DANCING_FLAMES);
|
||||
}
|
||||
@@ -267,7 +256,7 @@ class instance_bastion_of_twilight : public InstanceMapScript
|
||||
creature->DespawnOrUnsummon(Milliseconds(0));
|
||||
|
||||
if (GameObject* cage = GetGameObject(DATA_WHELP_CAGE))
|
||||
cage->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
cage->DespawnOrUnsummon(Milliseconds(0));
|
||||
|
||||
events.CancelEvent(EVENT_CAST_DANCING_FLAMES);
|
||||
}
|
||||
@@ -424,6 +413,11 @@ class instance_bastion_of_twilight : public InstanceMapScript
|
||||
SaveToDB();
|
||||
}
|
||||
break;
|
||||
case DATA_RESPAWN_ASCENDANT_COUNCIL:
|
||||
if (!GetCreature(DATA_FELUDIUS))
|
||||
if (instance->IsSpawnGroupActive(SPAWN_GROUP_ASCENDANT_COUNCIL))
|
||||
instance->SpawnGroupSpawn(SPAWN_GROUP_ASCENDANT_COUNCIL, true, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user