From 998f34842b75c954060879a5889ec72a7208572e Mon Sep 17 00:00:00 2001 From: nytmyr <53322305+nytmyr@users.noreply.github.com> Date: Sun, 22 Dec 2024 00:35:29 -0600 Subject: [PATCH] Missing IsInGroupOrRaid cleanup --- zone/attack.cpp | 4 ++-- zone/bot_commands/cast.cpp | 2 +- zone/bot_commands/depart.cpp | 2 +- zone/mob.cpp | 2 +- zone/mob.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 130d5e293..d1c862096 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -2624,10 +2624,10 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy bool owner_in_group = false; if ( - give_exp->IsInGroupOrRaid(give_exp->GetUltimateOwner(), nullptr, RuleB(Bots, SameRaidGroupForXP)) || + give_exp->IsInGroupOrRaid(give_exp->GetUltimateOwner(), RuleB(Bots, SameRaidGroupForXP)) || give_exp->IsPet() && give_exp->GetOwner() && - give_exp->GetOwner()->IsInGroupOrRaid(give_exp->GetUltimateOwner(), nullptr, RuleB(Bots, SameRaidGroupForXP)) + give_exp->GetOwner()->IsInGroupOrRaid(give_exp->GetUltimateOwner(), RuleB(Bots, SameRaidGroupForXP)) ) { owner_in_group = true; } diff --git a/zone/bot_commands/cast.cpp b/zone/bot_commands/cast.cpp index 709e91956..d02c9f2a9 100644 --- a/zone/bot_commands/cast.cpp +++ b/zone/bot_commands/cast.cpp @@ -506,7 +506,7 @@ void bot_command_cast(Client* c, const Seperator* sep) if ( IsBotSpellTypeBeneficial(spellType) && !RuleB(Bots, CrossRaidBuffingAndHealing) && - !bot_iter->IsInGroupOrRaid(newTar, nullptr, true) + !bot_iter->IsInGroupOrRaid(newTar, true) ) { continue; } diff --git a/zone/bot_commands/depart.cpp b/zone/bot_commands/depart.cpp index a78f89168..23bb375b1 100644 --- a/zone/bot_commands/depart.cpp +++ b/zone/bot_commands/depart.cpp @@ -164,7 +164,7 @@ void bot_command_depart(Client* c, const Seperator* sep) std::map> listZones; for (auto bot_iter : sbl) { - if (!bot_iter->IsInGroupOrRaid(tar, nullptr, !single)) { + if (!bot_iter->IsInGroupOrRaid(tar, !single)) { continue; } diff --git a/zone/mob.cpp b/zone/mob.cpp index 0ef303bfe..e28b0b8a9 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -9965,7 +9965,7 @@ bool Mob::IsInGroupOrRaid(Mob *other, bool sameRaidGroup) { Raid* raid = nullptr; - if (IsBot) { + if (IsBot()) { CastToBot()->GetStoredRaid(); } else { diff --git a/zone/mob.h b/zone/mob.h index ba81182f1..3d2ab96b4 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -781,7 +781,7 @@ public: virtual bool HasGroup() = 0; virtual Raid* GetRaid() = 0; virtual Group* GetGroup() = 0; - bool IsInGroupOrRaid(Mob* other, Raid* raid = nullptr, bool sameRaidGroup = false); + bool IsInGroupOrRaid(Mob* other, bool sameRaidGroup = false); //Faction virtual inline int32 GetPrimaryFaction() const { return 0; }