[Bug Fix] Add required distance to CoTH before aggro wipe (#2253)

* Add required distance to CoTH before aggro wipe

This should fix eqemu/master#2205

* Remove implied this->

* Adjustments to rules per PR discussion.
This commit is contained in:
Michael
2022-07-02 22:51:57 -04:00
committed by GitHub
parent d107226ced
commit 68d28bcd3e
4 changed files with 27 additions and 7 deletions
+8
View File
@@ -2091,6 +2091,14 @@ Group *EntityList::GetGroupByID(uint32 group_id)
return nullptr;
}
bool EntityList::IsInSameGroupOrRaidGroup(Client *client1, Client *client2) {
Group* group = entity_list.GetGroupByClient(client1);
Raid* raid = entity_list.GetRaidByClient(client1);
return (group && group->IsGroupMember(client2))
|| (raid && raid->IsRaidMember(client2->GetName()) && raid->GetGroup(client1) == raid->GetGroup(client2));
}
Group *EntityList::GetGroupByClient(Client *client)
{
std::list <Group *>::iterator iterator;