Core/PacketIO: Fix suppressing building SMSG_UPDATE_OBJECT packets
Port From (https://github.com/TrinityCore/TrinityCore/commit/36496c717203fab56eadff8c55f3b1e136fbe363)
This commit is contained in:
@@ -751,6 +751,17 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
public void DoWithSuppressingObjectUpdates(Action action)
|
||||
{
|
||||
bool wasUpdatedBeforeAction = m_objectUpdated;
|
||||
action();
|
||||
if (m_objectUpdated && !wasUpdatedBeforeAction)
|
||||
{
|
||||
RemoveFromObjectUpdate();
|
||||
m_objectUpdated = false;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual UpdateFieldFlag GetUpdateFieldFlagsFor(Player target)
|
||||
{
|
||||
return UpdateFieldFlag.None;
|
||||
|
||||
Reference in New Issue
Block a user