Core/Spells: rework part 3: spells only handle at most one UnitAura and one DynObjAura during its lifetime

Port From (https://github.com/TrinityCore/TrinityCore/commit/f3548d45d0a74203ef6f5c7282c31ba794ddf7a1)
This commit is contained in:
hondacrx
2021-08-28 17:03:47 -04:00
parent 5ff5fb7d3f
commit 091272755c
8 changed files with 467 additions and 283 deletions
+7 -1
View File
@@ -542,7 +542,13 @@ namespace Game.Entities
AuraLoadEffectInfo info = effectInfo[key];
ObjectGuid castId = ObjectGuid.Create(HighGuid.Cast, SpellCastSource.Normal, GetMapId(), spellInfo.Id, GetMap().GenerateLowGuid(HighGuid.Cast));
Aura aura = Aura.TryCreate(spellInfo, castId, key.EffectMask, this, null, difficulty, info.BaseAmounts, null, casterGuid, itemGuid, castItemId, castItemLevel);
AuraCreateInfo createInfo = new(castId, spellInfo, difficulty, key.EffectMask, this);
createInfo.SetCasterGUID(casterGuid);
createInfo.SetBaseAmount(info.BaseAmounts);
createInfo.SetCastItem(itemGuid, castItemId, castItemLevel);
Aura aura = Aura.TryCreate(createInfo);
if (aura != null)
{
if (!aura.CanBeSaved())