Core/Units: consider summoned units with a creator guid also as party or raid member

the old logic was built on the false assumption that all units like totems have a ownerguid - they do not. They only have a creatorguid. Ownerguids (as the name implies) is only applied on units that the player is actively controlling. 3.3.5 has this implemented in a wrong way while 4.x does not.

*also fixed up more cherrypick mistakes while at it
This commit is contained in:
Ovahlord committed 2022-09-12 09:15:31 +02:00
1 parent 3976ae557b
commit 6a71b6d053
6 files changed
+22 -12

No files matched your search

+4 -4
View File
@@ -11830,8 +11830,8 @@ bool Unit::IsInPartyWith(Unit const* unit) const
if (this == unit)
return true;
Unit const* u1 = GetCharmerOrOwnerOrSelf();
Unit const* u2 = unit->GetCharmerOrOwnerOrSelf();
Unit const* u1 = GetCharmerOrOwnerOrCreatorOrSelf();
Unit const* u2 = unit->GetCharmerOrOwnerOrCreatorOrSelf();
if (u1 == u2)
return true;
@@ -11849,8 +11849,8 @@ bool Unit::IsInRaidWith(Unit const* unit) const
if (this == unit)
return true;
Unit const* u1 = GetCharmerOrOwnerOrSelf();
Unit const* u2 = unit->GetCharmerOrOwnerOrSelf();
Unit const* u1 = GetCharmerOrOwnerOrCreatorOrSelf();
Unit const* u2 = unit->GetCharmerOrOwnerOrCreatorOrSelf();
if (u1 == u2)
return true;