mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[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:
parent
93b0ccfe0b
commit
253d39de21
2 changed files with 3 additions and 1 deletions
|
|
@ -483,6 +483,7 @@ void Map::MessageBroadcast(Player *player, WorldPacket *msg, bool to_self)
|
||||||
|
|
||||||
Cell cell(p);
|
Cell cell(p);
|
||||||
cell.data.Part.reserved = ALL_DISTRICT;
|
cell.data.Part.reserved = ALL_DISTRICT;
|
||||||
|
cell.SetNoCreate();
|
||||||
|
|
||||||
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
|
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
|
||||||
return;
|
return;
|
||||||
|
|
@ -528,6 +529,7 @@ void Map::MessageDistBroadcast(Player *player, WorldPacket *msg, float dist, boo
|
||||||
|
|
||||||
Cell cell(p);
|
Cell cell(p);
|
||||||
cell.data.Part.reserved = ALL_DISTRICT;
|
cell.data.Part.reserved = ALL_DISTRICT;
|
||||||
|
cell.SetNoCreate();
|
||||||
|
|
||||||
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
|
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8279"
|
#define REVISION_NR "8280"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue