Core/Misc: Various crash fixes

Port From (https://github.com/TrinityCore/TrinityCore/commit/4f65dc5e20cc3af5b3595809707c632faa6e5900)
This commit is contained in:
hondacrx
2019-08-17 11:23:32 -04:00
parent a44224564c
commit 2d2a72ce3e
13 changed files with 65 additions and 37 deletions
+14 -1
View File
@@ -928,7 +928,8 @@ namespace Game.Spells
if (IsPassive())
return false;
if (GetCasterGUID() != GetOwner().GetGUID())
// Check if aura is single target, not only spell info
if (GetCasterGUID() != GetOwner().GetGUID() || IsSingleTarget())
if (GetSpellInfo().IsSingleTarget())
return false;
@@ -940,6 +941,18 @@ namespace Game.Spells
if (HasEffectType(AuraType.ControlVehicle))
return false;
// do not save bind sight auras
if (HasEffectType(AuraType.BindSight))
return false;
// no charming auras (taking direct control)
if (HasEffectType(AuraType.ModPossess) || HasEffectType(AuraType.ModPossessPet))
return false;
// no charming auras can be saved
if (HasEffectType(AuraType.ModCharm) || HasEffectType(AuraType.AoeCharm))
return false;
// Incanter's Absorbtion - considering the minimal duration and problems with aura stacking
// we skip saving this aura
// Also for some reason other auras put as MultiSlot crash core on keeping them after restart,