fix(Scripts/BlackwingLair): Correct Bone Constructs abilities (#12180)

This commit is contained in:
Skjalf
2022-06-26 04:45:15 -03:00
committed by GitHub
parent f78ccf2621
commit 46789d5df6
4 changed files with 16 additions and 3 deletions

View File

@@ -487,7 +487,7 @@ bool Creature::InitEntry(uint32 Entry, const CreatureData* data)
return true;
}
bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changelevel)
bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changelevel, bool updateAI)
{
if (!InitEntry(Entry, data))
return false;
@@ -596,6 +596,12 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele
SetDetectionDistance(cInfo->detection_range);
LoadSpellTemplateImmunity();
if (updateAI)
{
AIM_Initialize();
}
return true;
}

View File

@@ -169,7 +169,8 @@ public:
void UpdateMovementFlags();
uint32 GetRandomId(uint32 id1, uint32 id2, uint32 id3);
bool UpdateEntry(uint32 entry, const CreatureData* data = nullptr, bool changelevel = true );
bool UpdateEntry(uint32 entry, const CreatureData* data = nullptr, bool changelevel = true, bool updateAI = false);
bool UpdateEntry(uint32 entry, bool updateAI) { return UpdateEntry(entry, nullptr, true, updateAI); }
bool UpdateStats(Stats stat) override;
bool UpdateAllStats() override;
void UpdateResistances(uint32 school) override;

View File

@@ -982,7 +982,7 @@ struct npc_drakonid_spawner : public ScriptedAI
{
if (Creature* construct = ObjectAccessor::GetCreature(*me, summonGuid))
{
construct->UpdateEntry(NPC_BONE_CONSTRUCT);
construct->UpdateEntry(NPC_BONE_CONSTRUCT, true);
construct->SetReactState(REACT_PASSIVE);
construct->SetStandState(UNIT_STAND_STATE_DEAD);
construct->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);