aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2008-12-27 22:24:29 +0100
committerQAston <none@none>2008-12-27 22:24:29 +0100
commit231cb0f5a7707017cd37628c389c32e42f24f1fe (patch)
treeefde6463a533e59ab23d0e21b130abddf0f297b6 /src/game/Unit.cpp
parent46bc9c343e04bf42ce7ae6073f862f30cdd7c02d (diff)
*Remove aura slot from update fields at aura remove.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 8e81c11582b..b726e78c69e 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -12286,7 +12286,7 @@ uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectT
return CastingTime;
}
-void Unit::UpdateAuraForGroup(uint8 slot)
+void Unit::UpdateAuraForGroup(uint8 slot, bool apply)
{
if(GetTypeId() == TYPEID_PLAYER)
{
@@ -12294,7 +12294,10 @@ void Unit::UpdateAuraForGroup(uint8 slot)
if(player->GetGroup())
{
player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_AURAS);
- player->SetAuraUpdateMask(slot);
+ if(apply)
+ player->SetAuraUpdateMask(slot);
+ else
+ player->UnsetAuraUpdateMask(slot);
}
}
else if(GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
@@ -12306,7 +12309,10 @@ void Unit::UpdateAuraForGroup(uint8 slot)
if(owner && (owner->GetTypeId() == TYPEID_PLAYER) && ((Player*)owner)->GetGroup())
{
((Player*)owner)->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_AURAS);
- pet->SetAuraUpdateMask(slot);
+ if(apply)
+ pet->SetAuraUpdateMask(slot);
+ else
+ pet->UnsetAuraUpdateMask(slot);
}
}
}