mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[9796] Controlled unit should be a source of movement packets, not player-controller.
Now movements of controlled unit are visible for nearby players, even when controller too far from controlled unit This new type of packet broadcasting used in HandleMovementOpcodes handler only, maybe it can be used somewhere else. (based on SilverIce's repo commit d2387ca) Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
3032e80bb6
commit
6ab55fa09e
6 changed files with 41 additions and 4 deletions
|
|
@ -1579,11 +1579,20 @@ 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() : sMapMgr.FindMap(GetMapId(), GetInstanceId());
|
||||
if(_map)
|
||||
if (Map * _map = IsInWorld() ? GetMap() : sMapMgr.FindMap(GetMapId(), GetInstanceId()))
|
||||
_map->MessageDistBroadcast(this, data, dist);
|
||||
}
|
||||
|
||||
void WorldObject::SendMessageToSetExcept(WorldPacket *data, Player const* skipped_receiver)
|
||||
{
|
||||
//if object is in world, map for it already created!
|
||||
if (Map * _map = IsInWorld() ? GetMap() : sMapMgr.FindMap(GetMapId(), GetInstanceId()))
|
||||
{
|
||||
MaNGOS::MessageDelivererExcept notifier(this, data, skipped_receiver);
|
||||
Cell::VisitWorldObjects(this, notifier, _map->GetVisibilityDistance());
|
||||
}
|
||||
}
|
||||
|
||||
void WorldObject::SendObjectDeSpawnAnim(uint64 guid)
|
||||
{
|
||||
WorldPacket data(SMSG_GAMEOBJECT_DESPAWN_ANIM, 8);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue