diff --git a/source/Changelog.txt b/source/Changelog.txt index f64afbc3..3da6c65a 100644 --- a/source/Changelog.txt +++ b/source/Changelog.txt @@ -1,3 +1,6 @@ +4/8/2024 - Dragon Slayer + Added Run a skillcheck for NPC to give them a chance to gain skill - if that option is enabled in ini (xuri) + 1/05/2024 - Dragon Slayer/Xuri Fixed AutoUnequipAttempt function in clumsy.js, createfood.js level1target.js, will no longer fail on casting and return to hardcode. Fixed createfood to check for reagents on cast. diff --git a/source/magic.cpp b/source/magic.cpp index d04ab3f9..11918c52 100644 --- a/source/magic.cpp +++ b/source/magic.cpp @@ -4499,6 +4499,11 @@ void CMagic::CastSpell( CSocket *s, CChar *caster ) caster->StopSpell(); return; } + else if( caster->IsNpc() ) + { + // Run a skillcheck for NPC to give them a chance to gain skill - if that option is enabled in ini + Skills->CheckSkill( caster, MAGERY, lowSkill, highSkill ); + } if( curSpell > 63 && static_cast(curSpell) <= spellCount && spellCount <= 70 ) {