mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
*Fix a bug that redundant packets are sent to clients which may cause freeze.
--HG-- branch : trunk
This commit is contained in:
@@ -54,7 +54,7 @@ PlayerVisibilityNotifier::Notify()
|
||||
if(i_clientGUIDs.find((*itr)->GetGUID())!=i_clientGUIDs.end())
|
||||
{
|
||||
(*itr)->UpdateVisibilityOf(&i_player);
|
||||
i_player.UpdateVisibilityOf((*itr),i_data,i_data_updates,i_visibleNow);
|
||||
i_player.UpdateVisibilityOf((*itr),i_data,i_visibleNow);
|
||||
i_clientGUIDs.erase((*itr)->GetGUID());
|
||||
}
|
||||
}
|
||||
@@ -72,17 +72,6 @@ PlayerVisibilityNotifier::Notify()
|
||||
#endif
|
||||
}
|
||||
|
||||
// send update to other players (except player updates that already sent using SendUpdateToPlayer)
|
||||
for(UpdateDataMapType::iterator iter = i_data_updates.begin(); iter != i_data_updates.end(); ++iter)
|
||||
{
|
||||
if(iter->first==&i_player)
|
||||
continue;
|
||||
|
||||
WorldPacket packet;
|
||||
iter->second.BuildPacket(&packet);
|
||||
iter->first->GetSession()->SendPacket(&packet);
|
||||
}
|
||||
|
||||
if( i_data.HasData() )
|
||||
{
|
||||
// send create/outofrange packet to player (except player create updates that already sent using SendUpdateToPlayer)
|
||||
|
||||
Reference in New Issue
Block a user