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
+1 -1
View File
@@ -763,7 +763,7 @@ RULE_REAL(Bots, ManaRegen, 2.0, "Adjust mana regen. Acts as a final multiplier,
RULE_BOOL(Bots, PreferNoManaCommandSpells, true, "Give sorting priority to newer no-mana spells (i.e., 'Bind Affinity')")
RULE_BOOL(Bots, QuestableSpawnLimit, false, "Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl")
RULE_INT(Bots, SpawnLimit, 71, "Number of bots a character can have spawned at one time, You + 71 bots is a 12 group pseudo-raid")
RULE_BOOL(Bots, BotGroupXP, false, "Determines whether client gets experience for bots outside their group")
RULE_BOOL(Bots, SameRaidGroupForXP, false, "Whether or not bots are required to be in the same raid group to give exp. Default false")
RULE_BOOL(Bots, BotLevelsWithOwner, false, "Auto-updates spawned bots as owner levels/de-levels (false is original behavior)")
RULE_INT(Bots, BotCharacterLevel, 0, "If level is greater that value player can spawn bots if BotCharacterLevelEnabled is true")
RULE_INT(Bots, CasterStopMeleeLevel, 13, "Level at which caster bots stop melee attacks")
+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;
}
}