From 65de5d75510b899ad3ca91e12f0cedd3144f4c4f Mon Sep 17 00:00:00 2001 From: Carlos Pessoa Date: Fri, 1 Dec 2023 23:29:07 -0300 Subject: [PATCH 1/3] fix: mana drain damage in analyzer --- src/game/game.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/game/game.cpp b/src/game/game.cpp index a9a2786de1a..0b1ab8be6ce 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -7223,7 +7223,13 @@ bool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr< } target->drainMana(attacker, manaLoss); - + if(targetPlayer){ + std::string cause = "(other)"; + if (attacker) { + cause = attacker->getName(); + } + targetPlayer->updateInputAnalyzer(damage.primary.type, damage.primary.value * -1, cause); + } std::stringstream ss; std::string damageString = std::to_string(manaLoss); From 6b9cefba446812be4d5f15e1b84752333ad7a180 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 2 Dec 2023 02:31:28 +0000 Subject: [PATCH 2/3] Code format - (Clang-format) --- src/game/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/game.cpp b/src/game/game.cpp index 0b1ab8be6ce..5dcba79adc1 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -7223,7 +7223,7 @@ bool Game::combatChangeMana(std::shared_ptr attacker, std::shared_ptr< } target->drainMana(attacker, manaLoss); - if(targetPlayer){ + if (targetPlayer) { std::string cause = "(other)"; if (attacker) { cause = attacker->getName(); From f0e7d3dab68aca0761fc04a6113193c31566b5a0 Mon Sep 17 00:00:00 2001 From: Carlos Pessoa Date: Sat, 2 Dec 2023 00:18:43 -0300 Subject: [PATCH 3/3] fix yakchal boss --- .../scripts/actions/quests/ice_islands/yakchal.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-otservbr-global/scripts/actions/quests/ice_islands/yakchal.lua b/data-otservbr-global/scripts/actions/quests/ice_islands/yakchal.lua index 47dfafd807a..db81c1606c2 100644 --- a/data-otservbr-global/scripts/actions/quests/ice_islands/yakchal.lua +++ b/data-otservbr-global/scripts/actions/quests/ice_islands/yakchal.lua @@ -13,7 +13,7 @@ end local iceYakchal = Action() function iceYakchal.onUse(player, item, fromPosition, target, toPosition, isHotkey) local sarcophagus = Position(32205, 31002, 14) - if toPosition.x == sarcophagus.x and toPosition.y == sarcophagus.y and toPosition.z == sarcophagus.z and target.itemid == 7362 and item.itemid == 2361 then + if toPosition.x == sarcophagus.x and toPosition.y == sarcophagus.y and toPosition.z == sarcophagus.z and target.itemid == 7362 and item.itemid == 3249 then if Game.getStorageValue(GlobalStorage.Yakchal) < os.time() then Game.setStorageValue(GlobalStorage.Yakchal, os.time() + 24 * 60 * 60) if math.random(2) == 2 then