Core/Commands: Fixed .gobject move and turn
This commit is contained in:
@@ -145,12 +145,21 @@ namespace Game.Chat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.DestroyForNearbyPlayers();
|
Map map = obj.GetMap();
|
||||||
obj.RelocateStationaryPosition(x, y, z, obj.GetOrientation());
|
|
||||||
obj.GetMap().GameObjectRelocation(obj, x, y, z, obj.GetOrientation());
|
|
||||||
|
|
||||||
|
obj.Relocate(x, y, z, obj.GetOrientation());
|
||||||
obj.SaveToDB();
|
obj.SaveToDB();
|
||||||
|
|
||||||
|
// Generate a completely new spawn with new guid
|
||||||
|
// client caches recently deleted objects and brings them back to life
|
||||||
|
// when CreateObject block for this guid is received again
|
||||||
|
// however it entirely skips parsing that block and only uses already known location
|
||||||
|
obj.Delete();
|
||||||
|
|
||||||
|
obj = GameObject.CreateGameObjectFromDB(guidLow, map);
|
||||||
|
if (!obj)
|
||||||
|
return false;
|
||||||
|
|
||||||
handler.SendSysMessage(CypherStrings.CommandMoveobjmessage, obj.GetSpawnId(), obj.GetGoInfo().name, obj.GetGUID().ToString());
|
handler.SendSysMessage(CypherStrings.CommandMoveobjmessage, obj.GetSpawnId(), obj.GetGoInfo().name, obj.GetGUID().ToString());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -360,14 +369,22 @@ namespace Game.Chat
|
|||||||
oz = player.GetOrientation();
|
oz = player.GetOrientation();
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.Relocate(obj.GetPositionX(), obj.GetPositionY(), obj.GetPositionZ());
|
Map map = obj.GetMap();
|
||||||
obj.RelocateStationaryPosition(obj.GetPositionX(), obj.GetPositionY(), obj.GetPositionZ(), obj.GetOrientation());
|
|
||||||
obj.SetWorldRotationAngles(oz, oy, ox);
|
|
||||||
obj.DestroyForNearbyPlayers();
|
|
||||||
obj.UpdateObjectVisibility();
|
|
||||||
|
|
||||||
|
obj.Relocate(obj.GetPositionX(), obj.GetPositionY(), obj.GetPositionZ());
|
||||||
|
obj.SetWorldRotationAngles(oz, oy, ox);
|
||||||
obj.SaveToDB();
|
obj.SaveToDB();
|
||||||
|
|
||||||
|
// Generate a completely new spawn with new guid
|
||||||
|
// client caches recently deleted objects and brings them back to life
|
||||||
|
// when CreateObject block for this guid is received again
|
||||||
|
// however it entirely skips parsing that block and only uses already known location
|
||||||
|
obj.Delete();
|
||||||
|
|
||||||
|
obj = GameObject.CreateGameObjectFromDB(guidLow, map);
|
||||||
|
if (!obj)
|
||||||
|
return false;
|
||||||
|
|
||||||
handler.SendSysMessage(CypherStrings.CommandTurnobjmessage, obj.GetSpawnId(), obj.GetGoInfo().name, obj.GetGUID().ToString(), obj.GetOrientation());
|
handler.SendSysMessage(CypherStrings.CommandTurnobjmessage, obj.GetSpawnId(), obj.GetGoInfo().name, obj.GetGUID().ToString(), obj.GetOrientation());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user