Index: scripts/globals/magic.lua =================================================================== --- scripts/globals/magic.lua (revision 3812) +++ scripts/globals/magic.lua (working copy) @@ -499,7 +499,8 @@ end; function finalMagicAdjustments(caster,target,spell,dmg) - + local skill = spell:getSkillType(); + local recoverMP = 0; -- handle multiple targets if(caster:isSpellAoE(spell:getID())) then local total = spell:getTotalTargets(); @@ -544,7 +545,17 @@ if (target:getObjType() ~= TYPE_PC) then target:addTP(10); end - + + if(skill == 36) then + if(caster:getEquipID(SLOT_BODY) == 10286) then -- Seidr Cotehardie + recoverMP = dmg * .02; + caster:addMP(recoverMP); + end + -- printf("Cure MP Recovered %u",recoverMP); + if(recoverMP > 0) then + caster:messageBasic(25,0,recoverMP); + end + end return dmg; end; Index: src/map/lua/lua_spell.cpp =================================================================== --- src/map/lua/lua_spell.cpp (revision 3812) +++ src/map/lua/lua_spell.cpp (working copy) @@ -126,6 +126,12 @@ return 1; } +inline int32 CLuaSpell::getSkillType(lua_State *L) +{ + DSP_DEBUG_BREAK_IF(m_PLuaSpell == NULL); + lua_pushinteger(L,m_PLuaSpell->getSkillType()); + return 1; +} /************************************************************************ * * * Инициализация методов в lua * @@ -143,5 +149,6 @@ LUNAR_DECLARE_METHOD(CLuaSpell,getTotalTargets), LUNAR_DECLARE_METHOD(CLuaSpell, getID), LUNAR_DECLARE_METHOD(CLuaSpell, getSpellGroup), + LUNAR_DECLARE_METHOD(CLuaSpell, getSkillType), {NULL,NULL} }; \ No newline at end of file Index: src/map/lua/lua_spell.h =================================================================== --- src/map/lua/lua_spell.h (revision 3812) +++ src/map/lua/lua_spell.h (working copy) @@ -55,6 +55,7 @@ int32 getElement(lua_State*); int32 getID(lua_State*); int32 getSpellGroup(lua_State*); + int32 getSkillType(lua_State*); }; #endif \ No newline at end of file