mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 02:15:32 +00:00
Replacement of some magical constants
This commit is contained in:
parent
cfbdf3f779
commit
252a1d9223
2 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue