Playerbot: stop double-crediting grouped bots on kill/NPC-click credit

The core's party-shared credit fires OnKillCredit for every grouped bot on the
quest for both combat kills and non-combat NPC-click objectives. The module
only skipped grouped bots IN combat, so non-combat credits (quest 63447 'Fear
No Evil' clicking Injured Stormwind Infantry) were pushed again ->
KilledMonsterCredit -> double count. Skip the push for any grouped bot; only
ungrouped bots need the module's credit.
This commit is contained in:
devbox
2026-08-18 18:39:37 +10:00
parent 877866f122
commit 80667a6bf7
+7 -3
View File
@@ -3225,9 +3225,13 @@ void Module::OnKillCredit(Player* player, uint32 entry, ObjectGuid guid)
if (bot->GetMapId() != player->GetMapId())
continue;
// Block combat kills only when the owner is actively fighting.
// NPC interactions (click injured soldier) happen outside combat.
if (og && og->IsMember(bot->GetGUID()) && player->IsInCombat())
// Grouped bots are already credited by the core's party-shared
// kill-credit system when nearby and on the quest — for COMBAT kills
// AND non-combat credits like NPC-click objectives (observed: quest
// 63447 "Fear No Evil", clicking Injured Stormwind Infantry fires
// OnKillCredit for every grouped bot). Pushing again double-counts
// the objective. Only push to bots NOT in the owner's group.
if (og && og->IsMember(bot->GetGUID()))
continue;
TC_LOG_ERROR("playerbot.v2",