|
|
|
@ -65,7 +65,7 @@ namespace MWClass
|
|
|
|
|
{
|
|
|
|
|
const 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
|
|
|
|
|
return (ref->mBase->mData.mType < ESM::Weapon::MarksmanThrown); // thrown weapons and arrows/bolts don't have health, only quantity
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int Weapon::getItemMaxHealth (const MWWorld::ConstPtr& ptr) const
|
|
|
|
@ -318,21 +318,26 @@ namespace MWClass
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ref->mBase->mData.mType < 11) // thrown weapons and arrows/bolts don't have health, only quantity
|
|
|
|
|
if (hasItemHealth(ptr))
|
|
|
|
|
{
|
|
|
|
|
int remainingHealth = getItemHealth(ptr);
|
|
|
|
|
text += "\n#{sCondition}: " + MWGui::ToolTips::toString(remainingHealth) + "/"
|
|
|
|
|
+ MWGui::ToolTips::toString(ref->mBase->mData.mHealth);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// add reach and attack speed for melee weapon
|
|
|
|
|
if (ref->mBase->mData.mType < 9 && Settings::Manager::getBool("show melee info", "Game"))
|
|
|
|
|
const bool verbose = Settings::Manager::getBool("show melee info", "Game");
|
|
|
|
|
// add reach for melee weapon
|
|
|
|
|
if (ref->mBase->mData.mType < ESM::Weapon::MarksmanBow && verbose)
|
|
|
|
|
{
|
|
|
|
|
// 64 game units = 1 yard = 3 ft, display value in feet
|
|
|
|
|
const float combatDistance = store.get<ESM::GameSetting>().find("fCombatDistance")->mValue.getFloat() * ref->mBase->mData.mReach;
|
|
|
|
|
text += MWGui::ToolTips::getWeightString(combatDistance*3/64, "#{sRange}");
|
|
|
|
|
text += " #{sFeet}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// add attack speed for any weapon excepts arrows and bolts
|
|
|
|
|
if (ref->mBase->mData.mType < ESM::Weapon::Arrow && verbose)
|
|
|
|
|
{
|
|
|
|
|
text += MWGui::ToolTips::getPercentString(ref->mBase->mData.mSpeed, "#{sAttributeSpeed}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|