mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/Creatures: Fixed GMs being considered in party/raid with nearby creatures without CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT
Ref #19340
(cherry picked from commit eea16ce356)
This commit is contained in:
@@ -12179,8 +12179,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;
|
||||
|
||||
@@ -12190,8 +12190,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
|
||||
@@ -12199,8 +12198,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;
|
||||
|
||||
@@ -12210,8 +12209,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