From f7023cb290dfa44996e83bf8424a5f029b0b8a23 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 16 Dec 2021 13:00:53 -0500 Subject: [PATCH] Core/Spells: Implemented SPELL_ATTR1_CAST_WHEN_LEARNED Port From (https://github.com/TrinityCore/TrinityCore/commit/747da1f804a05462fb0d542a9570f27a549688dc) --- Source/Framework/Constants/Spells/SpellConst.cs | 2 +- Source/Game/Entities/Player/Player.Spells.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index 0f56cb52c..34d0ef1db 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -1642,7 +1642,7 @@ namespace Framework.Constants DontDisplayInAuraBar = 0x10000000, // 28 Client Doesn'T Display These Spells In Aura Bar ChannelDisplaySpellName = 0x20000000, // 29 Spell Name Is Displayed In Cast Bar Instead Of 'Channeling' Text EnableAtDodge = 0x40000000, // 30 Overpower - Unk31 = 0x80000000 // 31 + CastWhenLearned = 0x80000000 // 31 } public enum SpellAttr2 : uint { diff --git a/Source/Game/Entities/Player/Player.Spells.cs b/Source/Game/Entities/Player/Player.Spells.cs index edcc4df10..e0b075f5e 100644 --- a/Source/Game/Entities/Player/Player.Spells.cs +++ b/Source/Game/Entities/Player/Player.Spells.cs @@ -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();