Skip to content

Commit

Permalink
Changed some checks for healing combat during bockhit (imbuements)
Browse files Browse the repository at this point in the history
- Had a private reported bug about healing combat triggering imbuements, this should resolve that.
  • Loading branch information
Codinablack committed Dec 22, 2024
1 parent 6bca150 commit db26dac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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()) {

Expand Down
2 changes: 1 addition & 1 deletion src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit db26dac

Please sign in to comment.