aboutsummaryrefslogtreecommitdiff
path: root/src/game/Object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r--src/game/Object.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index c13a41d9d8c..6c892ff1d5d 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -1524,7 +1524,7 @@ void WorldObject::MonsterSay(int32 textId, uint32 language, uint64 TargetGuid)
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),say_do);
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
CellLock<GridReadGuard> cell_lock(cell, p);
- cell_lock->Visit(cell_lock, message, *GetMap());
+ cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY));
}
void WorldObject::MonsterYell(int32 textId, uint32 language, uint64 TargetGuid)
@@ -1540,7 +1540,7 @@ void WorldObject::MonsterYell(int32 textId, uint32 language, uint64 TargetGuid)
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL),say_do);
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
CellLock<GridReadGuard> cell_lock(cell, p);
- cell_lock->Visit(cell_lock, message, *GetMap());
+ cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL));
}
void WorldObject::MonsterYellToZone(int32 textId, uint32 language, uint64 TargetGuid)
@@ -1569,7 +1569,7 @@ void WorldObject::MonsterTextEmote(int32 textId, uint64 TargetGuid, bool IsBossE
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),say_do);
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
CellLock<GridReadGuard> cell_lock(cell, p);
- cell_lock->Visit(cell_lock, message, *GetMap());
+ cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE));
}
void WorldObject::MonsterWhisper(int32 textId, uint64 receiver, bool IsBossWhisper)
@@ -1615,8 +1615,8 @@ void Unit::BuildHeartBeatMsg(WorldPacket *data) const
void WorldObject::SendMessageToSet(WorldPacket *data, bool /*fake*/)
{
- Trinity::MessageDistDeliverer notifier(this, data, World::GetMaxVisibleDistance());
- VisitNearbyWorldObject(World::GetMaxVisibleDistance(), notifier);
+ Trinity::MessageDistDeliverer notifier(this, data, GetMap()->GetVisibilityDistance());
+ VisitNearbyWorldObject(GetMap()->GetVisibilityDistance(), notifier);
}
void WorldObject::SendMessageToSetInRange(WorldPacket *data, float dist, bool /*bToSelf*/)
@@ -2099,8 +2099,8 @@ void WorldObject::GetNearPoint(WorldObject const* searcher, float &x, float &y,
TypeContainerVisitor<MaNGOS::WorldObjectWorker<MaNGOS::NearUsedPosDo>, WorldTypeMapContainer > world_obj_worker(worker);
CellLock<GridReadGuard> cell_lock(cell, p);
- cell_lock->Visit(cell_lock, grid_obj_worker, *GetMap());
- cell_lock->Visit(cell_lock, world_obj_worker, *GetMap());
+ cell_lock->Visit(cell_lock, grid_obj_worker, *GetMap(), *this, distance2d);
+ cell_lock->Visit(cell_lock, world_obj_worker, *GetMap(), *this, distance2d);
}
// maybe can just place in primary position
@@ -2235,9 +2235,9 @@ void WorldObject::DestroyForNearbyPlayers()
return;
std::list<Unit*> targets;
- Trinity::AnyUnitInObjectRangeCheck check(this, World::GetMaxVisibleDistance());
+ Trinity::AnyUnitInObjectRangeCheck check(this, GetMap()->GetVisibilityDistance());
Trinity::UnitListSearcher<Trinity::AnyUnitInObjectRangeCheck> searcher(this, targets, check);
- VisitNearbyWorldObject(World::GetMaxVisibleDistance(), searcher);
+ VisitNearbyWorldObject(GetMap()->GetVisibilityDistance(), searcher);
for(std::list<Unit*>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter)
{
Player *plr = dynamic_cast<Player*>(*iter);