1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 22:45:34 +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()) switch(mEnchanting.getCastStyle())
{ {
case 0: case ESM::CS_CastOnce:
mTypeButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastOnce","Cast Once")); mTypeButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastOnce","Cast Once"));
mAddEffectDialog.constantEffect=false; mAddEffectDialog.constantEffect=false;
break; break;
case 1: case ESM::CS_WhenStrikes:
mTypeButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastWhenStrikes", "When Strikes")); mTypeButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastWhenStrikes", "When Strikes"));
mAddEffectDialog.constantEffect=false; mAddEffectDialog.constantEffect=false;
break; break;
case 2: case ESM::CS_WhenUsed:
mTypeButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastWhenUsed", "When Used")); mTypeButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastWhenUsed", "When Used"));
mAddEffectDialog.constantEffect=false; mAddEffectDialog.constantEffect=false;
break; break;
case 3: case ESM::CS_ConstantEffect:
mTypeButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastConstant", "Cast Constant")); mTypeButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastConstant", "Cast Constant"));
mAddEffectDialog.constantEffect=true; mAddEffectDialog.constantEffect=true;
break; break;

View file

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