chore(Core/Auras): Clean up Aura::CanBeSaved() (#9343)

This commit is contained in:
Kitzunu
2021-11-30 17:03:04 +01:00
committed by GitHub
parent d77d86e76d
commit f9337497d8
4 changed files with 29 additions and 42 deletions

View File

@@ -1062,7 +1062,7 @@ bool Aura::CanBeSaved() const
return true;
}
if (spellInfo->HasAttribute(SPELL_ATTR0_CU_REJECT_AURA_SAVING))
if (spellInfo->HasAttribute(SPELL_ATTR0_CU_AURA_CANNOT_BE_SAVED))
{
return false;
}
@@ -1084,42 +1084,6 @@ bool Aura::CanBeSaved() const
return false;
}
// Xinef: Dont save control vehicle auras - caster may not exist
if (HasEffectType(SPELL_AURA_CONTROL_VEHICLE))
{
return false;
}
// Can't be saved - aura handler relies on calculated amount and changes it
if (HasEffectType(SPELL_AURA_CONVERT_RUNE))
{
return false;
}
// No point in saving this, since the stable dialog can't be open on aura load anyway.
if (HasEffectType(SPELL_AURA_OPEN_STABLE))
{
return false;
}
// xinef: do not save bind sight auras!
if (HasEffectType(SPELL_AURA_BIND_SIGHT))
{
return false;
}
// xinef: no charming auras (taking direct control)
if (HasEffectType(SPELL_AURA_MOD_POSSESS) || HasEffectType(SPELL_AURA_MOD_POSSESS_PET))
{
return false;
}
// xinef: no charming auras can be saved
if (HasEffectType(SPELL_AURA_MOD_CHARM) || HasEffectType(SPELL_AURA_AOE_CHARM))
{
return false;
}
// don't save auras removed by proc system
if (IsUsingCharges() && !GetCharges())
{