Thrown weapons, arrows and bolts shouldn't have item health

This commit is contained in:
scrawl 2013-03-22 14:28:50 +01:00
parent 20774f8f81
commit 78f3f19f62

View file

@ -75,7 +75,10 @@ namespace MWClass
bool Weapon::hasItemHealth (const MWWorld::Ptr& ptr) const
{
return true;
MWWorld::LiveCellRef<ESM::Weapon> *ref =
ptr.get<ESM::Weapon>();
return (ref->mBase->mData.mType < 11); // thrown weapons and arrows/bolts don't have health, only quantity
}
int Weapon::getItemMaxHealth (const MWWorld::Ptr& ptr) const