1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00
This commit is contained in:
Miroslav Puda 2013-05-20 22:34:48 +02:00
commit 51414e2051
3 changed files with 7 additions and 3 deletions

View File

@ -341,13 +341,14 @@ namespace MWClass
if(weapon == invStore.end())
return std::make_pair(1,"");
if(weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::LongBladeTwoHand ||
if(weapon->getTypeName() == typeid(ESM::Weapon).name() &&
(weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::LongBladeTwoHand ||
weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::BluntTwoClose ||
weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::BluntTwoWide ||
weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::SpearTwoWide ||
weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::AxeTwoHand ||
weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::MarksmanBow ||
weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::MarksmanCrossbow)
weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::MarksmanCrossbow))
{
return std::make_pair(3,"");
}

View File

@ -14,6 +14,7 @@ namespace MWMechanics
{
Security::Security(const MWWorld::Ptr &actor)
: mActor(actor)
{
CreatureStats& creatureStats = MWWorld::Class::get(actor).getCreatureStats(actor);
NpcStats& npcStats = MWWorld::Class::get(actor).getNpcStats(actor);

View File

@ -179,7 +179,9 @@ namespace MWWorld
// tool used up?
if (!item.getRefData().getCount())
MWBase::Environment::get().getWindowManager()->setSelectedWeapon(MWWorld::Ptr());
MWBase::Environment::get().getWindowManager()->unsetSelectedWeapon();
else
MWBase::Environment::get().getWindowManager()->setSelectedWeapon(item);
}
}
}