diff options
author | Ovahlord <dreadkiller@gmx.de> | 2024-01-28 21:59:47 +0100 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2024-01-28 21:59:47 +0100 |
commit | 0785ac69fd2fcf05d21978873f00012c10b8aeb0 (patch) | |
tree | a237c2948e5dad1e18189a312aadc85c662aa2fc | |
parent | e07e3ba734d95bd5f5d257dc18e629d19b4159b0 (diff) |
Core/Datastores: hardcode the return value of DB2Manager::GetEmptyAnimStateID() to match the expected client value
This is a necessary change for classic clients as the AnimationdData storage does not have the retail data needed to match that expected size
-rw-r--r-- | src/server/game/DataStores/DB2Stores.cpp | 3 | ||||
-rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 4 | ||||
-rw-r--r-- | src/server/game/Entities/GameObject/GameObject.cpp | 4 |
3 files changed, 4 insertions, 7 deletions
diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index 82a8d1fb895..079cf994f41 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -1760,7 +1760,8 @@ std::vector<DB2Manager::HotfixOptionalData> const* DB2Manager::GetHotfixOptional uint32 DB2Manager::GetEmptyAnimStateID() const { - return sAnimationDataStore.GetNumRows(); + //return sAnimationDataStore.GetNumRows(); + return 1772; // the Classic client expects the retail storage size so we have to hardcode the value } void DB2Manager::InsertNewHotfix(uint32 tableHash, uint32 recordId) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 2d2fdbadb7a..3f287ea5d51 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -609,9 +609,7 @@ 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()); - 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); + SetUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::StateAnimID), sDB2Manager.GetEmptyAnimStateID()); 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 ea429f2243c..5aa1f2f8e84 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1052,9 +1052,7 @@ 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()); - 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); + SetUpdateFieldValue(m_values.ModifyValue(&GameObject::m_gameObjectData).ModifyValue(&UF::GameObjectData::SpawnTrackingStateAnimID), sDB2Manager.GetEmptyAnimStateID()); switch (goInfo->type) { |