Aura.Channel.World.Party.Broadcast C# (CSharp) Method

Broadcast() public method

Sends the supplied packet to all members, with the option of replacing the EntityID with each member's personal ID, and excluding a specific creature.
public Broadcast ( Packet packet, bool useMemberEntityId = false, Creature exclude = null ) : void
packet Packet
useMemberEntityId bool
exclude Aura.Channel.World.Entities.Creature
return void
		public void Broadcast(Packet packet, bool useMemberEntityId = false, Creature exclude = null)
		{
			lock (_sync)
			{
				foreach (var member in _members)
				{
					if (useMemberEntityId)
						packet.Id = member.EntityId;

					if (exclude != member)
						member.Client.Send(packet);
				}
			}
		}

Usage Example

Beispiel #1
0
		/// <summary>
		/// Broadcasts QuestUpdate in party.
		/// </summary>
		/// <param name="creature"></param>
		/// <param name="quest"></param>
		public static void QuestUpdate(Party party, Quest quest)
		{
			var packet = new Packet(Op.QuestUpdate, 0);
			packet.AddQuestUpdate(quest);

			party.Broadcast(packet, true);
		}
All Usage Examples Of Aura.Channel.World.Party::Broadcast