diff options
author | ariel- <ariel-@users.noreply.github.com> | 2016-11-13 17:56:20 -0300 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-12-26 20:30:55 +0100 |
commit | 2eb9791fc9c828957939cf88cc16ec88320289ce (patch) | |
tree | 101b454a5cc3f3a7dc7171b1facae486a73d284d /src | |
parent | 43260b7ebb899e2ee34f6382b3a697b43629a153 (diff) |
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 699e22cb4c8204c7b1302efc01e387f4afb2967f)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 91714961018..4c4cf20e1f2 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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) |