Some cleanups. (might break build for scripts as they are a WIP)
This commit is contained in:
@@ -119,7 +119,7 @@ namespace Game.AI
|
||||
public void TriggerAlert(Unit who)
|
||||
{
|
||||
// If there's no target, or target isn't a player do nothing
|
||||
if (!who || !who.IsTypeId(TypeId.Player))
|
||||
if (who == null || !who.IsTypeId(TypeId.Player))
|
||||
return;
|
||||
|
||||
// If this unit isn't an NPC, is already distracted, is fighting, is confused, stunned or fleeing, do nothing
|
||||
@@ -178,7 +178,7 @@ namespace Game.AI
|
||||
if (summon != null)
|
||||
{
|
||||
// Only apply this to specific types of summons
|
||||
if (!summon.GetVehicle() && ShouldFollowOnSpawn(summon.m_Properties) && summon.CanFollowOwner())
|
||||
if (summon.GetVehicle() == null && ShouldFollowOnSpawn(summon.m_Properties) && summon.CanFollowOwner())
|
||||
{
|
||||
Unit owner = summon.GetCharmerOrOwner();
|
||||
if (owner != null)
|
||||
@@ -311,7 +311,7 @@ namespace Game.AI
|
||||
|
||||
public CypherStrings VisualizeBoundary(TimeSpan duration, Unit owner = null, bool fill = false)
|
||||
{
|
||||
if (!owner)
|
||||
if (owner == null)
|
||||
return 0;
|
||||
|
||||
if (_boundary.Empty())
|
||||
@@ -368,7 +368,7 @@ namespace Game.AI
|
||||
{
|
||||
var pos = new Position(startPosition.GetPositionX() + front.Key * SharedConst.BoundaryVisualizeStepSize, startPosition.GetPositionY() + front.Value * SharedConst.BoundaryVisualizeStepSize, spawnZ);
|
||||
TempSummon point = owner.SummonCreature(SharedConst.BoundaryVisualizeCreature, pos, TempSummonType.TimedDespawn, duration);
|
||||
if (point)
|
||||
if (point != null)
|
||||
{
|
||||
point.SetObjectScale(SharedConst.BoundaryVisualizeCreatureScale);
|
||||
point.SetUnitFlag(UnitFlags.Stunned);
|
||||
|
||||
Reference in New Issue
Block a user