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
This commit is contained in:
Ovahlord
2024-01-28 21:59:47 +01:00
parent e07e3ba734
commit 0785ac69fd
3 changed files with 4 additions and 7 deletions

View File

@@ -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)

View File

@@ -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);

View File

@@ -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)
{