Send() 공개 정적인 메소드

public static Send ( LobbyClient client ) : void
client LobbyClient
리턴 void
        static public void Send(LobbyClient client)
        {
            Program.CharMgr.LoadCharacters(client.Account.Id);

            CharacterInfo[] _Chars = Program.CharMgr.GetInfos(client.Account.Id);
            WorldInfo       Info   = Program.CharMgr.GetWorldInfo(client.Account.WorldId);

            PacketOut Out = new PacketOut((UInt32)Opcodes.CHARACTER_LIST);

            Out.WriteByte((byte)_Chars.Length);
            foreach (CharacterInfo Char in _Chars)
            {
                Out.WriteByte(Char.Character.SlotId);
                Out.WriteByte(Char.Character.Faction);
                Out.WriteByte((byte)(Info.RpcID == 0 ? 0 : 1));
                Out.WriteUInt32R((UInt32)Info._Info.Id);
                Out.WriteUnicodeString(Info._Info.Name, 32);
                Out.WriteUnicodeString(Char.Character.Name, 32);
            }

            client.SendTCP(Out);

            if (_Chars.Length <= 0)
            {
                WORLD_LIST.Send(client);
            }
        }
예제 #2
0
        static public void HandlePacket(BaseClient client, PacketIn packet)
        {
            LobbyClient cclient = client as LobbyClient;

            WORLD_LIST.Send(cclient);
        }