Fixes creatures moving to different cells/grids, Some work on fixing pets.
This commit is contained in:
@@ -4622,12 +4622,15 @@ namespace Game.Entities
|
|||||||
if (duration > 0)
|
if (duration > 0)
|
||||||
pet.SetDuration(duration);
|
pet.SetDuration(duration);
|
||||||
|
|
||||||
return null;
|
return pet;
|
||||||
}
|
}
|
||||||
|
|
||||||
// petentry == 0 for hunter "call pet" (current pet summoned if any)
|
// petentry == 0 for hunter "call pet" (current pet summoned if any)
|
||||||
if (entry == 0)
|
if (entry == 0)
|
||||||
|
{
|
||||||
|
pet.Dispose();
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// only SUMMON_PET are handled here
|
// only SUMMON_PET are handled here
|
||||||
|
|
||||||
@@ -4636,6 +4639,7 @@ namespace Game.Entities
|
|||||||
{
|
{
|
||||||
Log.outError(LogFilter.Server, "Pet (guidlow {0}, entry {1}) not summoned. Suggested coordinates isn't valid (X: {2} Y: {3})",
|
Log.outError(LogFilter.Server, "Pet (guidlow {0}, entry {1}) not summoned. Suggested coordinates isn't valid (X: {2} Y: {3})",
|
||||||
pet.GetGUID().ToString(), pet.GetEntry(), pet.GetPositionX(), pet.GetPositionY());
|
pet.GetGUID().ToString(), pet.GetEntry(), pet.GetPositionX(), pet.GetPositionY());
|
||||||
|
pet.Dispose();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4644,6 +4648,7 @@ namespace Game.Entities
|
|||||||
if (!pet.Create(map.GenerateLowGuid(HighGuid.Pet), map, entry, petNumber))
|
if (!pet.Create(map.GenerateLowGuid(HighGuid.Pet), map, entry, petNumber))
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Server, "no such creature entry {0}", entry);
|
Log.outError(LogFilter.Server, "no such creature entry {0}", entry);
|
||||||
|
pet.Dispose();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1176,7 +1176,7 @@ namespace Game.Maps
|
|||||||
}
|
}
|
||||||
|
|
||||||
creature._moveState = ObjectCellMoveState.None;
|
creature._moveState = ObjectCellMoveState.None;
|
||||||
if (creature.IsInWorld)
|
if (!creature.IsInWorld)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// do move or do move to respawn or remove creature if previous all fail
|
// do move or do move to respawn or remove creature if previous all fail
|
||||||
|
|||||||
@@ -208,8 +208,6 @@ namespace Game.Movement
|
|||||||
return _abstractFollower.GetTarget();
|
return _abstractFollower.GetTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public override MovementGeneratorType GetMovementGeneratorType() { return MovementGeneratorType.Follow; }
|
public override MovementGeneratorType GetMovementGeneratorType() { return MovementGeneratorType.Follow; }
|
||||||
|
|
||||||
public override void UnitSpeedChanged() { _lastTargetPosition = null; }
|
public override void UnitSpeedChanged() { _lastTargetPosition = null; }
|
||||||
|
|||||||
Reference in New Issue
Block a user