From db26dacba34bd3dee25053e30aeaf0265e37302f Mon Sep 17 00:00:00 2001 From: codinablack Date: Sun, 22 Dec 2024 14:46:53 -0600 Subject: [PATCH] Changed some checks for healing combat during bockhit (imbuements) - Had a private reported bug about healing combat triggering imbuements, this should resolve that. --- src/creature.cpp | 4 ++-- src/player.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/creature.cpp b/src/creature.cpp index a07f77d2..0f63b40a 100644 --- a/src/creature.cpp +++ b/src/creature.cpp @@ -870,7 +870,7 @@ BlockType_t Creature::blockHit(Creature* attacker, CombatType_t combatType, int3 } } - if (attacker) + if (attacker && combatType != COMBAT_HEALING && blockType == BLOCK_NONE) { Player* attackerPlayer = attacker->getPlayer(); if (attackerPlayer) { @@ -881,7 +881,7 @@ BlockType_t Creature::blockHit(Creature* attacker, CombatType_t combatType, int3 continue; } - if (item->hasImbuements() && blockType == BLOCK_NONE) { + if (item->hasImbuements()) { for (auto& imbuement : item->getImbuements()) { diff --git a/src/player.cpp b/src/player.cpp index c8c6169c..e8a50c21 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -2662,7 +2662,7 @@ BlockType_t Player::blockHit(Creature* attacker, CombatType_t combatType, int32_ g_game.transformItem(item, item->getID(), charges - 1); } - if (item->hasImbuements()) { + if (item->hasImbuements() && combatType != COMBAT_HEALING) { for (auto imbuement : item->getImbuements()) { switch (imbuement->imbuetype) { case ImbuementType::IMBUEMENT_TYPE_FIRE_RESIST: