Core/Auras: Convert most rules from Aura::CanBeSaved to a custom spell attribute

Port From (https://github.com/TrinityCore/TrinityCore/commit/b4aa698acb88e1a74bc22d97279148a567b88cad)
This commit is contained in:
hondacrx
2021-03-08 14:26:51 -05:00
parent c54c27f831
commit 5eea1fec98
4 changed files with 37 additions and 47 deletions
+17
View File
@@ -2438,6 +2438,23 @@ namespace Game.Entities
break;
}
switch (effect.ApplyAuraName)
{
case AuraType.OpenStable: // No point in saving this, since the stable dialog can't be open on aura load anyway.
// Auras that require both caster & target to be in world cannot be saved
case AuraType.ControlVehicle:
case AuraType.BindSight:
case AuraType.ModPossess:
case AuraType.ModPossessPet:
case AuraType.ModCharm:
case AuraType.AoeCharm:
// Controlled by Battleground
case AuraType.BattleGroundPlayerPosition:
case AuraType.BattleGroundPlayerPositionFactional:
spellInfo.AttributesCu |= SpellCustomAttributes.AuraCannotBeSaved;
break;
}
switch (effect.Effect)
{
case SpellEffectName.SchoolDamage: