Core/Spells: Implemented SPELL_ATTR1_CAST_WHEN_LEARNED

Port From (https://github.com/TrinityCore/TrinityCore/commit/747da1f804a05462fb0d542a9570f27a549688dc)
This commit is contained in:
hondacrx
2021-12-16 13:00:53 -05:00
parent 599eb14a16
commit f7023cb290
2 changed files with 3 additions and 1 deletions
@@ -2542,6 +2542,8 @@ namespace Game.Entities
CastSpell(this, spellId, true);
return false;
}
else if (spellInfo.HasAttribute(SpellAttr1.CastWhenLearned))
CastSpell(this, spellId, true);
// update free primary prof.points (if any, can be none in case GM .learn prof. learning)
uint freeProfs = GetFreePrimaryProfessionPoints();