mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Add weapon stats to inventory tooltips and fix login camera pitch
- propagate item damage range and delay into ItemDef during inventory rebuild - show weapon damage, speed, and DPS in inventory/character slot tooltips - fix online spawn camera pitch sign so third-person camera starts above ground
This commit is contained in:
parent
1de2f4c8a0
commit
dd8f04ac99
4 changed files with 29 additions and 1 deletions
|
|
@ -1471,6 +1471,16 @@ void InventoryScreen::renderItemTooltip(const game::ItemDef& item) {
|
|||
}
|
||||
}
|
||||
|
||||
if (item.damageMax > 0.0f) {
|
||||
ImGui::Text("%.0f - %.0f Damage", item.damageMin, item.damageMax);
|
||||
if (item.delayMs > 0) {
|
||||
float speed = static_cast<float>(item.delayMs) / 1000.0f;
|
||||
float dps = ((item.damageMin + item.damageMax) * 0.5f) / speed;
|
||||
ImGui::Text("Speed %.2f", speed);
|
||||
ImGui::Text("%.1f damage per second", dps);
|
||||
}
|
||||
}
|
||||
|
||||
// Armor
|
||||
if (item.armor > 0) {
|
||||
ImGui::Text("%d Armor", item.armor);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue