예제 #1
0
        public static void CharacterCreation(NetState state, PacketReader reader)
        {
            if (state.Account == null || state.Account.AccountState != EAccountState.Char)
            {
                state.Disconnect();
                return;
            }

            string name      = reader.ReadString(24);
            byte   attrStr   = reader.ReadByte();
            byte   attrAgi   = reader.ReadByte();
            byte   attrVit   = reader.ReadByte();
            byte   attrInt   = reader.ReadByte();
            byte   attrDex   = reader.ReadByte();
            byte   attrLuk   = reader.ReadByte();
            byte   slot      = reader.ReadByte();
            short  hairColor = reader.ReadInt16();
            short  hairStyle = reader.ReadInt16();

            Character newChar = null;
            ECharacterCreationResult result = Character.Create(state.Account, name, slot, attrStr, attrAgi, attrVit, attrInt, attrDex, attrLuk, hairColor, hairStyle, out newChar);

            if (result != ECharacterCreationResult.Success)
            {
                state.Send(new Response.CharacterCreationResponse(result));
                return;
            }

            // Creation was successfull, send new characterlist
            state.Send(new Response.NewCharacterData(newChar));
        }
예제 #2
0
		public CharacterResponseCreation(ECharacterCreationResult result)
			: base(0x6E, 3) {
			Write((byte)result);
		}
예제 #3
0
 public CharacterResponseCreation(ECharacterCreationResult result)
     : base(0x6E, 3)
 {
     Write((byte)result);
 }