diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 27afba4a..62535583 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -11699,9 +11699,8 @@ void GameHandler::targetEnemy(bool reverse) { for (const auto& [guid, entity] : entities) { if (entity->getType() == ObjectType::UNIT) { - // Check if hostile (this is simplified - would need faction checking) auto unit = std::dynamic_pointer_cast(entity); - if (unit && guid != playerGuid) { + if (unit && guid != playerGuid && unit->isHostile()) { hostiles.push_back(guid); } }