Core/Creatures: Fixed GMs being considered in party/raid with nearby creatures without CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT
Ref #19340
This commit is contained in:
1 parent
9fb129a1ee
commit
cdff8ab387
1 file changed
+6
-8
@@ -14882,8 +14882,8 @@ bool Unit::IsInPartyWith(Unit const* unit) const
|
||||
if (this == unit)
|
||||
return true;
|
||||
|
||||
const Unit* u1 = GetCharmerOrOwnerOrSelf();
|
||||
const Unit* u2 = unit->GetCharmerOrOwnerOrSelf();
|
||||
Unit const* u1 = GetCharmerOrOwnerOrSelf();
|
||||
Unit const* u2 = unit->GetCharmerOrOwnerOrSelf();
|
||||
if (u1 == u2)
|
||||
return true;
|
||||
|
||||
@@ -14893,8 +14893,7 @@ bool Unit::IsInPartyWith(Unit const* unit) const
|
||||
(u1->GetTypeId() == TYPEID_PLAYER && u2->GetTypeId() == TYPEID_UNIT && u2->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT))
|
||||
return true;
|
||||
|
||||
// else u1->GetTypeId() == u2->GetTypeId() == TYPEID_UNIT
|
||||
return u1->getFaction() == u2->getFaction();
|
||||
return u1->GetTypeId() == TYPEID_UNIT && u2->GetTypeId() == TYPEID_UNIT && u1->getFaction() == u2->getFaction();
|
||||
}
|
||||
|
||||
bool Unit::IsInRaidWith(Unit const* unit) const
|
||||
@@ -14902,8 +14901,8 @@ bool Unit::IsInRaidWith(Unit const* unit) const
|
||||
if (this == unit)
|
||||
return true;
|
||||
|
||||
const Unit* u1 = GetCharmerOrOwnerOrSelf();
|
||||
const Unit* u2 = unit->GetCharmerOrOwnerOrSelf();
|
||||
Unit const* u1 = GetCharmerOrOwnerOrSelf();
|
||||
Unit const* u2 = unit->GetCharmerOrOwnerOrSelf();
|
||||
if (u1 == u2)
|
||||
return true;
|
||||
|
||||
@@ -14913,8 +14912,7 @@ bool Unit::IsInRaidWith(Unit const* unit) const
|
||||
(u1->GetTypeId() == TYPEID_PLAYER && u2->GetTypeId() == TYPEID_UNIT && u2->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT))
|
||||
return true;
|
||||
|
||||
// else u1->GetTypeId() == u2->GetTypeId() == TYPEID_UNIT
|
||||
return u1->getFaction() == u2->getFaction();
|
||||
return u1->GetTypeId() == TYPEID_UNIT && u2->GetTypeId() == TYPEID_UNIT && u1->getFaction() == u2->getFaction();
|
||||
}
|
||||
|
||||
void Unit::GetPartyMembers(std::list<Unit*> &TagUnitMap)
|
||||
|
||||
Reference in new issue
Block a user