Core/Spells: Implemented SPELL_ATTR5_NOT_AVAILABLE_WHILE_CHARMED

Port From (https://github.com/TrinityCore/TrinityCore/commit/076c63c766d10697cea17da8bd5194862a682cbe)
This commit is contained in:
hondacrx
2022-06-01 15:40:38 -04:00
parent 68d8f664d7
commit 812d98f5b5
4 changed files with 15 additions and 3 deletions
+6
View File
@@ -110,6 +110,9 @@ namespace Game.Entities
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(spellId, _unit.GetMap().GetDifficultyID());
if (spellInfo != null)
{
if (spellInfo.HasAttribute(SpellAttr5.NotAvailableWhileCharmed))
continue;
if (spellInfo.IsPassive())
_unit.CastSpell(_unit, spellInfo.Id, new CastSpellExtraArgs(true));
else
@@ -142,6 +145,9 @@ namespace Game.Entities
continue;
}
if (spellInfo.HasAttribute(SpellAttr5.NotAvailableWhileCharmed))
continue;
if (spellInfo.IsPassive())
{
_unit.CastSpell(_unit, spellInfo.Id, new CastSpellExtraArgs(true));