Get rid of Bots:BotGroupXP and change logic to support Bots:SameRaidGroupForXP

Bots won't do anything if not in the same group so this should more accurately control only when in the same raid group.
This commit is contained in:
nytmyr
2024-12-13 14:48:59 -06:00
parent 1905debb14
commit 3009942ca3
2 changed files with 6 additions and 16 deletions
+5 -15
View File
@@ -2624,27 +2624,17 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
bool owner_in_group = false;
if (
(
give_exp->HasGroup() &&
give_exp->GetGroup()->IsGroupMember(give_exp->GetUltimateOwner())
) ||
(
give_exp->IsPet() &&
(
give_exp->GetOwner()->IsClient() ||
(
give_exp->GetOwner()->HasGroup() &&
give_exp->GetOwner()->GetGroup()->IsGroupMember(give_exp->GetOwner()->GetUltimateOwner())
)
)
)
give_exp->IsInGroupOrRaid(give_exp->GetUltimateOwner(), RuleB(Bots, SameRaidGroupForXP)) ||
give_exp->IsPet() &&
give_exp->GetOwner() &&
give_exp->GetOwner()->IsInGroupOrRaid(give_exp->GetUltimateOwner(), RuleB(Bots, SameRaidGroupForXP))
) {
owner_in_group = true;
}
give_exp = give_exp->GetUltimateOwner();
if (!RuleB(Bots, BotGroupXP) && !owner_in_group) {
if (!owner_in_group) {
give_exp = nullptr;
}
}