Fixed Unknown pet names.
Fixed Pet's not having a valid position.
This commit is contained in:
+10
-1
@@ -178,9 +178,9 @@ namespace Game.Entities
|
||||
SetFaction(owner.getFaction());
|
||||
SetUInt32Value(UnitFields.CreatedBySpell, summonSpellId);
|
||||
|
||||
float px, py, pz;
|
||||
if (IsCritter())
|
||||
{
|
||||
float px, py, pz;
|
||||
owner.GetClosePoint(out px, out py, out pz, GetObjectSize(), SharedConst.PetFollowDist, GetFollowAngle());
|
||||
Relocate(px, py, pz, owner.GetOrientation());
|
||||
|
||||
@@ -234,6 +234,15 @@ namespace Game.Entities
|
||||
|
||||
SynchronizeLevelWithOwner();
|
||||
|
||||
// Set pet's position after setting level, its size depends on it
|
||||
owner.GetClosePoint(out px, out py, out pz, GetObjectSize(), SharedConst.PetFollowDist, GetFollowAngle());
|
||||
Relocate(px, py, pz, owner.GetOrientation());
|
||||
if (!IsPositionValid())
|
||||
{
|
||||
Log.outError(LogFilter.Pet, "Pet ({0}, entry {1}) not loaded. Suggested coordinates isn't valid (X: {2} Y: {3})", GetGUID().ToString(), GetEntry(), GetPositionX(), GetPositionY());
|
||||
return false;
|
||||
}
|
||||
|
||||
SetReactState((ReactStates)result.Read<byte>(6));
|
||||
SetCanModifyStats(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user