From 531c80c2af4b8cf4d260638ddbda7383eedd1cde Mon Sep 17 00:00:00 2001 From: Carlos Pessoa Date: Mon, 8 Jan 2024 20:29:29 -0300 Subject: [PATCH] fix: removing amulet charges when use bow --- src/creatures/players/player.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 0b5da33dc41..0ff9094e03c 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -5350,6 +5350,10 @@ int32_t Player::getPerfectShotDamage(uint8_t range, bool useCharges) const { continue; } + if (!itemType.abilities->perfectShotRange) { + continue; + } + if (itemType.abilities->perfectShotRange == range) { result += itemType.abilities->perfectShotDamage; uint16_t charges = item->getCharges();