diff --git a/Game/Entities/Creature/Creature.cs b/Game/Entities/Creature/Creature.cs index 1e00b8a6a..6537f1344 100644 --- a/Game/Entities/Creature/Creature.cs +++ b/Game/Entities/Creature/Creature.cs @@ -1581,6 +1581,7 @@ namespace Game.Entities SaveRespawnTime(); ReleaseFocus(null, false); // remove spellcast focus + DoNotReacquireTarget(); // cancel delayed re-target SetTarget(ObjectGuid.Empty); // drop target - dead mobs shouldn't ever target things SetUInt64Value(UnitFields.NpcFlags, (ulong)NPCFlags.None); @@ -1689,6 +1690,8 @@ namespace Game.Entities } GetMotionMaster().InitDefault(); + //Re-initialize reactstate that could be altered by movementgenerators + InitializeReactState(); //Call AI respawn virtual function if (IsAIEnabled) @@ -1700,9 +1703,6 @@ namespace Game.Entities uint poolid = GetSpawnId() != 0 ? Global.PoolMgr.IsPartOfAPool(GetSpawnId()) : 0; if (poolid != 0) Global.PoolMgr.UpdatePool(poolid, GetSpawnId()); - - //Re-initialize reactstate that could be altered by movementgenerators - InitializeReactState(); } UpdateObjectVisibility(); @@ -2833,6 +2833,13 @@ namespace Game.Entities public void MustReacquireTarget() { m_shouldReacquireTarget = true; } // flags the Creature for forced (client displayed) target reacquisition in the next Update call + public void DoNotReacquireTarget() + { + m_shouldReacquireTarget = false; + m_suppressedTarget = ObjectGuid.Empty; + m_suppressedOrientation = 0.0f; + } + public ulong GetSpawnId() { return m_spawnId; } public void SetCorpseDelay(uint delay) { m_corpseDelay = delay; } diff --git a/Scripts/Northrend/AzjolNerub/AzjolNerub/BossAnubarak.cs b/Scripts/Northrend/AzjolNerub/AzjolNerub/BossAnubarak.cs index 8eea2a6f6..ea7266761 100644 --- a/Scripts/Northrend/AzjolNerub/AzjolNerub/BossAnubarak.cs +++ b/Scripts/Northrend/AzjolNerub/AzjolNerub/BossAnubarak.cs @@ -111,6 +111,8 @@ namespace Scripts.Northrend.AzjolNerub.AzjolNerub.Anubarak _petCount = 0; } + public override bool CanAIAttack(Unit victim) { return true; } // do not check boundary here + public override void EnterCombat(Unit who) { base.EnterCombat(who); @@ -118,6 +120,9 @@ namespace Scripts.Northrend.AzjolNerub.AzjolNerub.Anubarak GameObject door = instance.GetGameObject(ANDataTypes.AnubarakWall); if (door) door.SetGoState(GameObjectState.Active); // open door for now + GameObject door2 = instance.GetGameObject(ANDataTypes.AnubarakWall2); + if (door2) + door2.SetGoState(GameObjectState.Active); Talk(TextIds.SayAggro); instance.DoStartCriteriaTimer(CriteriaTimedTypes.Event, Misc.AchievGottaGoStartEvent); @@ -172,6 +177,9 @@ namespace Scripts.Northrend.AzjolNerub.AzjolNerub.Anubarak GameObject door = instance.GetGameObject(ANDataTypes.AnubarakWall); if (door) door.SetGoState(GameObjectState.Ready); + GameObject door2 = instance.GetGameObject(ANDataTypes.AnubarakWall2); + if (door2) + door2.SetGoState(GameObjectState.Ready); break; case EventIds.Pound: DoCastVictim(SpellIds.Pound); diff --git a/Scripts/Northrend/AzjolNerub/AzjolNerub/BossNadronox.cs b/Scripts/Northrend/AzjolNerub/AzjolNerub/BossNadronox.cs index eafe167c7..259aee42c 100644 --- a/Scripts/Northrend/AzjolNerub/AzjolNerub/BossNadronox.cs +++ b/Scripts/Northrend/AzjolNerub/AzjolNerub/BossNadronox.cs @@ -706,12 +706,14 @@ namespace Scripts.Northrend.AzjolNerub.AzjolNerub.Nadronox if (hadronox && hadronox.IsAlive()) { if (_nextMovement != MovementIds.HadronoxReal) + { if (hadronox.GetPositionZ() < zCutoff) { me.GetMotionMaster().MovePoint((uint)MovementIds.Hadronox, Misc.hadronoxStep[2]); break; } - me.GetMotionMaster().MoveChase(hadronox); + } + AttackStart(hadronox); } break; } diff --git a/Scripts/Northrend/AzjolNerub/AzjolNerub/InstanceAzjolNerub.cs b/Scripts/Northrend/AzjolNerub/AzjolNerub/InstanceAzjolNerub.cs index 336b15e4b..17ec7a731 100644 --- a/Scripts/Northrend/AzjolNerub/AzjolNerub/InstanceAzjolNerub.cs +++ b/Scripts/Northrend/AzjolNerub/AzjolNerub/InstanceAzjolNerub.cs @@ -34,6 +34,7 @@ namespace Scripts.Northrend.AzjolNerub.AzjolNerub public const uint WatcherGashra = 4; public const uint WatcherSilthik = 5; public const uint AnubarakWall = 6; + public const uint AnubarakWall2 = 7; } struct ANCreatureIds @@ -83,7 +84,8 @@ namespace Scripts.Northrend.AzjolNerub.AzjolNerub public static ObjectData[] gameobjectData = { - new ObjectData(ANGameObjectIds.AnubarakDoor3, ANDataTypes.AnubarakWall) + new ObjectData(ANGameObjectIds.AnubarakDoor1, ANDataTypes.AnubarakWall), + new ObjectData(ANGameObjectIds.AnubarakDoor3, ANDataTypes.AnubarakWall2) }; public static BossBoundaryEntry[] boundaries = @@ -121,7 +123,18 @@ namespace Scripts.Northrend.AzjolNerub.AzjolNerub if (gatewatcher) gatewatcher.GetAI().DoAction(-ANInstanceMisc.ActionGatewatcherGreet); } - } + + public override bool CheckRequiredBosses(uint bossId, Player player) + { + if (_SkipCheckRequiredBosses(player)) + return true; + + if (bossId > ANDataTypes.KrikthirTheGatewatcher && GetBossState(ANDataTypes.KrikthirTheGatewatcher) != EncounterState.Done) + return false; + + return true; + } + } public override InstanceScript GetInstanceScript(InstanceMap map) {