mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 03:32:28 -04:00
Core/Unit: consider creatures with same faction to be on the same party/raid for the purposes of spell/aura targets
Ref #18233
(cherry picked from commit 699e22cb4c)
This commit is contained in:
@@ -11811,8 +11811,9 @@ bool Unit::IsInPartyWith(Unit const* unit) const
|
||||
else if ((u2->GetTypeId() == TYPEID_PLAYER && u1->GetTypeId() == TYPEID_UNIT && u1->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT) ||
|
||||
(u1->GetTypeId() == TYPEID_PLAYER && u2->GetTypeId() == TYPEID_UNIT && u2->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
// else u1->GetTypeId() == u2->GetTypeId() == TYPEID_UNIT
|
||||
return u1->getFaction() == u2->getFaction();
|
||||
}
|
||||
|
||||
bool Unit::IsInRaidWith(Unit const* unit) const
|
||||
@@ -11830,8 +11831,9 @@ bool Unit::IsInRaidWith(Unit const* unit) const
|
||||
else if ((u2->GetTypeId() == TYPEID_PLAYER && u1->GetTypeId() == TYPEID_UNIT && u1->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT) ||
|
||||
(u1->GetTypeId() == TYPEID_PLAYER && u2->GetTypeId() == TYPEID_UNIT && u2->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
// else u1->GetTypeId() == u2->GetTypeId() == TYPEID_UNIT
|
||||
return u1->getFaction() == u2->getFaction();
|
||||
}
|
||||
|
||||
void Unit::GetPartyMembers(std::list<Unit*> &TagUnitMap)
|
||||
|
||||
Reference in New Issue
Block a user