示例#1
0
        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));
        }
示例#2
0
        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));
        }
示例#3
0
 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);
         }
 }
示例#4
0
        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);
                    }
                }
        }
示例#5
0
 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);
 }
示例#6
0
 public void Send(ISendPacket packet)
 {
     PlayersOnline.Each(player => packet.Send(player.Connection));
 }
示例#7
0
 public void Send(ISendPacket packet)
 {
     PlayersOnline.Each(player => packet.Send(player.Connection));
 }
示例#8
0
        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);
 }