Missing IsInGroupOrRaid cleanup

This commit is contained in:
nytmyr
2024-12-22 00:35:29 -06:00
parent 39b1f57ef3
commit 998f34842b
5 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -2624,10 +2624,10 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
bool owner_in_group = false; bool owner_in_group = false;
if ( 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->IsPet() &&
give_exp->GetOwner() && 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; owner_in_group = true;
} }
+1 -1
View File
@@ -506,7 +506,7 @@ void bot_command_cast(Client* c, const Seperator* sep)
if ( if (
IsBotSpellTypeBeneficial(spellType) && IsBotSpellTypeBeneficial(spellType) &&
!RuleB(Bots, CrossRaidBuffingAndHealing) && !RuleB(Bots, CrossRaidBuffingAndHealing) &&
!bot_iter->IsInGroupOrRaid(newTar, nullptr, true) !bot_iter->IsInGroupOrRaid(newTar, true)
) { ) {
continue; continue;
} }
+1 -1
View File
@@ -164,7 +164,7 @@ void bot_command_depart(Client* c, const Seperator* sep)
std::map<std::string, std::pair<uint8_t, uint8_t>> listZones; std::map<std::string, std::pair<uint8_t, uint8_t>> listZones;
for (auto bot_iter : sbl) { for (auto bot_iter : sbl) {
if (!bot_iter->IsInGroupOrRaid(tar, nullptr, !single)) { if (!bot_iter->IsInGroupOrRaid(tar, !single)) {
continue; continue;
} }
+1 -1
View File
@@ -9965,7 +9965,7 @@ bool Mob::IsInGroupOrRaid(Mob *other, bool sameRaidGroup) {
Raid* raid = nullptr; Raid* raid = nullptr;
if (IsBot) { if (IsBot()) {
CastToBot()->GetStoredRaid(); CastToBot()->GetStoredRaid();
} }
else { else {
+1 -1
View File
@@ -781,7 +781,7 @@ public:
virtual bool HasGroup() = 0; virtual bool HasGroup() = 0;
virtual Raid* GetRaid() = 0; virtual Raid* GetRaid() = 0;
virtual Group* GetGroup() = 0; virtual Group* GetGroup() = 0;
bool IsInGroupOrRaid(Mob* other, Raid* raid = nullptr, bool sameRaidGroup = false); bool IsInGroupOrRaid(Mob* other, bool sameRaidGroup = false);
//Faction //Faction
virtual inline int32 GetPrimaryFaction() const { return 0; } virtual inline int32 GetPrimaryFaction() const { return 0; }