mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04:00
Thrown weapons, arrows and bolts shouldn't have item health
This commit is contained in:
parent
20774f8f81
commit
78f3f19f62
@ -75,7 +75,10 @@ namespace MWClass
|
|||||||
|
|
||||||
bool Weapon::hasItemHealth (const MWWorld::Ptr& ptr) const
|
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
|
int Weapon::getItemMaxHealth (const MWWorld::Ptr& ptr) const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user