1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:53:52 +00:00

Merge pull request #2436 from Capostrophic/enchanting

Correct cast style behavior when there's no item picked (bug #5075)
This commit is contained in:
Andrei Kortunov 2019-06-29 13:01:13 +04:00 committed by GitHub
commit 633b8e26ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -106,6 +106,7 @@
Bug #5060: Magic effect visuals stop when death animation begins instead of when it ends Bug #5060: Magic effect visuals stop when death animation begins instead of when it ends
Bug #5063: Shape named "Tri Shadow" in creature mesh is visible if it isn't hidden Bug #5063: Shape named "Tri Shadow" in creature mesh is visible if it isn't hidden
Bug #5069: Blocking creatures' attacks doesn't degrade shields Bug #5069: Blocking creatures' attacks doesn't degrade shields
Bug #5075: Enchanting cast style can be changed if there's no object
Feature #1774: Handle AvoidNode Feature #1774: Handle AvoidNode
Feature #2229: Improve pathfinding AI Feature #2229: Improve pathfinding AI
Feature #3025: Analogue gamepad movement controls Feature #3025: Analogue gamepad movement controls

View file

@ -102,10 +102,7 @@ namespace MWMechanics
void Enchanting::nextCastStyle() void Enchanting::nextCastStyle()
{ {
if (itemEmpty()) if (itemEmpty())
{
mCastStyle = ESM::Enchantment::WhenUsed;
return; return;
}
const bool powerfulSoul = getGemCharge() >= \ const bool powerfulSoul = getGemCharge() >= \
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find ("iSoulAmountForConstantEffect")->mValue.getInteger(); MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find ("iSoulAmountForConstantEffect")->mValue.getInteger();
@ -267,6 +264,8 @@ namespace MWMechanics
void Enchanting::setEnchanter(const MWWorld::Ptr& enchanter) void Enchanting::setEnchanter(const MWWorld::Ptr& enchanter)
{ {
mEnchanter = enchanter; mEnchanter = enchanter;
// Reset cast style
mCastStyle = ESM::Enchantment::CastOnce;
} }
int Enchanting::getEnchantChance() const int Enchanting::getEnchantChance() const