Core/Spells: Implemented SUMMON_PROP_FLAG_PERSONAL_GROUP_SPAWN
Port From (https://github.com/TrinityCore/TrinityCore/commit/2398c1e23c57cf5b6ac778b09a09d28e2704fd75)
This commit is contained in:
@@ -1113,6 +1113,11 @@ namespace Game.Entities
|
||||
if (_privateObjectOwner == seer.GetPrivateObjectOwner())
|
||||
return true;
|
||||
|
||||
Player playerSeer = seer.ToPlayer();
|
||||
if (playerSeer != null)
|
||||
if (playerSeer.IsInGroup(_privateObjectOwner))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -149,6 +149,21 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsInGroup(ObjectGuid groupGuid)
|
||||
{
|
||||
Group group = GetGroup();
|
||||
if (group != null)
|
||||
if (group.GetGUID() == groupGuid)
|
||||
return true;
|
||||
|
||||
Group originalGroup = GetOriginalGroup();
|
||||
if (originalGroup != null)
|
||||
if (originalGroup.GetGUID() == groupGuid)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void SetGroup(Group group, byte subgroup = 0)
|
||||
{
|
||||
if (!group)
|
||||
|
||||
Reference in New Issue
Block a user