aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorsilver1ce <none@none>2010-01-15 15:08:06 +0200
committersilver1ce <none@none>2010-01-15 15:08:06 +0200
commite3edc52a2df61146a01d0ead21d21b49bff034a6 (patch)
treeb0853a975a96a50b7081684ee08a57e0396408a5 /src/game/Unit.cpp
parentf9a7c3af2d0494a89a44555f86f8d7f07183dc1c (diff)
Stop aura update packet spam, sorry about that
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index f1e799ea43d..4347549495e 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -3252,13 +3252,18 @@ void Unit::_UpdateSpells( uint32 time )
++i;
}
- WorldPacket data(SMSG_AURA_UPDATE, 50);
- data.append(GetPackGUID());
+ WorldPacket auras;
for (VisibleAuraMap::iterator itr = m_visibleAuras.begin(); itr != m_visibleAuras.end(); ++itr)
if (itr->second->IsNeedClientUpdate())
- itr->second->ConstructAuraInfo(data);
+ itr->second->ConstructAuraInfo(auras);
- SendMessageToSet(&data, true);
+ if(auras.wpos())
+ {
+ WorldPacket data(SMSG_AURA_UPDATE, GetPackGUID().size() + auras.wpos());
+ data.append(GetPackGUID());
+ data.append(auras);
+ SendMessageToSet(&data, true);
+ }
_DeleteRemovedAuras();