Fix an edge case issue where creatures would re-acquire target after respawn if they despawned while spell focusing.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user