Core/Players: out of range group updates will now get sent every 5 seconds instead of as soon as they are available to reflect retail behaivior.
Port From (https://github.com/TrinityCore/TrinityCore/commit/0d433b1bc89bf26585688d8041da500ff8dae364)
This commit is contained in:
@@ -245,6 +245,8 @@ namespace Game.Entities
|
||||
float[] m_powerFraction = new float[(int)PowerType.MaxPerClass];
|
||||
int[] m_MirrorTimer = new int[3];
|
||||
|
||||
TimeTrackerSmall m_groupUpdateTimer;
|
||||
|
||||
ulong m_GuildIdInvited;
|
||||
DeclinedName _declinedname;
|
||||
Runes m_runes = new();
|
||||
|
||||
@@ -121,6 +121,8 @@ namespace Game.Entities
|
||||
m_bgData = new BGData();
|
||||
|
||||
_restMgr = new RestMgr(this);
|
||||
|
||||
m_groupUpdateTimer = new(5000);
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
@@ -610,7 +612,12 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
// group update
|
||||
SendUpdateToOutOfRangeGroupMembers();
|
||||
m_groupUpdateTimer.Update((int)diff);
|
||||
if (m_groupUpdateTimer.Passed())
|
||||
{
|
||||
SendUpdateToOutOfRangeGroupMembers();
|
||||
m_groupUpdateTimer.Reset(5000);
|
||||
}
|
||||
|
||||
Pet pet = GetPet();
|
||||
if (pet != null && !pet.IsWithinDistInMap(this, GetMap().GetVisibilityRange()) && !pet.IsPossessed())
|
||||
|
||||
Reference in New Issue
Block a user