mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-09 22:20:24 +00:00
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:
+5
-15
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user