Scripts/Outland: Fix npc_ancestral_wolf not starting waypoint

Port From (https://github.com/TrinityCore/TrinityCore/commit/913f0903a3264f14ea44356bc86dade81348a546)
This commit is contained in:
hondacrx
2022-01-04 20:01:29 -05:00
parent 4e5db9135d
commit 6fe5a31fab
2 changed files with 71 additions and 66 deletions
+1 -1
View File
@@ -192,7 +192,7 @@ namespace Game.AI
if (summon != null)
{
// Only apply this to specific types of summons
if (!summon.GetVehicle() && ShouldFollowOnSpawn(summon.m_Properties))
if (!summon.GetVehicle() && ShouldFollowOnSpawn(summon.m_Properties) && summon.CanFollowOwner())
{
Unit owner = summon.GetCharmerOrOwner();
if (owner != null)
+5
View File
@@ -31,6 +31,7 @@ namespace Game.Entities
m_summonerGUID = owner != null ? owner.GetGUID() : ObjectGuid.Empty;
UnitTypeMask |= UnitTypeMask.Summon;
m_canFollowOwner = true;
}
public WorldObject GetSummoner()
@@ -307,11 +308,15 @@ namespace Game.Entities
public uint GetTimer() { return m_timer; }
public bool CanFollowOwner() { return m_canFollowOwner; }
public void SetCanFollowOwner(bool can) { m_canFollowOwner = can; }
public SummonPropertiesRecord m_Properties;
TempSummonType m_type;
uint m_timer;
uint m_lifetime;
ObjectGuid m_summonerGUID;
bool m_canFollowOwner;
}
public class Minion : TempSummon