From 198f79b7e135b5d60d6f93319f80802e48aad1ec Mon Sep 17 00:00:00 2001 From: Elson Costa Date: Thu, 21 Mar 2024 09:04:42 -0300 Subject: [PATCH] fix: removed error message 'monster with name not exist' in console (#2471) --- 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 3ad2b8610f0..cf98fcb6a7b 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());