mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Merge branch 'master' of https://github.com/zinnschlag/openmw
This commit is contained in:
commit
51414e2051
@ -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,"");
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user