From 5f0af0e527253538c407a89b80b0258cfa3c0f85 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 8 Nov 2021 10:38:55 -0500 Subject: [PATCH] Core/Misc: Fixed facing after using areatrigger teleports and graveyard orientations Port From (https://github.com/TrinityCore/TrinityCore/commit/4fd4d283542600fd25a9e4a4a280f33fee6c87d0) --- Source/Game/Globals/ObjectManager.cs | 2 +- sql/updates/world/master/2021_11_06_05_world.sql | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 sql/updates/world/master/2021_11_06_05_world.sql diff --git a/Source/Game/Globals/ObjectManager.cs b/Source/Game/Globals/ObjectManager.cs index c2d08b446..dee6570d1 100644 --- a/Source/Game/Globals/ObjectManager.cs +++ b/Source/Game/Globals/ObjectManager.cs @@ -785,7 +785,7 @@ namespace Game do { uint id = result.Read(0); - WorldLocation loc = new(result.Read(1), result.Read(2), result.Read(3), result.Read(4), result.Read(5)); + WorldLocation loc = new(result.Read(1), result.Read(2), result.Read(3), result.Read(4), MathFunctions.DegToRad(result.Read(5))); if (!GridDefines.IsValidMapCoord(loc)) { Log.outError(LogFilter.Sql, $"World location (ID: {id}) has a invalid position MapID: {loc.GetMapId()} {loc}, skipped"); diff --git a/sql/updates/world/master/2021_11_06_05_world.sql b/sql/updates/world/master/2021_11_06_05_world.sql new file mode 100644 index 000000000..91bd1c4b3 --- /dev/null +++ b/sql/updates/world/master/2021_11_06_05_world.sql @@ -0,0 +1 @@ +UPDATE `world_safe_locs` SET `Facing`=DEGREES(`Facing`) WHERE `ID` IN (80000,100000);