[10201] Broadcast packets only if worldobject is in world

There is no sense to do that for objects that not in world - those objects are unknown for clients
and their packets will be ignored

(based on SilverIce's repo commit 6305402)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
SilverIce 2010-07-17 03:26:36 +04:00 committed by VladimirMangos
parent ea4afebff8
commit e47e9a2218
4 changed files with 14 additions and 15 deletions

View file

@ -8961,7 +8961,7 @@ void Unit::SetPower(Powers power, uint32 val)
data << GetPackGUID();
data << uint8(power);
data << uint32(val);
SendMessageToSet(&data, GetTypeId() == TYPEID_PLAYER ? true : false);
SendMessageToSet(&data, true);
// group update
if(GetTypeId() == TYPEID_PLAYER)