Beispiel #1
0
 private void WriteSlotInfo(SLOT s,Account p,string client,SendGPacket pk)
 {
     pk.writeC((byte)s._id);
     pk.writeD(s._equip._red);
     pk.writeD(s._equip._blue);
     pk.writeD(s._equip._helmet);
     pk.writeD(s._equip._beret);
     pk.writeD(s._equip._dino);
     pk.writeD(s._equip._primary);
     pk.writeD(s._equip._secondary);
     pk.writeD(s._equip._melee);
     pk.writeD(s._equip._grenade);
     pk.writeD(s._equip._special);
     pk.writeD(0);
     if (p != null)
     {
         pk.writeC((byte)p._titles.Equiped1);
         pk.writeC((byte)p._titles.Equiped2);
         pk.writeC((byte)p._titles.Equiped3);
     }
     else
     {
         pk.writeB(new byte[3]);
     }
     if (!(client == "1.15.42"))
     {
         return;
     }
     pk.writeD(0);
 }
Beispiel #2
0
        public static void Load(Account pl, Account member, int type)
        {
            if (pl == null)
            {
                return;
            }
            GameServerModel server = Game_SyncNet.GetServer(pl._status);

            if (server == null)
            {
                return;
            }
            using (SendGPacket sendGpacket = new SendGPacket())
            {
                sendGpacket.writeH((short)16);
                sendGpacket.writeQ(pl.player_id);
                sendGpacket.writeC((byte)type);
                switch (type)
                {
                case 1:
                    sendGpacket.writeQ(member.player_id);
                    sendGpacket.writeC((byte)(member.player_name.Length + 1));
                    sendGpacket.writeS(member.player_name, member.player_name.Length + 1);
                    sendGpacket.writeB(member._status.buffer);
                    sendGpacket.writeC((byte)member._rank);
                    break;

                case 2:
                    sendGpacket.writeQ(member.player_id);
                    break;

                case 3:
                    sendGpacket.writeD(pl.clanId);
                    sendGpacket.writeC((byte)pl.clanAccess);
                    break;
                }
                Game_SyncNet.SendPacket(sendGpacket.mstream.ToArray(), server.Connection);
            }
        }
Beispiel #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pl">Conta principal</param>
        /// <param name="member"></param>
        /// <param name="type">0=Zerar players e clanId|1=Adicionar|2=Remover|3=att clanid e aux</param>
        public static void Load(Account pl, Account member, int type)
        {
            if (pl == null)
            {
                return;
            }
            GameServerModel gs = Game_SyncNet.GetServer(pl._status);

            if (gs == null)
            {
                return;
            }

            using (SendGPacket pk = new SendGPacket())
            {
                pk.writeH(16);
                pk.writeQ(pl.player_id);
                pk.writeC((byte)type);
                if (type == 1) //adicionar
                {
                    pk.writeQ(member.player_id);
                    pk.writeC((byte)(member.player_name.Length + 1));
                    pk.writeS(member.player_name, member.player_name.Length + 1);
                    pk.writeB(member._status.buffer);
                    pk.writeC((byte)member._rank);
                }
                else if (type == 2) //remover
                {
                    pk.writeQ(member.player_id);
                }
                else if (type == 3) //atualizar id do clã e aux
                {
                    pk.writeD(pl.clanId);
                    pk.writeC((byte)pl.clanAccess);
                }
                Game_SyncNet.SendPacket(pk.mstream.ToArray(), gs._syncConn);
            }
        }