Core/PacketIO: Updated to 11.0.0
Port From (https://github.com/TrinityCore/TrinityCore/commit/e59eef5432c7b70679d33f4911c88d0f7d75fd39)
This commit is contained in:
@@ -646,8 +646,24 @@ namespace Game
|
||||
if (group == null)
|
||||
return false;
|
||||
|
||||
if (group.IsRestrictPingsToAssistants() && !group.IsLeader(player.GetGUID()) && !group.IsAssistant(player.GetGUID()))
|
||||
return false;
|
||||
if (group.IsLeader(player.GetGUID()))
|
||||
return true;
|
||||
|
||||
switch (group.GetRestrictPings())
|
||||
{
|
||||
case RestrictPingsTo.None:
|
||||
return true;
|
||||
case RestrictPingsTo.Lead:
|
||||
return false;
|
||||
case RestrictPingsTo.Assist:
|
||||
if (!group.IsAssistant(player.GetGUID()))
|
||||
return false;
|
||||
break;
|
||||
case RestrictPingsTo.TankHealer:
|
||||
if (!group.GetLfgRoles(player.GetGUID()).HasAnyFlag(LfgRoles.Tank | LfgRoles.Healer))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -662,7 +678,7 @@ namespace Game
|
||||
if (!group.IsLeader(GetPlayer().GetGUID()))
|
||||
return;
|
||||
|
||||
group.SetRestrictPingsToAssistants(setRestrictPingsToAssistants.RestrictPingsToAssistants);
|
||||
group.SetRestrictPingsTo(setRestrictPingsToAssistants.RestrictTo);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.SendPingUnit)]
|
||||
@@ -709,6 +725,7 @@ namespace Game
|
||||
broadcastPingWorldPoint.Point = pingWorldPoint.Point;
|
||||
broadcastPingWorldPoint.Type = pingWorldPoint.Type;
|
||||
broadcastPingWorldPoint.PinFrameID = pingWorldPoint.PinFrameID;
|
||||
broadcastPingWorldPoint.Transport = pingWorldPoint.Transport;
|
||||
broadcastPingWorldPoint.Write();
|
||||
|
||||
for (GroupReference itr = group.GetFirstMember(); itr != null; itr = itr.Next())
|
||||
|
||||
Reference in New Issue
Block a user