*Save only auras which need to be saved-this also removes error spam for duplicate entries.
--HG-- branch : trunk
This commit is contained in:
+6
-7
@@ -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)
|
||||
{
|
||||
|
||||
+10
-7
@@ -15841,17 +15841,20 @@ void Player::_SaveAuras()
|
||||
AuraMap const& auras = GetAuras();
|
||||
for(AuraMap::const_iterator itr = auras.begin(); itr !=auras.end() ; ++itr)
|
||||
{
|
||||
// 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)
|
||||
// skip:
|
||||
// area auras or single cast auras casted by other unit
|
||||
// passive auras and stances
|
||||
if (itr->second->IsPassive()
|
||||
|| (itr->second->GetCasterGUID() != GetGUID() && itr->second->IsSingleTarget())
|
||||
|| itr->second->IsAuraType(SPELL_AURA_MOD_SHAPESHIFT)
|
||||
|| itr->second->IsAuraType(SPELL_AURA_MOD_STEALTH)
|
||||
|| itr->second->IsRemovedOnShapeLost())
|
||||
continue;
|
||||
SpellEntry const *spellInfo = itr->second->GetSpellProto();
|
||||
for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
|
||||
if (spellInfo->Effect[i] == SPELL_AURA_MOD_SHAPESHIFT ||
|
||||
spellInfo->Effect[i] == SPELL_AURA_MOD_STEALTH )
|
||||
bool isCaster = itr->second->GetCasterGUID() == GetGUID();
|
||||
if (!isCaster)
|
||||
if (itr->second->IsSingleTarget()
|
||||
|| itr->second->IsAreaAura())
|
||||
continue;
|
||||
|
||||
int32 amounts[MAX_SPELL_EFFECTS];
|
||||
for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
|
||||
{
|
||||
|
||||
@@ -415,7 +415,7 @@ m_auraSlot(MAX_AURAS), m_auraLevel(1), m_procCharges(0), m_stackAmount(1),m_aura
|
||||
m_partAuras[i]=CreateAuraEffect(this, i, NULL , caster);
|
||||
// correct flags if aura couldn't be created
|
||||
if (!m_partAuras[i])
|
||||
m_auraFlags &= uint8(~(uint8(1) << i));
|
||||
m_auraFlags &= uint8(~(1<< i));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user