Misc Fixes

This commit is contained in:
hondacrx
2021-12-01 23:08:19 -05:00
parent 8fa7feb9da
commit f265073720
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -856,7 +856,12 @@ namespace Game.Entities
{
Pet pet = player.GetPet();
if (pet != null && pet.IsAlive() && pet.IsControlled())
pet.GetAI().KilledUnit(victim);
{
if (pet.IsAIEnabled())
pet.GetAI().KilledUnit(victim);
else
Log.outError(LogFilter.Unit, "Pet doesn't have any AI in Unit.Kill()");
}
}
// 10% durability loss on death
@@ -169,7 +169,7 @@ namespace Game.Movement
owner.UpdateAllowedPositionZ(x, y, ref z);
bool success = _path.CalculatePath(x, y, z, owner.CanFly());
if (!success || _path.GetPathType().HasAnyFlag(PathType.NoPath | PathType.Incomplete))
if (!success || _path.GetPathType().HasAnyFlag(PathType.NoPath))
{
if (cOwner)
cOwner.SetCannotReachTarget(true);