mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Add missing skill increases for Enchant skill
This commit is contained in:
parent
cab535dd69
commit
74e42a2d02
@ -471,6 +471,9 @@ namespace MWClass
|
|||||||
|
|
||||||
MWMechanics::CastSpell cast(ptr, victim);
|
MWMechanics::CastSpell cast(ptr, victim);
|
||||||
cast.cast(weapon);
|
cast.cast(weapon);
|
||||||
|
|
||||||
|
if (ptr.getRefData().getHandle() == "player")
|
||||||
|
skillUsageSucceeded (ptr, ESM::Skill::Enchant, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,6 +169,8 @@ void Recharge::onItemClicked(MyGUI::Widget *sender)
|
|||||||
item.getClass().getEnchantment(item));
|
item.getClass().getEnchantment(item));
|
||||||
item.getCellRef().mEnchantmentCharge =
|
item.getCellRef().mEnchantmentCharge =
|
||||||
std::min(item.getCellRef().mEnchantmentCharge + restored, static_cast<float>(enchantment->mData.mCharge));
|
std::min(item.getCellRef().mEnchantmentCharge + restored, static_cast<float>(enchantment->mData.mCharge));
|
||||||
|
|
||||||
|
player.getClass().skillUsageSucceeded (player, ESM::Skill::Enchant, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
gem.getContainerStore()->remove(gem, 1, player);
|
gem.getContainerStore()->remove(gem, 1, player);
|
||||||
|
@ -72,7 +72,7 @@ namespace MWMechanics
|
|||||||
if(getEnchantChance()<std::rand()/static_cast<double> (RAND_MAX)*100)
|
if(getEnchantChance()<std::rand()/static_cast<double> (RAND_MAX)*100)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
MWWorld::Class::get (mEnchanter).skillUsageSucceeded (mEnchanter, ESM::Skill::Enchant, 1);
|
MWWorld::Class::get (mEnchanter).skillUsageSucceeded (mEnchanter, ESM::Skill::Enchant, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mCastStyle==ESM::Enchantment::ConstantEffect)
|
if(mCastStyle==ESM::Enchantment::ConstantEffect)
|
||||||
|
@ -303,6 +303,9 @@ namespace MWMechanics
|
|||||||
MWBase::Environment::get().getWindowManager()->setSelectedEnchantItem(item); // Set again to show the modified charge
|
MWBase::Environment::get().getWindowManager()->setSelectedEnchantItem(item); // Set again to show the modified charge
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mCaster.getRefData().getHandle() == "player")
|
||||||
|
mCaster.getClass().skillUsageSucceeded (mCaster, ESM::Skill::Enchant, 1);
|
||||||
|
|
||||||
inflict(mCaster, mCaster, enchantment->mEffects, ESM::RT_Self);
|
inflict(mCaster, mCaster, enchantment->mEffects, ESM::RT_Self);
|
||||||
|
|
||||||
if (!mTarget.isEmpty())
|
if (!mTarget.isEmpty())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user