*Remove aura slot from update fields at aura remove.

--HG--
branch : trunk
This commit is contained in:
QAston
2008-12-27 22:24:29 +01:00
parent 46bc9c343e
commit 231cb0f5a7
5 changed files with 14 additions and 6 deletions
+1
View File
@@ -235,6 +235,7 @@ class Pet : public Creature
uint64 GetAuraUpdateMask() { return m_auraUpdateMask; } uint64 GetAuraUpdateMask() { return m_auraUpdateMask; }
void SetAuraUpdateMask(uint8 slot) { m_auraUpdateMask |= (uint64(1) << slot); } void SetAuraUpdateMask(uint8 slot) { m_auraUpdateMask |= (uint64(1) << slot); }
void UnsetAuraUpdateMask(uint8 slot) { m_auraUpdateMask &= ~(uint64(1) << slot); }
void ResetAuraUpdateMask() { m_auraUpdateMask = 0; } void ResetAuraUpdateMask() { m_auraUpdateMask = 0; }
DeclinedName const* GetDeclinedNames() const { return m_declinedname; } DeclinedName const* GetDeclinedNames() const { return m_declinedname; }
+1
View File
@@ -2069,6 +2069,7 @@ class TRINITY_DLL_SPEC Player : public Unit
void SetGroupUpdateFlag(uint32 flag) { m_groupUpdateMask |= flag; } void SetGroupUpdateFlag(uint32 flag) { m_groupUpdateMask |= flag; }
uint64 GetAuraUpdateMask() { return m_auraUpdateMask; } uint64 GetAuraUpdateMask() { return m_auraUpdateMask; }
void SetAuraUpdateMask(uint8 slot) { m_auraUpdateMask |= (uint64(1) << slot); } void SetAuraUpdateMask(uint8 slot) { m_auraUpdateMask |= (uint64(1) << slot); }
void UnsetAuraUpdateMask(uint8 slot) { m_auraUpdateMask &= ~(uint64(1) << slot); }
Player* GetNextRandomRaidMember(float radius); Player* GetNextRandomRaidMember(float radius);
PartyResult CanUninviteFromGroup() const; PartyResult CanUninviteFromGroup() const;
+2 -2
View File
@@ -886,7 +886,7 @@ void Aura::_AddAura()
UpdateAuraCharges(); UpdateAuraCharges();
// update for out of range group members // update for out of range group members
m_target->UpdateAuraForGroup(slot); m_target->UpdateAuraForGroup(slot, true);
} }
} }
else // use found slot else // use found slot
@@ -973,7 +973,7 @@ void Aura::_RemoveAura()
SetAuraApplication(slot, 0); SetAuraApplication(slot, 0);
// update for out of range group members // update for out of range group members
m_target->UpdateAuraForGroup(slot); m_target->UpdateAuraForGroup(slot, false);
if( IsSealSpell(GetSpellProto()) ) if( IsSealSpell(GetSpellProto()) )
m_target->ModifyAuraState(AURA_STATE_JUDGEMENT,false); m_target->ModifyAuraState(AURA_STATE_JUDGEMENT,false);
+9 -3
View File
@@ -12286,7 +12286,7 @@ uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectT
return CastingTime; return CastingTime;
} }
void Unit::UpdateAuraForGroup(uint8 slot) void Unit::UpdateAuraForGroup(uint8 slot, bool apply)
{ {
if(GetTypeId() == TYPEID_PLAYER) if(GetTypeId() == TYPEID_PLAYER)
{ {
@@ -12294,7 +12294,10 @@ void Unit::UpdateAuraForGroup(uint8 slot)
if(player->GetGroup()) if(player->GetGroup())
{ {
player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_AURAS); 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()) 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()) if(owner && (owner->GetTypeId() == TYPEID_PLAYER) && ((Player*)owner)->GetGroup())
{ {
((Player*)owner)->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_AURAS); ((Player*)owner)->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_AURAS);
pet->SetAuraUpdateMask(slot); if(apply)
pet->SetAuraUpdateMask(slot);
else
pet->UnsetAuraUpdateMask(slot);
} }
} }
} }
+1 -1
View File
@@ -1392,7 +1392,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void UpdateReactives(uint32 p_time); void UpdateReactives(uint32 p_time);
// group updates // group updates
void UpdateAuraForGroup(uint8 slot); void UpdateAuraForGroup(uint8 slot, bool apply);
// pet auras // pet auras
typedef std::set<PetAura const*> PetAuraSet; typedef std::set<PetAura const*> PetAuraSet;