Core/Spells: Implemented SPELL_ATTR9_ITEM_CAST_GRANTS_SKILL_GAIN

Port From (https://github.com/TrinityCore/TrinityCore/commit/00efee9ca12d6e625e9954a39768bbec029d0459)
This commit is contained in:
Hondacrx
2024-08-25 23:45:44 -04:00
parent 6462b7baf4
commit e79581f71f
3 changed files with 16 additions and 5 deletions
+8
View File
@@ -2991,6 +2991,14 @@ namespace Game.Spells
player.UpdateCriteria(CriteriaType.CastSpell, m_spellInfo.Id);
}
// Spells that don't create items can have this attribute - handle here
if (m_CastItem && m_spellInfo.HasAttribute(SpellAttr9.ItemCastGrantsSkillGain))
{
Player playerCaster1 = m_caster.ToPlayer();
if (playerCaster1 != null)
playerCaster1.UpdateCraftSkill(m_spellInfo);
}
Item targetItem = m_targets.GetItemTarget();
if (!Convert.ToBoolean(_triggeredCastFlags & TriggerCastFlags.IgnorePowerAndReagentCost))
{