Example #1
0
 private static void SendCharOKResponse(WorldClient client, WorldCharacter character)
 {
     using (var packet = new Packet(SH5Type.CharCreationOK))
     {
         packet.WriteByte(1);
         PacketHelper.WriteBasicCharInfo(character, packet);
         client.SendPacket(packet);
     }
 }
Example #2
0
        private static void SendCharacterList(WorldClient client)
        {
            if (!client.LoadCharacters())
            {
                SendError(client, ServerError.DATABASE_ERROR);
                return;
            }

            using (var packet = new Packet(SH3Type.CharacterList))
            {
                packet.WriteUShort(client.RandomID);
                packet.WriteByte((byte)client.Characters.Count);
                foreach (WorldCharacter ch in client.Characters.Values)
                {
                    PacketHelper.WriteBasicCharInfo(ch, packet);
                }
                client.SendPacket(packet);
            }
        }