mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 22:15:32 +00:00
Fix uninitialized flags for custom-made spells
This commit is contained in:
parent
d99e416208
commit
7e10818bdf
2 changed files with 5 additions and 4 deletions
|
@ -422,12 +422,12 @@ namespace MWGui
|
|||
y *= 1.5;
|
||||
}
|
||||
|
||||
mSpell.mData.mCost = int(y);
|
||||
|
||||
ESM::EffectList effectList;
|
||||
effectList.mList = mEffects;
|
||||
mSpell.mEffects = effectList;
|
||||
mSpell.mData.mCost = int(y);
|
||||
mSpell.mData.mType = ESM::Spell::ST_Spell;
|
||||
mSpell.mData.mFlags = 0;
|
||||
|
||||
mMagickaCost->setCaption(boost::lexical_cast<std::string>(int(y)));
|
||||
|
||||
|
|
|
@ -53,6 +53,9 @@ namespace MWMechanics
|
|||
MWWorld::ContainerStore& store = player.getClass().getContainerStore(player);
|
||||
ESM::Enchantment enchantment;
|
||||
enchantment.mData.mCharge = getGemCharge();
|
||||
enchantment.mData.mAutocalc = 0;
|
||||
enchantment.mData.mType = mCastStyle;
|
||||
enchantment.mData.mCost = getEnchantPoints();
|
||||
|
||||
store.remove(mSoulGemPtr, 1, player);
|
||||
|
||||
|
@ -72,8 +75,6 @@ namespace MWMechanics
|
|||
{
|
||||
enchantment.mData.mCharge=0;
|
||||
}
|
||||
enchantment.mData.mType = mCastStyle;
|
||||
enchantment.mData.mCost = getEnchantPoints();
|
||||
enchantment.mEffects = mEffectList;
|
||||
|
||||
// Apply the enchantment
|
||||
|
|
Loading…
Reference in a new issue