From 418a0ec8cac14affe7f3fae764b78abf9c785759 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 3 Nov 2021 17:10:04 -0400 Subject: [PATCH] Core/DB: Fix AnimationData structure Port From (https://github.com/TrinityCore/TrinityCore/commit/1e52f9fdf566320fd586127692c5a1c16e34f741) --- Source/Framework/Database/Databases/HotfixDatabase.cs | 2 +- Source/Game/DataStorage/Structs/A_Records.cs | 4 ++-- sql/updates/hotfixes/master/2021_11_03_00_hotfixes.sql | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 sql/updates/hotfixes/master/2021_11_03_00_hotfixes.sql diff --git a/Source/Framework/Database/Databases/HotfixDatabase.cs b/Source/Framework/Database/Databases/HotfixDatabase.cs index ea8698b3b..730de5e9a 100644 --- a/Source/Framework/Database/Databases/HotfixDatabase.cs +++ b/Source/Framework/Database/Databases/HotfixDatabase.cs @@ -43,7 +43,7 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_ADVENTURE_MAP_POI_LOCALE, "SELECT ID, Title_lang, Description_lang FROM adventure_map_poi_locale WHERE locale = ?"); // AnimationData.db2 - PrepareStatement(HotfixStatements.SEL_ANIMATION_DATA, "SELECT ID, BehaviorID, BehaviorTier, Fallback, Flags1, Flags2 FROM animation_data"); + PrepareStatement(HotfixStatements.SEL_ANIMATION_DATA, "SELECT ID, Fallback, BehaviorTier, BehaviorID, Flags1, Flags2 FROM animation_data"); // AnimKit.db2 PrepareStatement(HotfixStatements.SEL_ANIM_KIT, "SELECT ID, OneShotDuration, OneShotStopAnimKitID, LowDefAnimKitID FROM anim_kit"); diff --git a/Source/Game/DataStorage/Structs/A_Records.cs b/Source/Game/DataStorage/Structs/A_Records.cs index 649232828..9704b07ed 100644 --- a/Source/Game/DataStorage/Structs/A_Records.cs +++ b/Source/Game/DataStorage/Structs/A_Records.cs @@ -97,9 +97,9 @@ namespace Game.DataStorage public sealed class AnimationDataRecord { public uint Id; - public ushort BehaviorID; + public ushort Fallback; public byte BehaviorTier; - public int Fallback; + public int BehaviorID; public int[] Flags = new int[2]; } diff --git a/sql/updates/hotfixes/master/2021_11_03_00_hotfixes.sql b/sql/updates/hotfixes/master/2021_11_03_00_hotfixes.sql new file mode 100644 index 000000000..97d3c12fe --- /dev/null +++ b/sql/updates/hotfixes/master/2021_11_03_00_hotfixes.sql @@ -0,0 +1 @@ +ALTER TABLE `animation_data` CHANGE COLUMN `BehaviorID` `Fallback` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `ID`, CHANGE COLUMN `Fallback` `BehaviorID` INT(11) NOT NULL DEFAULT '0' AFTER `BehaviorTier`;