|
|
|
@ -83,7 +83,8 @@ namespace MWClass
|
|
|
|
|
|
|
|
|
|
if (ptr.getCellRef().getSoul() != "")
|
|
|
|
|
{
|
|
|
|
|
const ESM::Creature *creature = MWBase::Environment::get().getWorld()->getStore().get<ESM::Creature>().find(ref->mRef.getSoul());
|
|
|
|
|
const ESM::Creature *creature = MWBase::Environment::get().getWorld()->getStore().get<ESM::Creature>().search(ref->mRef.getSoul());
|
|
|
|
|
if (creature)
|
|
|
|
|
value *= creature->mData.mSoul;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -148,7 +149,8 @@ namespace MWClass
|
|
|
|
|
|
|
|
|
|
if (ref->mRef.getSoul() != "")
|
|
|
|
|
{
|
|
|
|
|
const ESM::Creature *creature = store.get<ESM::Creature>().find(ref->mRef.getSoul());
|
|
|
|
|
const ESM::Creature *creature = store.get<ESM::Creature>().search(ref->mRef.getSoul());
|
|
|
|
|
if (creature)
|
|
|
|
|
info.caption += " (" + creature->mName + ")";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -210,7 +212,7 @@ namespace MWClass
|
|
|
|
|
|
|
|
|
|
std::shared_ptr<MWWorld::Action> Miscellaneous::use (const MWWorld::Ptr& ptr) const
|
|
|
|
|
{
|
|
|
|
|
if (ptr.getCellRef().getSoul().empty())
|
|
|
|
|
if (ptr.getCellRef().getSoul().empty() || !MWBase::Environment::get().getWorld()->getStore().get<ESM::Creature>().search(ptr.getCellRef().getSoul()))
|
|
|
|
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::NullAction());
|
|
|
|
|
else
|
|
|
|
|
return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionSoulgem(ptr));
|
|
|
|
|