mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[8785] Use macro instead of explicit call to singleton Instance().
* For: ObjectAccessor, MapManager.
This commit is contained in:
parent
6abf7e7f58
commit
dc725ad6b8
28 changed files with 77 additions and 72 deletions
|
|
@ -1589,7 +1589,7 @@ void WorldObject::BuildMonsterChat(WorldPacket *data, uint8 msgtype, char const*
|
|||
void WorldObject::SendMessageToSet(WorldPacket *data, bool /*bToSelf*/)
|
||||
{
|
||||
//if object is in world, map for it already created!
|
||||
Map * _map = IsInWorld() ? GetMap() : MapManager::Instance().FindMap(GetMapId(), GetInstanceId());
|
||||
Map * _map = IsInWorld() ? GetMap() : mapmgr.FindMap(GetMapId(), GetInstanceId());
|
||||
if(_map)
|
||||
_map->MessageBroadcast(this, data);
|
||||
}
|
||||
|
|
@ -1597,7 +1597,7 @@ void WorldObject::SendMessageToSet(WorldPacket *data, bool /*bToSelf*/)
|
|||
void WorldObject::SendMessageToSetInRange(WorldPacket *data, float dist, bool /*bToSelf*/)
|
||||
{
|
||||
//if object is in world, map for it already created!
|
||||
Map * _map = IsInWorld() ? GetMap() : MapManager::Instance().FindMap(GetMapId(), GetInstanceId());
|
||||
Map * _map = IsInWorld() ? GetMap() : mapmgr.FindMap(GetMapId(), GetInstanceId());
|
||||
if(_map)
|
||||
_map->MessageDistBroadcast(this, data, dist);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue