aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2024-01-28 21:48:41 +0100
committerOvahlord <dreadkiller@gmx.de>2024-01-28 21:48:41 +0100
commite07e3ba734d95bd5f5d257dc18e629d19b4159b0 (patch)
tree8a717f6b229a87a90f3ee07b161365dbfb440c7f
parentf3b9b63eac4327fbd3ae49ec7d3ee5ad2fce6faf (diff)
Core/Objects: fixed animations for creatures and gameobjects which were broken due to a mismatching AnimationEntry storage sizes between retail and wotlk classic clients
For some reason the WotLK client expects the retail value for these two affected animation fields and since we have no way to get that value in a clean manner, we have to resort to a hardcoded value for now
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp4
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 3f287ea5d51..2d2fdbadb7a 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -609,7 +609,9 @@ bool Creature::UpdateEntry(uint32 entry, CreatureData const* data /*= nullptr*/,
ReplaceAllDynamicFlags(UNIT_DYNFLAG_NONE);
- SetUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::StateAnimID), sDB2Manager.GetEmptyAnimStateID());
+ //SetUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::StateAnimID), sDB2Manager.GetEmptyAnimStateID());
+ constexpr uint32 stateAnimId = 1772; // the WotLK classic client expects the retail AnimationEntry db2 storage size so we have to hardcode it for the time being
+ SetUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::StateAnimID), stateAnimId);
SetCanDualWield(cInfo->flags_extra & CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK);
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 5aa1f2f8e84..ea429f2243c 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -1052,7 +1052,9 @@ bool GameObject::Create(uint32 entry, Map* map, Position const& pos, QuaternionD
SetGoState(goState);
SetGoArtKit(artKit);
- SetUpdateFieldValue(m_values.ModifyValue(&GameObject::m_gameObjectData).ModifyValue(&UF::GameObjectData::SpawnTrackingStateAnimID), sDB2Manager.GetEmptyAnimStateID());
+ //SetUpdateFieldValue(m_values.ModifyValue(&GameObject::m_gameObjectData).ModifyValue(&UF::GameObjectData::SpawnTrackingStateAnimID), sDB2Manager.GetEmptyAnimStateID());
+ constexpr uint32 spawnTrackingAnimId = 1772; // the WotLK classic client expects the retail AnimationEntry db2 storage size so we have to hardcode it for the time being
+ SetUpdateFieldValue(m_values.ModifyValue(&GameObject::m_gameObjectData).ModifyValue(&UF::GameObjectData::SpawnTrackingStateAnimID), spawnTrackingAnimId);
switch (goInfo->type)
{