1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 12:35:46 +00:00

Replacement of some magical constants

This commit is contained in:
Miroslav Puda 2013-05-27 15:50:47 +02:00
parent cfbdf3f779
commit 252a1d9223
2 changed files with 6 additions and 6 deletions

View File

@ -72,19 +72,19 @@ namespace MWGui
switch(mEnchanting.getCastStyle())
{
case 0:
case ESM::CS_CastOnce:
mTypeButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastOnce","Cast Once"));
mAddEffectDialog.constantEffect=false;
break;
case 1:
case ESM::CS_WhenStrikes:
mTypeButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastWhenStrikes", "When Strikes"));
mAddEffectDialog.constantEffect=false;
break;
case 2:
case ESM::CS_WhenUsed:
mTypeButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastWhenUsed", "When Used"));
mAddEffectDialog.constantEffect=false;
break;
case 3:
case ESM::CS_ConstantEffect:
mTypeButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastConstant", "Cast Constant"));
mAddEffectDialog.constantEffect=true;
break;

View File

@ -74,7 +74,7 @@ namespace MWMechanics
MWWorld::Class::get (mEnchanter).skillUsageSucceeded (mEnchanter, ESM::Skill::Enchant, 1);
}
if(mCastStyle==3)
if(mCastStyle==ESM::CS_ConstantEffect)
{
enchantment.mData.mCharge=0;
}
@ -255,7 +255,7 @@ namespace MWMechanics
+ (0.125 * creatureStats.getAttribute (ESM::Attribute::Luck).getModified()));
float chance2 = 2.5 * getEnchantCost();
if(mCastStyle==3)
if(mCastStyle==ESM::CS_ConstantEffect)
{
float constantChance = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find ("fEnchantmentConstantChanceMult")->getFloat();
chance2 /= constantChance;