Core/PacketIO: Fix suppressing building SMSG_UPDATE_OBJECT packets

Port From (https://github.com/TrinityCore/TrinityCore/commit/36496c717203fab56eadff8c55f3b1e136fbe363)
This commit is contained in:
hondacrx
2021-03-04 16:12:22 -05:00
parent 655051c3f9
commit 971f155537
3 changed files with 31 additions and 8 deletions
+5 -2
View File
@@ -3815,8 +3815,11 @@ namespace Game.Entities
else
{
// throttle packet sending
SetUpdateFieldValue(ref m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.Power, (int)powerIndex), curValue);
m_unitData.ClearChanged(m_unitData.Power, (int)powerIndex);
DoWithSuppressingObjectUpdates(() =>
{
SetUpdateFieldValue(ref m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.Power, (int)powerIndex), curValue);
m_unitData.ClearChanged(m_unitData.Power, (int)powerIndex);
});
}
}
void RegenerateHealth()