[8280] Avoid grid loading loading at packet broadcasts.

If player in range then related grid loaded, if not loaded then player
not in range and no reason for loading.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Ambal 2009-07-30 18:07:56 +04:00 committed by VladimirMangos
parent 93b0ccfe0b
commit 253d39de21
2 changed files with 3 additions and 1 deletions

View file

@ -483,6 +483,7 @@ void Map::MessageBroadcast(Player *player, WorldPacket *msg, bool to_self)
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
return;
@ -528,6 +529,7 @@ void Map::MessageDistBroadcast(Player *player, WorldPacket *msg, float dist, boo
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
return;