From 5a167e1b75ffcc5fa594894483ec3aaaf042abf1 Mon Sep 17 00:00:00 2001 From: Elson Costa Date: Tue, 19 Mar 2024 18:12:02 -0300 Subject: [PATCH] Added check of target monster to remove error message in console. --- src/creatures/combat/combat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/creatures/combat/combat.cpp b/src/creatures/combat/combat.cpp index 532f4d48bb1..59dabf3937b 100644 --- a/src/creatures/combat/combat.cpp +++ b/src/creatures/combat/combat.cpp @@ -2131,7 +2131,7 @@ void Combat::applyExtensions(std::shared_ptr caster, std::shared_ptrgetSkillLevel(SKILL_CRITICAL_HIT_CHANCE); bonus = player->getSkillLevel(SKILL_CRITICAL_HIT_DAMAGE); - if (target) { + if (target && target->getMonster()) { uint16_t playerCharmRaceid = player->parseRacebyCharm(CHARM_LOW, false, 0); if (playerCharmRaceid != 0) { const auto mType = g_monsters().getMonsterType(target->getName());