1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-24 09:39:51 +00:00

Another small enchanting fix

This commit is contained in:
Glorf 2013-04-03 18:25:40 +02:00
parent 2179619721
commit 08e9bb0236

View File

@ -7,6 +7,7 @@
#include "creaturestats.hpp" #include "creaturestats.hpp"
#include "npcstats.hpp" #include "npcstats.hpp"
#include <boost/algorithm/string.hpp>
namespace MWMechanics namespace MWMechanics
{ {
@ -56,7 +57,7 @@ namespace MWMechanics
enchantment.mData.mCharge = getGemCharge(); enchantment.mData.mCharge = getGemCharge();
//Exception for Azura Star, it's not destroyed after enchanting //Exception for Azura Star, it's not destroyed after enchanting
if(mSoulGemPtr.get<ESM::Miscellaneous>()->mBase->mId=="Misc_SoulGem_Azura") if(boost::iequals(mSoulGemPtr.get<ESM::Miscellaneous>()->mBase->mId, "Misc_SoulGem_Azura"))
mSoulGemPtr.getCellRef().mSoul=""; mSoulGemPtr.getCellRef().mSoul="";
else else
mSoulGemPtr.getRefData().setCount (mSoulGemPtr.getRefData().getCount()-1); mSoulGemPtr.getRefData().setCount (mSoulGemPtr.getRefData().getCount()-1);