Core/Objects: Cleanup SmoothPhasing code - move to separate files and better integrate it with visibility system
Port From (https://github.com/TrinityCore/TrinityCore/commit/70442041300bb0a1146717497fd5f771d874befa)
This commit is contained in:
@@ -662,19 +662,6 @@ namespace Game
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void ReplaceObject(WorldObject obj, WorldObject newObject, ObjectGuid replacedObjectGuid, bool stopAnimKits = true)
|
||||
{
|
||||
WorldObject replacedObject = Global.ObjAccessor.GetWorldObject(obj, replacedObjectGuid);
|
||||
if (replacedObject == null)
|
||||
return;
|
||||
|
||||
replacedObject.ReplaceWith(obj, newObject, stopAnimKits);
|
||||
|
||||
Player player = obj.ToPlayer();
|
||||
if (player != null)
|
||||
player.UpdateVisibilityOf(new[] { newObject, replacedObject });
|
||||
}
|
||||
|
||||
static void UpdateVisibilityIfNeeded(WorldObject obj, bool updateVisibility, bool changed)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user