Core/PacketIO: Fixed SMSG_UPDATE_OBJECT packets going missing for new items

Port From (https://github.com/TrinityCore/TrinityCore/commit/48bd9698f88ade01209c9287ff38005900630ed3)
This commit is contained in:
hondacrx
2022-01-07 12:52:45 -05:00
parent 9f62d55af7
commit 038a06e166
2 changed files with 9 additions and 6 deletions
+6 -1
View File
@@ -1317,11 +1317,16 @@ namespace Game.Entities
base.ClearUpdateMask(remove);
}
public override void AddToObjectUpdate()
public override bool AddToObjectUpdate()
{
Player owner = GetOwner();
if (owner)
{
owner.GetMap().AddUpdateObject(this);
return true;
}
return false;
}
public override void RemoveFromObjectUpdate()
+3 -5
View File
@@ -724,10 +724,7 @@ namespace Game.Entities
public void AddToObjectUpdateIfNeeded()
{
if (IsInWorld && !m_objectUpdated)
{
AddToObjectUpdate();
m_objectUpdated = true;
}
m_objectUpdated = AddToObjectUpdate();
}
public virtual void ClearUpdateMask(bool remove)
@@ -2778,9 +2775,10 @@ namespace Game.Entities
ClearUpdateMask(false);
}
public virtual void AddToObjectUpdate()
public virtual bool AddToObjectUpdate()
{
GetMap().AddUpdateObject(this);
return true;
}
public virtual void RemoveFromObjectUpdate()