aboutsummaryrefslogtreecommitdiff
path: root/src/game/Pet.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-04-08 18:32:48 +0200
committerQAston <none@none>2009-04-08 18:32:48 +0200
commitfc7d2a5393175c460c325f9f778a95aaf67388d3 (patch)
treee96573d7c32f1ed6d9dd3efe8f20ff7b8a53f51d /src/game/Pet.cpp
parentd94a23e61a0cf1e921b47390e80182eb435890de (diff)
*Save only auras which need to be saved-this also removes error spam for duplicate entries.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Pet.cpp')
-rw-r--r--src/game/Pet.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index 1d45ed3a7fd..e4c10f1b3d9 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -1148,15 +1148,14 @@ void Pet::_SaveAuras()
{
// skip all auras from spell that apply at cast SPELL_AURA_MOD_SHAPESHIFT or pet area auras.
// do not save single target auras (unless they were cast by the player)
- if (itr->second->IsPassive()
- || (itr->second->GetCasterGUID() != GetGUID() && itr->second->IsSingleTarget()))
+ if (itr->second->IsPassive() || itr->second->IsAuraType(SPELL_AURA_MOD_STEALTH))
continue;
- SpellEntry const *spellInfo = itr->second->GetSpellProto();
- for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
- if (spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_STEALTH ||
- spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AREA_AURA_OWNER ||
- spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AREA_AURA_PET )
+ bool isCaster = itr->second->GetCasterGUID() == GetGUID();
+ if (!isCaster)
+ if (itr->second->IsSingleTarget()
+ || itr->second->IsAreaAura())
continue;
+
uint32 amounts[MAX_SPELL_EFFECTS];
for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
{