mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +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
efab73b037
commit
f1269b93a1
4 changed files with 29 additions and 1 deletions
|
|
@ -34,6 +34,9 @@ struct ItemDef {
|
||||||
uint32_t stackCount = 1;
|
uint32_t stackCount = 1;
|
||||||
uint32_t maxStack = 1;
|
uint32_t maxStack = 1;
|
||||||
uint32_t bagSlots = 0;
|
uint32_t bagSlots = 0;
|
||||||
|
float damageMin = 0.0f;
|
||||||
|
float damageMax = 0.0f;
|
||||||
|
uint32_t delayMs = 0;
|
||||||
// Stats
|
// Stats
|
||||||
int32_t armor = 0;
|
int32_t armor = 0;
|
||||||
int32_t stamina = 0;
|
int32_t stamina = 0;
|
||||||
|
|
|
||||||
|
|
@ -2537,7 +2537,7 @@ void Application::loadOnlineWorldTerrain(uint32_t mapId, float x, float y, float
|
||||||
// Set camera position
|
// Set camera position
|
||||||
if (renderer->getCameraController()) {
|
if (renderer->getCameraController()) {
|
||||||
renderer->getCameraController()->setOnlineMode(true);
|
renderer->getCameraController()->setOnlineMode(true);
|
||||||
renderer->getCameraController()->setDefaultSpawn(spawnRender, 0.0f, 15.0f);
|
renderer->getCameraController()->setDefaultSpawn(spawnRender, 0.0f, -15.0f);
|
||||||
renderer->getCameraController()->reset();
|
renderer->getCameraController()->reset();
|
||||||
renderer->getCameraController()->startIntroPan(2.8f, 140.0f);
|
renderer->getCameraController()->startIntroPan(2.8f, 140.0f);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6145,6 +6145,9 @@ void GameHandler::rebuildOnlineInventory() {
|
||||||
def.maxStack = std::max(1, infoIt->second.maxStack);
|
def.maxStack = std::max(1, infoIt->second.maxStack);
|
||||||
def.displayInfoId = infoIt->second.displayInfoId;
|
def.displayInfoId = infoIt->second.displayInfoId;
|
||||||
def.subclassName = infoIt->second.subclassName;
|
def.subclassName = infoIt->second.subclassName;
|
||||||
|
def.damageMin = infoIt->second.damageMin;
|
||||||
|
def.damageMax = infoIt->second.damageMax;
|
||||||
|
def.delayMs = infoIt->second.delayMs;
|
||||||
def.armor = infoIt->second.armor;
|
def.armor = infoIt->second.armor;
|
||||||
def.stamina = infoIt->second.stamina;
|
def.stamina = infoIt->second.stamina;
|
||||||
def.strength = infoIt->second.strength;
|
def.strength = infoIt->second.strength;
|
||||||
|
|
@ -6180,6 +6183,9 @@ void GameHandler::rebuildOnlineInventory() {
|
||||||
def.maxStack = std::max(1, infoIt->second.maxStack);
|
def.maxStack = std::max(1, infoIt->second.maxStack);
|
||||||
def.displayInfoId = infoIt->second.displayInfoId;
|
def.displayInfoId = infoIt->second.displayInfoId;
|
||||||
def.subclassName = infoIt->second.subclassName;
|
def.subclassName = infoIt->second.subclassName;
|
||||||
|
def.damageMin = infoIt->second.damageMin;
|
||||||
|
def.damageMax = infoIt->second.damageMax;
|
||||||
|
def.delayMs = infoIt->second.delayMs;
|
||||||
def.armor = infoIt->second.armor;
|
def.armor = infoIt->second.armor;
|
||||||
def.stamina = infoIt->second.stamina;
|
def.stamina = infoIt->second.stamina;
|
||||||
def.strength = infoIt->second.strength;
|
def.strength = infoIt->second.strength;
|
||||||
|
|
@ -6250,6 +6256,9 @@ void GameHandler::rebuildOnlineInventory() {
|
||||||
def.maxStack = std::max(1, infoIt->second.maxStack);
|
def.maxStack = std::max(1, infoIt->second.maxStack);
|
||||||
def.displayInfoId = infoIt->second.displayInfoId;
|
def.displayInfoId = infoIt->second.displayInfoId;
|
||||||
def.subclassName = infoIt->second.subclassName;
|
def.subclassName = infoIt->second.subclassName;
|
||||||
|
def.damageMin = infoIt->second.damageMin;
|
||||||
|
def.damageMax = infoIt->second.damageMax;
|
||||||
|
def.delayMs = infoIt->second.delayMs;
|
||||||
def.armor = infoIt->second.armor;
|
def.armor = infoIt->second.armor;
|
||||||
def.stamina = infoIt->second.stamina;
|
def.stamina = infoIt->second.stamina;
|
||||||
def.strength = infoIt->second.strength;
|
def.strength = infoIt->second.strength;
|
||||||
|
|
@ -6287,6 +6296,9 @@ void GameHandler::rebuildOnlineInventory() {
|
||||||
def.maxStack = std::max(1, infoIt->second.maxStack);
|
def.maxStack = std::max(1, infoIt->second.maxStack);
|
||||||
def.displayInfoId = infoIt->second.displayInfoId;
|
def.displayInfoId = infoIt->second.displayInfoId;
|
||||||
def.subclassName = infoIt->second.subclassName;
|
def.subclassName = infoIt->second.subclassName;
|
||||||
|
def.damageMin = infoIt->second.damageMin;
|
||||||
|
def.damageMax = infoIt->second.damageMax;
|
||||||
|
def.delayMs = infoIt->second.delayMs;
|
||||||
def.armor = infoIt->second.armor;
|
def.armor = infoIt->second.armor;
|
||||||
def.stamina = infoIt->second.stamina;
|
def.stamina = infoIt->second.stamina;
|
||||||
def.strength = infoIt->second.strength;
|
def.strength = infoIt->second.strength;
|
||||||
|
|
@ -6348,6 +6360,9 @@ void GameHandler::rebuildOnlineInventory() {
|
||||||
def.maxStack = std::max(1, infoIt->second.maxStack);
|
def.maxStack = std::max(1, infoIt->second.maxStack);
|
||||||
def.displayInfoId = infoIt->second.displayInfoId;
|
def.displayInfoId = infoIt->second.displayInfoId;
|
||||||
def.subclassName = infoIt->second.subclassName;
|
def.subclassName = infoIt->second.subclassName;
|
||||||
|
def.damageMin = infoIt->second.damageMin;
|
||||||
|
def.damageMax = infoIt->second.damageMax;
|
||||||
|
def.delayMs = infoIt->second.delayMs;
|
||||||
def.armor = infoIt->second.armor;
|
def.armor = infoIt->second.armor;
|
||||||
def.stamina = infoIt->second.stamina;
|
def.stamina = infoIt->second.stamina;
|
||||||
def.strength = infoIt->second.strength;
|
def.strength = infoIt->second.strength;
|
||||||
|
|
|
||||||
|
|
@ -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
|
// Armor
|
||||||
if (item.armor > 0) {
|
if (item.armor > 0) {
|
||||||
ImGui::Text("%d Armor", item.armor);
|
ImGui::Text("%d Armor", item.armor);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue