public void Send(Creature creature, ISendPacket packet) { Player player = creature as Player; if (player != null) { if (player.Connection != null) packet.Send(player.Connection); } creature.VisiblePlayers.Each(p => packet.Send(p.Connection)); }
public void Send(Creature creature, ISendPacket packet) { Player player = creature as Player; if (player != null) { if (player.Connection != null) { packet.Send(player.Connection); } } creature.VisiblePlayers.Each(p => packet.Send(p.Connection)); }
public void SendPacketToGuildMembers(ISendPacket packet, Guild guild, Player sender = null) { lock (guild.MembersLock) foreach ( KeyValuePair <Player, int> guildMember in guild.GuildMembers.Where( guildMember => Communication.Global.PlayerService.IsPlayerOnline(guildMember.Key) && !guildMember.Key.Equals(sender))) { packet.Send(guildMember.Key.Connection); } }
public void SendPacketToPartyMembers(Party party, ISendPacket packet, Player sender = null) { if (party == null) { return; } lock (party.MemberLock) foreach (Player member in party.PartyMembers) { if (!member.Equals(sender) && Communication.Global.PlayerService.IsPlayerOnline(member)) { packet.Send(member.Connection); } } }
public void SendPacketToGuildMembers(ISendPacket packet, Guild guild, Player sender = null) { lock (guild.MembersLock) foreach ( KeyValuePair<Player, int> guildMember in guild.GuildMembers.Where( guildMember => Communication.Global.PlayerService.IsPlayerOnline(guildMember.Key) && !guildMember.Key.Equals(sender))) packet.Send(guildMember.Key.Connection); }
public void Send(ISendPacket packet) { PlayersOnline.Each(player => packet.Send(player.Connection)); }
public void SendPacketToPartyMembers(Party party, ISendPacket packet, Player sender = null) { if (party == null) return; lock (party.MemberLock) foreach (Player member in party.PartyMembers) if (!member.Equals(sender) && Communication.Global.PlayerService.IsPlayerOnline(member)) packet.Send(member.Connection); }
public void Send(ClientSocket serverSocket, ISendPacket iSendPacket) { iSendPacket.Send(serverSocket); }