mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-14 08:23:52 +00:00
feat(repair): DBC-based repair cost estimation and UI display
Calculate repair costs client-side using DurabilityCosts.dbc and DurabilityQuality.dbc. Block repair when player can't afford it and only apply optimistic durability/gold updates when cost is verified. Show repair cost next to the Repair All button in the vendor window.
This commit is contained in:
parent
3dec33ecf1
commit
53244d025c
7 changed files with 160 additions and 14 deletions
|
|
@ -5936,6 +5936,11 @@ void GameHandler::repairAll(uint64_t vendorGuid, bool useGuildBank) {
|
|||
if (inventoryHandler_) inventoryHandler_->repairAll(vendorGuid, useGuildBank);
|
||||
}
|
||||
|
||||
uint32_t GameHandler::estimateRepairAllCost() const {
|
||||
if (inventoryHandler_) return inventoryHandler_->estimateRepairAllCost();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void GameHandler::sellItem(uint64_t vendorGuid, uint64_t itemGuid, uint32_t count) {
|
||||
if (inventoryHandler_) inventoryHandler_->sellItem(vendorGuid, itemGuid, count);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue