diff options
| author | Mikhail Redko <ovitnez@gmail.com> | 2021-10-01 17:33:21 +0300 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-03-19 16:55:55 +0100 |
| commit | 72a4fccaab4e83801c33c533cbcfdba1c6c43022 (patch) | |
| tree | 5703361b82071bd33b551536450a91d83193cf02 /src/server/game/Handlers/NPCHandler.cpp | |
| parent | e33b3e4a81c64fc7c9918c2c15f66f1f259d1fde (diff) | |
Core/Misc: Improvement item durability repair logic. (#26911)
* Core/Misc: Improvement item durability repair logic.
* Move item repair cost calculation logic from Player::DurabilityRepair to Item::CalculateDurabilityRepairCost
* Make item repair cost calculation more congruent with client logic (std::round)
* Do not repair items if player does not have enough money to pay for the repair of all items at once
* Withdrawing money from guild bank only once to avoid spam in the guild bank log and reduce number of transactions in the database
Closes #25937
* Fix build
* Remove unnecessary scope
* Fix visual studio warning and one more check for reliability
(cherry picked from commit 3cef126d0a449219f154a6498d26831f86220dfa)
Diffstat (limited to 'src/server/game/Handlers/NPCHandler.cpp')
| -rw-r--r-- | src/server/game/Handlers/NPCHandler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp index 4366175f1b7..d19a83da7a7 100644 --- a/src/server/game/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -583,7 +583,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPackets::Item::RepairItem& packet Item* item = _player->GetItemByGuid(packet.ItemGUID); if (item) - _player->DurabilityRepair(item->GetPos(), true, discountMod, packet.UseGuildBank); + _player->DurabilityRepair(item->GetPos(), true, discountMod); } else { |
