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)); }
public CharacterResponseCreation(ECharacterCreationResult result) : base(0x6E, 3) { Write((byte)result); }
public CharacterResponseCreation(ECharacterCreationResult result) : base(0x6E, 3) { Write((byte)result); }