mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/Player: according to sniffs the out of range group update timer has a fixed timer interval of 5 seconds instead of be send in real time
This commit is contained in:
@@ -411,6 +411,7 @@ Player::Player(WorldSession* session): Unit(true)
|
||||
_hasValidLFGLeavePoint = false;
|
||||
_archaeology = new Archaeology(this);
|
||||
m_petScalingSynchTimer.Reset(1000);
|
||||
m_groupUpdateTimer.Reset(5000);
|
||||
|
||||
_transportSpawnID = 0;
|
||||
}
|
||||
@@ -1357,7 +1358,12 @@ void Player::Update(uint32 p_time)
|
||||
}
|
||||
|
||||
// group update
|
||||
SendUpdateToOutOfRangeGroupMembers();
|
||||
m_groupUpdateTimer.Update(p_time);
|
||||
if (m_groupUpdateTimer.Passed())
|
||||
{
|
||||
SendUpdateToOutOfRangeGroupMembers();
|
||||
m_groupUpdateTimer.Reset(5000);
|
||||
}
|
||||
|
||||
Pet* pet = GetPet();
|
||||
if (pet && !pet->IsWithinDistInMap(this, GetMap()->GetVisibilityRange()) && !pet->isPossessed())
|
||||
@@ -23933,6 +23939,7 @@ void Player::SendUpdateToOutOfRangeGroupMembers()
|
||||
{
|
||||
if (m_groupUpdateMask == GROUP_UPDATE_FLAG_NONE)
|
||||
return;
|
||||
|
||||
if (Group* group = GetGroup())
|
||||
group->UpdatePlayerOutOfRange(this);
|
||||
|
||||
|
||||
@@ -2762,6 +2762,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
std::vector<PlayerPetData*> PlayerPetDataStore;
|
||||
|
||||
TimeTrackerSmall m_petScalingSynchTimer;
|
||||
TimeTrackerSmall m_groupUpdateTimer;
|
||||
|
||||
uint32 _transportSpawnID;
|
||||
};
|
||||
|
||||
@@ -1194,6 +1194,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacke
|
||||
{
|
||||
*data << uint8(0);
|
||||
*data << uint64(0);
|
||||
*data << uint32(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user