// Code generated by codegen. DO NOT EDIT.
// Source: common.xml

package generated

import (
	"encoding/binary"
	"math"
	"git.sharkk.net/EQ2/Protocol/types"
)


// CreateCharacter represents packet structure for OP_CreateCharacterRequestMsg
type CreateCharacter struct {
	AccountId uint32 `eq2:"account_id"`
	ServerId uint32 `eq2:"server_id"`
	Name string `eq2:"name,type:str16"`
	Race uint8 `eq2:"race"`
	Gender uint8 `eq2:"gender"`
	Deity uint8 `eq2:"deity"`
	Class uint8 `eq2:"class"`
	Level uint8 `eq2:"level"`
	StartingZone uint8 `eq2:"starting_zone"`
	Unknown1 [2]uint8 `eq2:"unknown1,size:2"`  // TODO: Identify purpose
	RaceFile string `eq2:"race_file,type:str16"`
	SkinColor [3]float32 `eq2:"skin_color,size:3"`
	EyeColor [3]float32 `eq2:"eye_color,size:3"`
	HairColor1 [3]float32 `eq2:"hair_color1,size:3"`
	HairColor2 [3]float32 `eq2:"hair_color2,size:3"`
	HairHighlight [3]float32 `eq2:"hair_highlight,size:3"`
	Unknown2 [26]uint8 `eq2:"unknown2,size:26"`  // TODO: Identify purpose
	HairFile string `eq2:"hair_file,type:str16"`
	HairTypeColor [3]float32 `eq2:"hair_type_color,size:3"`
	HairTypeHighlightColor [3]float32 `eq2:"hair_type_highlight_color,size:3"`
	FaceFile string `eq2:"face_file,type:str16"`
	HairFaceColor [3]float32 `eq2:"hair_face_color,size:3"`
	HairFaceHighlightColor [3]float32 `eq2:"hair_face_highlight_color,size:3"`
	ChestFile string `eq2:"chest_file,type:str16"`
	ShirtColor [3]float32 `eq2:"shirt_color,size:3"`
	UnknownChestColor [3]float32 `eq2:"unknown_chest_color,size:3"`  // TODO: Identify purpose
	LegsFile string `eq2:"legs_file,type:str16"`
	PantsColor [3]float32 `eq2:"pants_color,size:3"`
	UnknownLegsColor [3]float32 `eq2:"unknown_legs_color,size:3"`  // TODO: Identify purpose
	Unknown9 [3]float32 `eq2:"unknown9,size:3"`  // TODO: Identify purpose
	Eyes2 [3]float32 `eq2:"eyes2,size:3"`
	Ears [3]float32 `eq2:"ears,size:3"`
	EyeBrows [3]float32 `eq2:"eye_brows,size:3"`
	Cheeks [3]float32 `eq2:"cheeks,size:3"`
	Lips [3]float32 `eq2:"lips,size:3"`
	Chin [3]float32 `eq2:"chin,size:3"`
	Nose [3]float32 `eq2:"nose,size:3"`
	BodySize float32 `eq2:"body_size"`
	BodyAge float32 `eq2:"body_age"`
}

// Serialize writes the packet data to the provided buffer
func (p *CreateCharacter) Serialize(dest []byte) uint32 {
	offset := uint32(0)
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.AccountId))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.ServerId))
	offset += 4
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.Name)))
	offset += 2
	copy(dest[offset:], []byte(p.Name))
	offset += uint32(len(p.Name))
	dest[offset] = byte(p.Race)
	offset++
	dest[offset] = byte(p.Gender)
	offset++
	dest[offset] = byte(p.Deity)
	offset++
	dest[offset] = byte(p.Class)
	offset++
	dest[offset] = byte(p.Level)
	offset++
	dest[offset] = byte(p.StartingZone)
	offset++
	for i := 0; i < 2; i++ {
		dest[offset] = p.Unknown1[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.RaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.RaceFile))
	offset += uint32(len(p.RaceFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SkinColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairColor1[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairColor2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairHighlight[i]))
		offset += 4
	}
	for i := 0; i < 26; i++ {
		dest[offset] = p.Unknown2[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.HairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.HairFile))
	offset += uint32(len(p.HairFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairTypeColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairTypeHighlightColor[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.FaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.FaceFile))
	offset += uint32(len(p.FaceFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairFaceColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairFaceHighlightColor[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.ChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.ChestFile))
	offset += uint32(len(p.ChestFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.ShirtColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.UnknownChestColor[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.LegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.LegsFile))
	offset += uint32(len(p.LegsFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.PantsColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.UnknownLegsColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Unknown9[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Eyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Ears[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Cheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Lips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Chin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Nose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodyAge))
	offset += 4
	return offset
}

// Size returns the serialized size of the packet
func (p *CreateCharacter) Size() uint32 {
	size := uint32(0)
	size += 4
	size += 4
	size += 2 + uint32(len(p.Name))
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += uint32(2)
	size += 2 + uint32(len(p.RaceFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(26)
	size += 2 + uint32(len(p.HairFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 2 + uint32(len(p.FaceFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 2 + uint32(len(p.ChestFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 2 + uint32(len(p.LegsFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	return size
}

// CreateCharacterV373 represents packet structure for OP_CreateCharacterRequestMsg
type CreateCharacterV373 struct {
	Unknown0 uint32 `eq2:"unknown0"`  // TODO: Identify purpose
	AccountId uint32 `eq2:"account_id"`
	ServerId uint32 `eq2:"server_id"`
	Name string `eq2:"name,type:str16"`
	Race uint8 `eq2:"race"`
	Gender uint8 `eq2:"gender"`
	Deity uint8 `eq2:"deity"`
	Class uint8 `eq2:"class"`
	Level uint8 `eq2:"level"`
	StartingZone uint8 `eq2:"starting_zone"`
	Unknown1 [2]uint8 `eq2:"unknown1,size:2"`  // TODO: Identify purpose
	RaceFile string `eq2:"race_file,type:str16"`
	SkinColor [3]float32 `eq2:"skin_color,size:3"`
	EyeColor [3]float32 `eq2:"eye_color,size:3"`
	HairColor1 [3]float32 `eq2:"hair_color1,size:3"`
	HairColor2 [3]float32 `eq2:"hair_color2,size:3"`
	HairHighlight [3]float32 `eq2:"hair_highlight,size:3"`
	Unknown2 [26]uint8 `eq2:"unknown2,size:26"`  // TODO: Identify purpose
	HairFile string `eq2:"hair_file,type:str16"`
	HairTypeColor [3]float32 `eq2:"hair_type_color,size:3"`
	HairTypeHighlightColor [3]float32 `eq2:"hair_type_highlight_color,size:3"`
	FaceFile string `eq2:"face_file,type:str16"`
	HairFaceColor [3]float32 `eq2:"hair_face_color,size:3"`
	HairFaceHighlightColor [3]float32 `eq2:"hair_face_highlight_color,size:3"`
	ChestFile string `eq2:"chest_file,type:str16"`
	ShirtColor [3]float32 `eq2:"shirt_color,size:3"`
	UnknownChestColor [3]float32 `eq2:"unknown_chest_color,size:3"`  // TODO: Identify purpose
	LegsFile string `eq2:"legs_file,type:str16"`
	PantsColor [3]float32 `eq2:"pants_color,size:3"`
	UnknownLegsColor [3]float32 `eq2:"unknown_legs_color,size:3"`  // TODO: Identify purpose
	Unknown9 [3]float32 `eq2:"unknown9,size:3"`  // TODO: Identify purpose
	Eyes2 [3]float32 `eq2:"eyes2,size:3"`
	Ears [3]float32 `eq2:"ears,size:3"`
	EyeBrows [3]float32 `eq2:"eye_brows,size:3"`
	Cheeks [3]float32 `eq2:"cheeks,size:3"`
	Lips [3]float32 `eq2:"lips,size:3"`
	Chin [3]float32 `eq2:"chin,size:3"`
	Nose [3]float32 `eq2:"nose,size:3"`
	BodySize float32 `eq2:"body_size"`
	BodyAge float32 `eq2:"body_age"`
}

// Serialize writes the packet data to the provided buffer
func (p *CreateCharacterV373) Serialize(dest []byte) uint32 {
	offset := uint32(0)
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.Unknown0))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.AccountId))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.ServerId))
	offset += 4
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.Name)))
	offset += 2
	copy(dest[offset:], []byte(p.Name))
	offset += uint32(len(p.Name))
	dest[offset] = byte(p.Race)
	offset++
	dest[offset] = byte(p.Gender)
	offset++
	dest[offset] = byte(p.Deity)
	offset++
	dest[offset] = byte(p.Class)
	offset++
	dest[offset] = byte(p.Level)
	offset++
	dest[offset] = byte(p.StartingZone)
	offset++
	for i := 0; i < 2; i++ {
		dest[offset] = p.Unknown1[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.RaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.RaceFile))
	offset += uint32(len(p.RaceFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SkinColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairColor1[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairColor2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairHighlight[i]))
		offset += 4
	}
	for i := 0; i < 26; i++ {
		dest[offset] = p.Unknown2[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.HairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.HairFile))
	offset += uint32(len(p.HairFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairTypeColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairTypeHighlightColor[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.FaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.FaceFile))
	offset += uint32(len(p.FaceFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairFaceColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairFaceHighlightColor[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.ChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.ChestFile))
	offset += uint32(len(p.ChestFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.ShirtColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.UnknownChestColor[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.LegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.LegsFile))
	offset += uint32(len(p.LegsFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.PantsColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.UnknownLegsColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Unknown9[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Eyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Ears[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Cheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Lips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Chin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Nose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodyAge))
	offset += 4
	return offset
}

// Size returns the serialized size of the packet
func (p *CreateCharacterV373) Size() uint32 {
	size := uint32(0)
	size += 4
	size += 4
	size += 4
	size += 2 + uint32(len(p.Name))
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += uint32(2)
	size += 2 + uint32(len(p.RaceFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(26)
	size += 2 + uint32(len(p.HairFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 2 + uint32(len(p.FaceFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 2 + uint32(len(p.ChestFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 2 + uint32(len(p.LegsFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	return size
}

// CreateCharacterV546 represents packet structure for OP_CreateCharacterRequestMsg
type CreateCharacterV546 struct {
	Unknown0 uint8 `eq2:"unknown0"`  // TODO: Identify purpose
	Unknown1 uint32 `eq2:"unknown1"`  // TODO: Identify purpose
	AccountId uint32 `eq2:"account_id"`
	ServerId uint32 `eq2:"server_id"`
	Name string `eq2:"name,type:str16"`
	Race uint8 `eq2:"race"`
	Gender uint8 `eq2:"gender"`
	Deity uint8 `eq2:"deity"`
	Class uint8 `eq2:"class"`
	Level uint8 `eq2:"level"`
	StartingZone uint8 `eq2:"starting_zone"`
	CcUnknown0 uint8 `eq2:"cc_unknown_0"`
	Version uint8 `eq2:"version"`
	RaceFile string `eq2:"race_file,type:str16"`
	SkinColor [3]float32 `eq2:"skin_color,size:3"`
	EyeColor [3]float32 `eq2:"eye_color,size:3"`
	HairColor1 [3]float32 `eq2:"hair_color1,size:3"`
	HairColor2 [3]float32 `eq2:"hair_color2,size:3"`
	HairHighlight [3]float32 `eq2:"hair_highlight,size:3"`
	Unknown2 [26]uint8 `eq2:"unknown2,size:26"`  // TODO: Identify purpose
	HairFile string `eq2:"hair_file,type:str16"`
	HairTypeColor [3]float32 `eq2:"hair_type_color,size:3"`
	HairTypeHighlightColor [3]float32 `eq2:"hair_type_highlight_color,size:3"`
	FaceFile string `eq2:"face_file,type:str16"`
	HairFaceColor [3]float32 `eq2:"hair_face_color,size:3"`
	HairFaceHighlightColor [3]float32 `eq2:"hair_face_highlight_color,size:3"`
	ChestFile string `eq2:"chest_file,type:str16"`
	ShirtColor [3]float32 `eq2:"shirt_color,size:3"`
	UnknownChestColor [3]float32 `eq2:"unknown_chest_color,size:3"`  // TODO: Identify purpose
	LegsFile string `eq2:"legs_file,type:str16"`
	PantsColor [3]float32 `eq2:"pants_color,size:3"`
	UnknownLegsColor [3]float32 `eq2:"unknown_legs_color,size:3"`  // TODO: Identify purpose
	Unknown9 [3]float32 `eq2:"unknown9,size:3"`  // TODO: Identify purpose
	Eyes2 [3]float32 `eq2:"eyes2,size:3"`
	Ears [3]float32 `eq2:"ears,size:3"`
	EyeBrows [3]float32 `eq2:"eye_brows,size:3"`
	Cheeks [3]float32 `eq2:"cheeks,size:3"`
	Lips [3]float32 `eq2:"lips,size:3"`
	Chin [3]float32 `eq2:"chin,size:3"`
	Nose [3]float32 `eq2:"nose,size:3"`
	BodySize float32 `eq2:"body_size"`
	BodyAge float32 `eq2:"body_age"`
}

// Serialize writes the packet data to the provided buffer
func (p *CreateCharacterV546) Serialize(dest []byte) uint32 {
	offset := uint32(0)
	dest[offset] = byte(p.Unknown0)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.Unknown1))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.AccountId))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.ServerId))
	offset += 4
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.Name)))
	offset += 2
	copy(dest[offset:], []byte(p.Name))
	offset += uint32(len(p.Name))
	dest[offset] = byte(p.Race)
	offset++
	dest[offset] = byte(p.Gender)
	offset++
	dest[offset] = byte(p.Deity)
	offset++
	dest[offset] = byte(p.Class)
	offset++
	dest[offset] = byte(p.Level)
	offset++
	dest[offset] = byte(p.StartingZone)
	offset++
	dest[offset] = byte(p.CcUnknown0)
	offset++
	dest[offset] = byte(p.Version)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.RaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.RaceFile))
	offset += uint32(len(p.RaceFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SkinColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairColor1[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairColor2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairHighlight[i]))
		offset += 4
	}
	for i := 0; i < 26; i++ {
		dest[offset] = p.Unknown2[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.HairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.HairFile))
	offset += uint32(len(p.HairFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairTypeColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairTypeHighlightColor[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.FaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.FaceFile))
	offset += uint32(len(p.FaceFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairFaceColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairFaceHighlightColor[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.ChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.ChestFile))
	offset += uint32(len(p.ChestFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.ShirtColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.UnknownChestColor[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.LegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.LegsFile))
	offset += uint32(len(p.LegsFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.PantsColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.UnknownLegsColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Unknown9[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Eyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Ears[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Cheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Lips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Chin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Nose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodyAge))
	offset += 4
	return offset
}

// Size returns the serialized size of the packet
func (p *CreateCharacterV546) Size() uint32 {
	size := uint32(0)
	size += 1
	size += 4
	size += 4
	size += 4
	size += 2 + uint32(len(p.Name))
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 2 + uint32(len(p.RaceFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(26)
	size += 2 + uint32(len(p.HairFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 2 + uint32(len(p.FaceFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 2 + uint32(len(p.ChestFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 2 + uint32(len(p.LegsFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	return size
}

// CreateCharacterV561 represents packet structure for OP_CreateCharacterRequestMsg
type CreateCharacterV561 struct {
	Unknown0 uint8 `eq2:"unknown0"`  // TODO: Identify purpose
	Unknown1 uint32 `eq2:"unknown1"`  // TODO: Identify purpose
	AccountId uint32 `eq2:"account_id"`
	ServerId uint32 `eq2:"server_id"`
	Name string `eq2:"name,type:str16"`
	Race uint8 `eq2:"race"`
	Gender uint8 `eq2:"gender"`
	Deity uint8 `eq2:"deity"`
	Class uint8 `eq2:"class"`
	Level uint8 `eq2:"level"`
	StartingZone uint8 `eq2:"starting_zone"`
	Version uint8 `eq2:"version"`
	RaceFile string `eq2:"race_file,type:str16"`
	SkinColor [3]float32 `eq2:"skin_color,size:3"`
	EyeColor [3]float32 `eq2:"eye_color,size:3"`
	HairColor1 [3]float32 `eq2:"hair_color1,size:3"`
	HairColor2 [3]float32 `eq2:"hair_color2,size:3"`
	HairHighlight [3]float32 `eq2:"hair_highlight,size:3"`
	Unknown2 [26]uint8 `eq2:"unknown2,size:26"`  // TODO: Identify purpose
	HairFile string `eq2:"hair_file,type:str16"`
	HairTypeColor [3]float32 `eq2:"hair_type_color,size:3"`
	HairTypeHighlightColor [3]float32 `eq2:"hair_type_highlight_color,size:3"`
	FaceFile string `eq2:"face_file,type:str16"`
	HairFaceColor [3]float32 `eq2:"hair_face_color,size:3"`
	HairFaceHighlightColor [3]float32 `eq2:"hair_face_highlight_color,size:3"`
	ChestFile string `eq2:"chest_file,type:str16"`
	ShirtColor [3]float32 `eq2:"shirt_color,size:3"`
	UnknownChestColor [3]float32 `eq2:"unknown_chest_color,size:3"`  // TODO: Identify purpose
	LegsFile string `eq2:"legs_file,type:str16"`
	PantsColor [3]float32 `eq2:"pants_color,size:3"`
	UnknownLegsColor [3]float32 `eq2:"unknown_legs_color,size:3"`  // TODO: Identify purpose
	Unknown9 [3]float32 `eq2:"unknown9,size:3"`  // TODO: Identify purpose
	Eyes2 [3]float32 `eq2:"eyes2,size:3"`
	Ears [3]float32 `eq2:"ears,size:3"`
	EyeBrows [3]float32 `eq2:"eye_brows,size:3"`
	Cheeks [3]float32 `eq2:"cheeks,size:3"`
	Lips [3]float32 `eq2:"lips,size:3"`
	Chin [3]float32 `eq2:"chin,size:3"`
	Nose [3]float32 `eq2:"nose,size:3"`
	BodySize float32 `eq2:"body_size"`
	BodyAge float32 `eq2:"body_age"`
}

// Serialize writes the packet data to the provided buffer
func (p *CreateCharacterV561) Serialize(dest []byte) uint32 {
	offset := uint32(0)
	dest[offset] = byte(p.Unknown0)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.Unknown1))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.AccountId))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.ServerId))
	offset += 4
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.Name)))
	offset += 2
	copy(dest[offset:], []byte(p.Name))
	offset += uint32(len(p.Name))
	dest[offset] = byte(p.Race)
	offset++
	dest[offset] = byte(p.Gender)
	offset++
	dest[offset] = byte(p.Deity)
	offset++
	dest[offset] = byte(p.Class)
	offset++
	dest[offset] = byte(p.Level)
	offset++
	dest[offset] = byte(p.StartingZone)
	offset++
	dest[offset] = byte(p.Version)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.RaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.RaceFile))
	offset += uint32(len(p.RaceFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SkinColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairColor1[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairColor2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairHighlight[i]))
		offset += 4
	}
	for i := 0; i < 26; i++ {
		dest[offset] = p.Unknown2[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.HairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.HairFile))
	offset += uint32(len(p.HairFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairTypeColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairTypeHighlightColor[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.FaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.FaceFile))
	offset += uint32(len(p.FaceFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairFaceColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.HairFaceHighlightColor[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.ChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.ChestFile))
	offset += uint32(len(p.ChestFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.ShirtColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.UnknownChestColor[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.LegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.LegsFile))
	offset += uint32(len(p.LegsFile))
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.PantsColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.UnknownLegsColor[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Unknown9[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Eyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Ears[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Cheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Lips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Chin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Nose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodyAge))
	offset += 4
	return offset
}

// Size returns the serialized size of the packet
func (p *CreateCharacterV561) Size() uint32 {
	size := uint32(0)
	size += 1
	size += 4
	size += 4
	size += 4
	size += 2 + uint32(len(p.Name))
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 2 + uint32(len(p.RaceFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(26)
	size += 2 + uint32(len(p.HairFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 2 + uint32(len(p.FaceFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 2 + uint32(len(p.ChestFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 2 + uint32(len(p.LegsFile))
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	return size
}

// CreateCharacterV562 represents packet structure for OP_CreateCharacterRequestMsg
type CreateCharacterV562 struct {
	Unknown0 uint8 `eq2:"unknown0"`  // TODO: Identify purpose
	Unknown1 uint32 `eq2:"unknown1"`  // TODO: Identify purpose
	AccountId uint32 `eq2:"account_id"`
	Unknown3 uint8 `eq2:"unknown3"`  // TODO: Identify purpose
	ServerId uint32 `eq2:"server_id"`
	Name string `eq2:"name,type:str16"`
	Race uint8 `eq2:"race"`
	Gender uint8 `eq2:"gender"`
	Deity uint8 `eq2:"deity"`
	Class uint8 `eq2:"class"`
	Level uint8 `eq2:"level"`
	StartingZone uint8 `eq2:"starting_zone"`
	Version uint8 `eq2:"version"`
	RaceFile string `eq2:"race_file,type:str16"`
	SkinColor types.Color `eq2:"skin_color"`
	SkinColor2 types.Color `eq2:"skin_color2"`
	EyeColor types.Color `eq2:"eye_color"`
	HairColor1 types.Color `eq2:"hair_color1"`
	HairColor2 types.Color `eq2:"hair_color2"`
	Unknown8 [26]uint8 `eq2:"unknown8,size:26"`  // TODO: Identify purpose
	HairFile string `eq2:"hair_file,type:str16"`
	HairTypeColor types.Color `eq2:"hair_type_color"`
	HairTypeHighlightColor types.Color `eq2:"hair_type_highlight_color"`
	FaceFile string `eq2:"face_file,type:str16"`
	HairFaceColor types.Color `eq2:"hair_face_color"`
	HairFaceHighlightColor types.Color `eq2:"hair_face_highlight_color"`
	WingFile string `eq2:"wing_file,type:str16"`
	WingColor1 types.Color `eq2:"wing_color1"`
	WingColor2 types.Color `eq2:"wing_color2"`
	ChestFile string `eq2:"chest_file,type:str16"`
	ShirtColor types.Color `eq2:"shirt_color"`
	UnknownChestColor types.Color `eq2:"unknown_chest_color"`  // TODO: Identify purpose
	LegsFile string `eq2:"legs_file,type:str16"`
	PantsColor types.Color `eq2:"pants_color"`
	UnknownLegsColor types.Color `eq2:"unknown_legs_color"`  // TODO: Identify purpose
	Unknown9 types.Color `eq2:"unknown9"`  // TODO: Identify purpose
	Eyes2 [3]float32 `eq2:"eyes2,size:3"`
	Ears [3]float32 `eq2:"ears,size:3"`
	EyeBrows [3]float32 `eq2:"eye_brows,size:3"`
	Cheeks [3]float32 `eq2:"cheeks,size:3"`
	Lips [3]float32 `eq2:"lips,size:3"`
	Chin [3]float32 `eq2:"chin,size:3"`
	Nose [3]float32 `eq2:"nose,size:3"`
	BodySize float32 `eq2:"body_size"`
	BodyAge float32 `eq2:"body_age"`
	SogaVersion uint8 `eq2:"soga_version"`
	SogaRaceFile string `eq2:"soga_race_file,type:str16"`
	SogaSkinColor types.Color `eq2:"soga_skin_color"`
	SogaEyeColor types.Color `eq2:"soga_eye_color"`
	SogaHairColor1 types.Color `eq2:"soga_hair_color1"`
	SogaHairColor2 types.Color `eq2:"soga_hair_color2"`
	SogaHairHighlight types.Color `eq2:"soga_hair_highlight"`
	SogaUnknown11 [26]uint8 `eq2:"soga_unknown11,size:26"`
	SogaHairFile string `eq2:"soga_hair_file,type:str16"`
	SogaHairTypeColor types.Color `eq2:"soga_hair_type_color"`
	SogaHairTypeHighlightColor types.Color `eq2:"soga_hair_type_highlight_color"`
	SogaFaceFile string `eq2:"soga_face_file,type:str16"`
	SogaHairFaceColor types.Color `eq2:"soga_hair_face_color"`
	SogaHairFaceHighlightColor types.Color `eq2:"soga_hair_face_highlight_color"`
	SogaWingFile string `eq2:"soga_wing_file,type:str16"`
	SogaWingColor1 types.Color `eq2:"soga_wing_color1"`
	SogaWingColor2 types.Color `eq2:"soga_wing_color2"`
	SogaChestFile string `eq2:"soga_chest_file,type:str16"`
	SogaShirtColor types.Color `eq2:"soga_shirt_color"`
	SogaUnknownChestColor types.Color `eq2:"soga_unknown_chest_color"`
	SogaLegsFile string `eq2:"soga_legs_file,type:str16"`
	SogaPantsColor types.Color `eq2:"soga_pants_color"`
	SogaUnknownLegsColor types.Color `eq2:"soga_unknown_legs_color"`
	SogaUnknown12 types.Color `eq2:"soga_unknown12"`
	SogaEyes2 [3]float32 `eq2:"soga_eyes2,size:3"`
	SogaEars [3]float32 `eq2:"soga_ears,size:3"`
	SogaEyeBrows [3]float32 `eq2:"soga_eye_brows,size:3"`
	SogaCheeks [3]float32 `eq2:"soga_cheeks,size:3"`
	SogaLips [3]float32 `eq2:"soga_lips,size:3"`
	SogaChin [3]float32 `eq2:"soga_chin,size:3"`
	SogaNose [3]float32 `eq2:"soga_nose,size:3"`
	SogaBodySize float32 `eq2:"soga_body_size"`
	SogaBodyAge float32 `eq2:"soga_body_age"`
}

// Serialize writes the packet data to the provided buffer
func (p *CreateCharacterV562) Serialize(dest []byte) uint32 {
	offset := uint32(0)
	dest[offset] = byte(p.Unknown0)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.Unknown1))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.AccountId))
	offset += 4
	dest[offset] = byte(p.Unknown3)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.ServerId))
	offset += 4
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.Name)))
	offset += 2
	copy(dest[offset:], []byte(p.Name))
	offset += uint32(len(p.Name))
	dest[offset] = byte(p.Race)
	offset++
	dest[offset] = byte(p.Gender)
	offset++
	dest[offset] = byte(p.Deity)
	offset++
	dest[offset] = byte(p.Class)
	offset++
	dest[offset] = byte(p.Level)
	offset++
	dest[offset] = byte(p.StartingZone)
	offset++
	dest[offset] = byte(p.Version)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.RaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.RaceFile))
	offset += uint32(len(p.RaceFile))
	dest[offset] = p.SkinColor.R
	dest[offset+1] = p.SkinColor.G
	dest[offset+2] = p.SkinColor.B
	offset += 3
	dest[offset] = p.SkinColor2.R
	dest[offset+1] = p.SkinColor2.G
	dest[offset+2] = p.SkinColor2.B
	offset += 3
	dest[offset] = p.EyeColor.R
	dest[offset+1] = p.EyeColor.G
	dest[offset+2] = p.EyeColor.B
	offset += 3
	dest[offset] = p.HairColor1.R
	dest[offset+1] = p.HairColor1.G
	dest[offset+2] = p.HairColor1.B
	offset += 3
	dest[offset] = p.HairColor2.R
	dest[offset+1] = p.HairColor2.G
	dest[offset+2] = p.HairColor2.B
	offset += 3
	for i := 0; i < 26; i++ {
		dest[offset] = p.Unknown8[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.HairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.HairFile))
	offset += uint32(len(p.HairFile))
	dest[offset] = p.HairTypeColor.R
	dest[offset+1] = p.HairTypeColor.G
	dest[offset+2] = p.HairTypeColor.B
	offset += 3
	dest[offset] = p.HairTypeHighlightColor.R
	dest[offset+1] = p.HairTypeHighlightColor.G
	dest[offset+2] = p.HairTypeHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.FaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.FaceFile))
	offset += uint32(len(p.FaceFile))
	dest[offset] = p.HairFaceColor.R
	dest[offset+1] = p.HairFaceColor.G
	dest[offset+2] = p.HairFaceColor.B
	offset += 3
	dest[offset] = p.HairFaceHighlightColor.R
	dest[offset+1] = p.HairFaceHighlightColor.G
	dest[offset+2] = p.HairFaceHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.WingFile)))
	offset += 2
	copy(dest[offset:], []byte(p.WingFile))
	offset += uint32(len(p.WingFile))
	dest[offset] = p.WingColor1.R
	dest[offset+1] = p.WingColor1.G
	dest[offset+2] = p.WingColor1.B
	offset += 3
	dest[offset] = p.WingColor2.R
	dest[offset+1] = p.WingColor2.G
	dest[offset+2] = p.WingColor2.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.ChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.ChestFile))
	offset += uint32(len(p.ChestFile))
	dest[offset] = p.ShirtColor.R
	dest[offset+1] = p.ShirtColor.G
	dest[offset+2] = p.ShirtColor.B
	offset += 3
	dest[offset] = p.UnknownChestColor.R
	dest[offset+1] = p.UnknownChestColor.G
	dest[offset+2] = p.UnknownChestColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.LegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.LegsFile))
	offset += uint32(len(p.LegsFile))
	dest[offset] = p.PantsColor.R
	dest[offset+1] = p.PantsColor.G
	dest[offset+2] = p.PantsColor.B
	offset += 3
	dest[offset] = p.UnknownLegsColor.R
	dest[offset+1] = p.UnknownLegsColor.G
	dest[offset+2] = p.UnknownLegsColor.B
	offset += 3
	dest[offset] = p.Unknown9.R
	dest[offset+1] = p.Unknown9.G
	dest[offset+2] = p.Unknown9.B
	offset += 3
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Eyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Ears[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Cheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Lips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Chin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Nose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodyAge))
	offset += 4
	dest[offset] = byte(p.SogaVersion)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaRaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaRaceFile))
	offset += uint32(len(p.SogaRaceFile))
	dest[offset] = p.SogaSkinColor.R
	dest[offset+1] = p.SogaSkinColor.G
	dest[offset+2] = p.SogaSkinColor.B
	offset += 3
	dest[offset] = p.SogaEyeColor.R
	dest[offset+1] = p.SogaEyeColor.G
	dest[offset+2] = p.SogaEyeColor.B
	offset += 3
	dest[offset] = p.SogaHairColor1.R
	dest[offset+1] = p.SogaHairColor1.G
	dest[offset+2] = p.SogaHairColor1.B
	offset += 3
	dest[offset] = p.SogaHairColor2.R
	dest[offset+1] = p.SogaHairColor2.G
	dest[offset+2] = p.SogaHairColor2.B
	offset += 3
	dest[offset] = p.SogaHairHighlight.R
	dest[offset+1] = p.SogaHairHighlight.G
	dest[offset+2] = p.SogaHairHighlight.B
	offset += 3
	for i := 0; i < 26; i++ {
		dest[offset] = p.SogaUnknown11[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaHairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaHairFile))
	offset += uint32(len(p.SogaHairFile))
	dest[offset] = p.SogaHairTypeColor.R
	dest[offset+1] = p.SogaHairTypeColor.G
	dest[offset+2] = p.SogaHairTypeColor.B
	offset += 3
	dest[offset] = p.SogaHairTypeHighlightColor.R
	dest[offset+1] = p.SogaHairTypeHighlightColor.G
	dest[offset+2] = p.SogaHairTypeHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaFaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaFaceFile))
	offset += uint32(len(p.SogaFaceFile))
	dest[offset] = p.SogaHairFaceColor.R
	dest[offset+1] = p.SogaHairFaceColor.G
	dest[offset+2] = p.SogaHairFaceColor.B
	offset += 3
	dest[offset] = p.SogaHairFaceHighlightColor.R
	dest[offset+1] = p.SogaHairFaceHighlightColor.G
	dest[offset+2] = p.SogaHairFaceHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaWingFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaWingFile))
	offset += uint32(len(p.SogaWingFile))
	dest[offset] = p.SogaWingColor1.R
	dest[offset+1] = p.SogaWingColor1.G
	dest[offset+2] = p.SogaWingColor1.B
	offset += 3
	dest[offset] = p.SogaWingColor2.R
	dest[offset+1] = p.SogaWingColor2.G
	dest[offset+2] = p.SogaWingColor2.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaChestFile))
	offset += uint32(len(p.SogaChestFile))
	dest[offset] = p.SogaShirtColor.R
	dest[offset+1] = p.SogaShirtColor.G
	dest[offset+2] = p.SogaShirtColor.B
	offset += 3
	dest[offset] = p.SogaUnknownChestColor.R
	dest[offset+1] = p.SogaUnknownChestColor.G
	dest[offset+2] = p.SogaUnknownChestColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaLegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaLegsFile))
	offset += uint32(len(p.SogaLegsFile))
	dest[offset] = p.SogaPantsColor.R
	dest[offset+1] = p.SogaPantsColor.G
	dest[offset+2] = p.SogaPantsColor.B
	offset += 3
	dest[offset] = p.SogaUnknownLegsColor.R
	dest[offset+1] = p.SogaUnknownLegsColor.G
	dest[offset+2] = p.SogaUnknownLegsColor.B
	offset += 3
	dest[offset] = p.SogaUnknown12.R
	dest[offset+1] = p.SogaUnknown12.G
	dest[offset+2] = p.SogaUnknown12.B
	offset += 3
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEars[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaCheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaLips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaChin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaNose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaBodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaBodyAge))
	offset += 4
	return offset
}

// Size returns the serialized size of the packet
func (p *CreateCharacterV562) Size() uint32 {
	size := uint32(0)
	size += 1
	size += 4
	size += 4
	size += 1
	size += 4
	size += 2 + uint32(len(p.Name))
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 2 + uint32(len(p.RaceFile))
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += uint32(26)
	size += 2 + uint32(len(p.HairFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.FaceFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.WingFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.ChestFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.LegsFile))
	size += 3
	size += 3
	size += 3
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	size += 1
	size += 2 + uint32(len(p.SogaRaceFile))
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += uint32(26)
	size += 2 + uint32(len(p.SogaHairFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaFaceFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaWingFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaChestFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaLegsFile))
	size += 3
	size += 3
	size += 3
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	return size
}

// CreateCharacterV869 represents packet structure for OP_CreateCharacterRequestMsg
type CreateCharacterV869 struct {
	Unknown0 uint8 `eq2:"unknown0"`  // TODO: Identify purpose
	Unknown1 uint32 `eq2:"unknown1"`  // TODO: Identify purpose
	AccountId uint32 `eq2:"account_id"`
	Unknown3 uint8 `eq2:"unknown3"`  // TODO: Identify purpose
	ServerId uint32 `eq2:"server_id"`
	Name string `eq2:"name,type:str16"`
	Race uint8 `eq2:"race"`
	Gender uint8 `eq2:"gender"`
	Deity uint8 `eq2:"deity"`
	Class uint8 `eq2:"class"`
	Level uint8 `eq2:"level"`
	StartingZone uint8 `eq2:"starting_zone"`
	Version uint8 `eq2:"version"`
	RaceFile string `eq2:"race_file,type:str16"`
	SkinColor types.Color `eq2:"skin_color"`
	SkinColor2 types.Color `eq2:"skin_color2"`
	EyeColor types.Color `eq2:"eye_color"`
	HairColor1 types.Color `eq2:"hair_color1"`
	HairColor2 types.Color `eq2:"hair_color2"`
	HairHighlight types.Color `eq2:"hair_highlight"`
	Unknown8 [26]uint8 `eq2:"unknown8,size:26"`  // TODO: Identify purpose
	HairFile string `eq2:"hair_file,type:str16"`
	HairTypeColor types.Color `eq2:"hair_type_color"`
	HairTypeHighlightColor types.Color `eq2:"hair_type_highlight_color"`
	FaceFile string `eq2:"face_file,type:str16"`
	HairFaceColor types.Color `eq2:"hair_face_color"`
	HairFaceHighlightColor types.Color `eq2:"hair_face_highlight_color"`
	WingFile string `eq2:"wing_file,type:str16"`
	WingColor1 types.Color `eq2:"wing_color1"`
	WingColor2 types.Color `eq2:"wing_color2"`
	ChestFile string `eq2:"chest_file,type:str16"`
	ShirtColor types.Color `eq2:"shirt_color"`
	UnknownChestColor types.Color `eq2:"unknown_chest_color"`  // TODO: Identify purpose
	LegsFile string `eq2:"legs_file,type:str16"`
	PantsColor types.Color `eq2:"pants_color"`
	UnknownLegsColor types.Color `eq2:"unknown_legs_color"`  // TODO: Identify purpose
	Unknown9 types.Color `eq2:"unknown9"`  // TODO: Identify purpose
	Eyes2 [3]float32 `eq2:"eyes2,size:3"`
	Ears [3]float32 `eq2:"ears,size:3"`
	EyeBrows [3]float32 `eq2:"eye_brows,size:3"`
	Cheeks [3]float32 `eq2:"cheeks,size:3"`
	Lips [3]float32 `eq2:"lips,size:3"`
	Chin [3]float32 `eq2:"chin,size:3"`
	Nose [3]float32 `eq2:"nose,size:3"`
	BodySize float32 `eq2:"body_size"`
	BodyAge float32 `eq2:"body_age"`
	SogaVersion uint8 `eq2:"soga_version"`
	SogaRaceFile string `eq2:"soga_race_file,type:str16"`
	SogaSkinColor types.Color `eq2:"soga_skin_color"`
	SogaEyeColor types.Color `eq2:"soga_eye_color"`
	SogaHairColor1 types.Color `eq2:"soga_hair_color1"`
	SogaHairColor2 types.Color `eq2:"soga_hair_color2"`
	SogaHairHighlight types.Color `eq2:"soga_hair_highlight"`
	SogaUnknownColor1 types.Color `eq2:"soga_unknown_color1"`
	SogaUnknown11 [26]uint8 `eq2:"soga_unknown11,size:26"`
	SogaHairFile string `eq2:"soga_hair_file,type:str16"`
	SogaHairTypeColor types.Color `eq2:"soga_hair_type_color"`
	SogaHairTypeHighlightColor types.Color `eq2:"soga_hair_type_highlight_color"`
	SogaFaceFile string `eq2:"soga_face_file,type:str16"`
	SogaHairFaceColor types.Color `eq2:"soga_hair_face_color"`
	SogaHairFaceHighlightColor types.Color `eq2:"soga_hair_face_highlight_color"`
	SogaWingFile string `eq2:"soga_wing_file,type:str16"`
	SogaWingColor1 types.Color `eq2:"soga_wing_color1"`
	SogaWingColor2 types.Color `eq2:"soga_wing_color2"`
	SogaChestFile string `eq2:"soga_chest_file,type:str16"`
	SogaShirtColor types.Color `eq2:"soga_shirt_color"`
	SogaUnknownChestColor types.Color `eq2:"soga_unknown_chest_color"`
	SogaLegsFile string `eq2:"soga_legs_file,type:str16"`
	SogaPantsColor types.Color `eq2:"soga_pants_color"`
	SogaUnknownLegsColor types.Color `eq2:"soga_unknown_legs_color"`
	SogaUnknown12 types.Color `eq2:"soga_unknown12"`
	SogaEyes2 [3]float32 `eq2:"soga_eyes2,size:3"`
	SogaEars [3]float32 `eq2:"soga_ears,size:3"`
	SogaEyeBrows [3]float32 `eq2:"soga_eye_brows,size:3"`
	SogaCheeks [3]float32 `eq2:"soga_cheeks,size:3"`
	SogaLips [3]float32 `eq2:"soga_lips,size:3"`
	SogaChin [3]float32 `eq2:"soga_chin,size:3"`
	SogaNose [3]float32 `eq2:"soga_nose,size:3"`
	SogaBodySize float32 `eq2:"soga_body_size"`
	SogaBodyAge float32 `eq2:"soga_body_age"`
}

// Serialize writes the packet data to the provided buffer
func (p *CreateCharacterV869) Serialize(dest []byte) uint32 {
	offset := uint32(0)
	dest[offset] = byte(p.Unknown0)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.Unknown1))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.AccountId))
	offset += 4
	dest[offset] = byte(p.Unknown3)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.ServerId))
	offset += 4
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.Name)))
	offset += 2
	copy(dest[offset:], []byte(p.Name))
	offset += uint32(len(p.Name))
	dest[offset] = byte(p.Race)
	offset++
	dest[offset] = byte(p.Gender)
	offset++
	dest[offset] = byte(p.Deity)
	offset++
	dest[offset] = byte(p.Class)
	offset++
	dest[offset] = byte(p.Level)
	offset++
	dest[offset] = byte(p.StartingZone)
	offset++
	dest[offset] = byte(p.Version)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.RaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.RaceFile))
	offset += uint32(len(p.RaceFile))
	dest[offset] = p.SkinColor.R
	dest[offset+1] = p.SkinColor.G
	dest[offset+2] = p.SkinColor.B
	offset += 3
	dest[offset] = p.SkinColor2.R
	dest[offset+1] = p.SkinColor2.G
	dest[offset+2] = p.SkinColor2.B
	offset += 3
	dest[offset] = p.EyeColor.R
	dest[offset+1] = p.EyeColor.G
	dest[offset+2] = p.EyeColor.B
	offset += 3
	dest[offset] = p.HairColor1.R
	dest[offset+1] = p.HairColor1.G
	dest[offset+2] = p.HairColor1.B
	offset += 3
	dest[offset] = p.HairColor2.R
	dest[offset+1] = p.HairColor2.G
	dest[offset+2] = p.HairColor2.B
	offset += 3
	dest[offset] = p.HairHighlight.R
	dest[offset+1] = p.HairHighlight.G
	dest[offset+2] = p.HairHighlight.B
	offset += 3
	for i := 0; i < 26; i++ {
		dest[offset] = p.Unknown8[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.HairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.HairFile))
	offset += uint32(len(p.HairFile))
	dest[offset] = p.HairTypeColor.R
	dest[offset+1] = p.HairTypeColor.G
	dest[offset+2] = p.HairTypeColor.B
	offset += 3
	dest[offset] = p.HairTypeHighlightColor.R
	dest[offset+1] = p.HairTypeHighlightColor.G
	dest[offset+2] = p.HairTypeHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.FaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.FaceFile))
	offset += uint32(len(p.FaceFile))
	dest[offset] = p.HairFaceColor.R
	dest[offset+1] = p.HairFaceColor.G
	dest[offset+2] = p.HairFaceColor.B
	offset += 3
	dest[offset] = p.HairFaceHighlightColor.R
	dest[offset+1] = p.HairFaceHighlightColor.G
	dest[offset+2] = p.HairFaceHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.WingFile)))
	offset += 2
	copy(dest[offset:], []byte(p.WingFile))
	offset += uint32(len(p.WingFile))
	dest[offset] = p.WingColor1.R
	dest[offset+1] = p.WingColor1.G
	dest[offset+2] = p.WingColor1.B
	offset += 3
	dest[offset] = p.WingColor2.R
	dest[offset+1] = p.WingColor2.G
	dest[offset+2] = p.WingColor2.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.ChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.ChestFile))
	offset += uint32(len(p.ChestFile))
	dest[offset] = p.ShirtColor.R
	dest[offset+1] = p.ShirtColor.G
	dest[offset+2] = p.ShirtColor.B
	offset += 3
	dest[offset] = p.UnknownChestColor.R
	dest[offset+1] = p.UnknownChestColor.G
	dest[offset+2] = p.UnknownChestColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.LegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.LegsFile))
	offset += uint32(len(p.LegsFile))
	dest[offset] = p.PantsColor.R
	dest[offset+1] = p.PantsColor.G
	dest[offset+2] = p.PantsColor.B
	offset += 3
	dest[offset] = p.UnknownLegsColor.R
	dest[offset+1] = p.UnknownLegsColor.G
	dest[offset+2] = p.UnknownLegsColor.B
	offset += 3
	dest[offset] = p.Unknown9.R
	dest[offset+1] = p.Unknown9.G
	dest[offset+2] = p.Unknown9.B
	offset += 3
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Eyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Ears[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Cheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Lips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Chin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Nose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodyAge))
	offset += 4
	dest[offset] = byte(p.SogaVersion)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaRaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaRaceFile))
	offset += uint32(len(p.SogaRaceFile))
	dest[offset] = p.SogaSkinColor.R
	dest[offset+1] = p.SogaSkinColor.G
	dest[offset+2] = p.SogaSkinColor.B
	offset += 3
	dest[offset] = p.SogaEyeColor.R
	dest[offset+1] = p.SogaEyeColor.G
	dest[offset+2] = p.SogaEyeColor.B
	offset += 3
	dest[offset] = p.SogaHairColor1.R
	dest[offset+1] = p.SogaHairColor1.G
	dest[offset+2] = p.SogaHairColor1.B
	offset += 3
	dest[offset] = p.SogaHairColor2.R
	dest[offset+1] = p.SogaHairColor2.G
	dest[offset+2] = p.SogaHairColor2.B
	offset += 3
	dest[offset] = p.SogaHairHighlight.R
	dest[offset+1] = p.SogaHairHighlight.G
	dest[offset+2] = p.SogaHairHighlight.B
	offset += 3
	dest[offset] = p.SogaUnknownColor1.R
	dest[offset+1] = p.SogaUnknownColor1.G
	dest[offset+2] = p.SogaUnknownColor1.B
	offset += 3
	for i := 0; i < 26; i++ {
		dest[offset] = p.SogaUnknown11[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaHairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaHairFile))
	offset += uint32(len(p.SogaHairFile))
	dest[offset] = p.SogaHairTypeColor.R
	dest[offset+1] = p.SogaHairTypeColor.G
	dest[offset+2] = p.SogaHairTypeColor.B
	offset += 3
	dest[offset] = p.SogaHairTypeHighlightColor.R
	dest[offset+1] = p.SogaHairTypeHighlightColor.G
	dest[offset+2] = p.SogaHairTypeHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaFaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaFaceFile))
	offset += uint32(len(p.SogaFaceFile))
	dest[offset] = p.SogaHairFaceColor.R
	dest[offset+1] = p.SogaHairFaceColor.G
	dest[offset+2] = p.SogaHairFaceColor.B
	offset += 3
	dest[offset] = p.SogaHairFaceHighlightColor.R
	dest[offset+1] = p.SogaHairFaceHighlightColor.G
	dest[offset+2] = p.SogaHairFaceHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaWingFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaWingFile))
	offset += uint32(len(p.SogaWingFile))
	dest[offset] = p.SogaWingColor1.R
	dest[offset+1] = p.SogaWingColor1.G
	dest[offset+2] = p.SogaWingColor1.B
	offset += 3
	dest[offset] = p.SogaWingColor2.R
	dest[offset+1] = p.SogaWingColor2.G
	dest[offset+2] = p.SogaWingColor2.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaChestFile))
	offset += uint32(len(p.SogaChestFile))
	dest[offset] = p.SogaShirtColor.R
	dest[offset+1] = p.SogaShirtColor.G
	dest[offset+2] = p.SogaShirtColor.B
	offset += 3
	dest[offset] = p.SogaUnknownChestColor.R
	dest[offset+1] = p.SogaUnknownChestColor.G
	dest[offset+2] = p.SogaUnknownChestColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaLegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaLegsFile))
	offset += uint32(len(p.SogaLegsFile))
	dest[offset] = p.SogaPantsColor.R
	dest[offset+1] = p.SogaPantsColor.G
	dest[offset+2] = p.SogaPantsColor.B
	offset += 3
	dest[offset] = p.SogaUnknownLegsColor.R
	dest[offset+1] = p.SogaUnknownLegsColor.G
	dest[offset+2] = p.SogaUnknownLegsColor.B
	offset += 3
	dest[offset] = p.SogaUnknown12.R
	dest[offset+1] = p.SogaUnknown12.G
	dest[offset+2] = p.SogaUnknown12.B
	offset += 3
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEars[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaCheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaLips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaChin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaNose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaBodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaBodyAge))
	offset += 4
	return offset
}

// Size returns the serialized size of the packet
func (p *CreateCharacterV869) Size() uint32 {
	size := uint32(0)
	size += 1
	size += 4
	size += 4
	size += 1
	size += 4
	size += 2 + uint32(len(p.Name))
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 2 + uint32(len(p.RaceFile))
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += uint32(26)
	size += 2 + uint32(len(p.HairFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.FaceFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.WingFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.ChestFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.LegsFile))
	size += 3
	size += 3
	size += 3
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	size += 1
	size += 2 + uint32(len(p.SogaRaceFile))
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += uint32(26)
	size += 2 + uint32(len(p.SogaHairFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaFaceFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaWingFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaChestFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaLegsFile))
	size += 3
	size += 3
	size += 3
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	return size
}

// CreateCharacterV1096 represents packet structure for OP_CreateCharacterRequestMsg
type CreateCharacterV1096 struct {
	Unknown0 uint8 `eq2:"unknown0"`  // TODO: Identify purpose
	Unknown1 uint32 `eq2:"unknown1"`  // TODO: Identify purpose
	AccountId uint32 `eq2:"account_id"`
	Unknown3 uint8 `eq2:"unknown3"`  // TODO: Identify purpose
	ServerId uint32 `eq2:"server_id"`
	Name string `eq2:"name,type:str16"`
	Race uint8 `eq2:"race"`
	Gender uint8 `eq2:"gender"`
	Deity uint8 `eq2:"deity"`
	Class uint8 `eq2:"class"`
	Level uint8 `eq2:"level"`
	StartingZone uint8 `eq2:"starting_zone"`
	Version uint8 `eq2:"version"`
	RaceFile string `eq2:"race_file,type:str16"`
	SkinColor types.Color `eq2:"skin_color"`
	SkinColor2 types.Color `eq2:"skin_color2"`
	EyeColor types.Color `eq2:"eye_color"`
	HairColor1 types.Color `eq2:"hair_color1"`
	HairColor2 types.Color `eq2:"hair_color2"`
	HairHighlight types.Color `eq2:"hair_highlight"`
	Unknown8 [26]uint8 `eq2:"unknown8,size:26"`  // TODO: Identify purpose
	HairFile string `eq2:"hair_file,type:str16"`
	HairTypeColor types.Color `eq2:"hair_type_color"`
	HairTypeHighlightColor types.Color `eq2:"hair_type_highlight_color"`
	FaceFile string `eq2:"face_file,type:str16"`
	HairFaceColor types.Color `eq2:"hair_face_color"`
	HairFaceHighlightColor types.Color `eq2:"hair_face_highlight_color"`
	WingFile string `eq2:"wing_file,type:str16"`
	WingColor1 types.Color `eq2:"wing_color1"`
	WingColor2 types.Color `eq2:"wing_color2"`
	ChestFile string `eq2:"chest_file,type:str16"`
	ShirtColor types.Color `eq2:"shirt_color"`
	UnknownChestColor types.Color `eq2:"unknown_chest_color"`  // TODO: Identify purpose
	LegsFile string `eq2:"legs_file,type:str16"`
	PantsColor types.Color `eq2:"pants_color"`
	UnknownLegsColor types.Color `eq2:"unknown_legs_color"`  // TODO: Identify purpose
	Unknown9 types.Color `eq2:"unknown9"`  // TODO: Identify purpose
	Eyes2 [3]float32 `eq2:"eyes2,size:3"`
	Ears [3]float32 `eq2:"ears,size:3"`
	EyeBrows [3]float32 `eq2:"eye_brows,size:3"`
	Cheeks [3]float32 `eq2:"cheeks,size:3"`
	Lips [3]float32 `eq2:"lips,size:3"`
	Chin [3]float32 `eq2:"chin,size:3"`
	Nose [3]float32 `eq2:"nose,size:3"`
	BodySize float32 `eq2:"body_size"`
	BodyAge float32 `eq2:"body_age"`
	SogaVersion uint8 `eq2:"soga_version"`
	SogaRaceFile string `eq2:"soga_race_file,type:str16"`
	SogaSkinColor types.Color `eq2:"soga_skin_color"`
	SogaEyeColor types.Color `eq2:"soga_eye_color"`
	SogaHairColor1 types.Color `eq2:"soga_hair_color1"`
	SogaHairColor2 types.Color `eq2:"soga_hair_color2"`
	SogaHairHighlight types.Color `eq2:"soga_hair_highlight"`
	SogaUnknownColor types.Color `eq2:"soga_unknown_color"`
	SogaUnknown11 [26]uint8 `eq2:"soga_unknown11,size:26"`
	SogaHairFile string `eq2:"soga_hair_file,type:str16"`
	SogaHairTypeColor types.Color `eq2:"soga_hair_type_color"`
	SogaHairTypeHighlightColor types.Color `eq2:"soga_hair_type_highlight_color"`
	SogaFaceFile string `eq2:"soga_face_file,type:str16"`
	SogaHairFaceColor types.Color `eq2:"soga_hair_face_color"`
	SogaHairFaceHighlightColor types.Color `eq2:"soga_hair_face_highlight_color"`
	SogaWingFile string `eq2:"soga_wing_file,type:str16"`
	SogaWingColor1 types.Color `eq2:"soga_wing_color1"`
	SogaWingColor2 types.Color `eq2:"soga_wing_color2"`
	SogaChestFile string `eq2:"soga_chest_file,type:str16"`
	SogaShirtColor types.Color `eq2:"soga_shirt_color"`
	SogaUnknownChestColor types.Color `eq2:"soga_unknown_chest_color"`
	SogaLegsFile string `eq2:"soga_legs_file,type:str16"`
	SogaPantsColor types.Color `eq2:"soga_pants_color"`
	SogaUnknownLegsColor types.Color `eq2:"soga_unknown_legs_color"`
	SogaUnknown12 types.Color `eq2:"soga_unknown12"`
	SogaEyes2 [3]float32 `eq2:"soga_eyes2,size:3"`
	SogaEars [3]float32 `eq2:"soga_ears,size:3"`
	SogaEyeBrows [3]float32 `eq2:"soga_eye_brows,size:3"`
	SogaCheeks [3]float32 `eq2:"soga_cheeks,size:3"`
	SogaLips [3]float32 `eq2:"soga_lips,size:3"`
	SogaChin [3]float32 `eq2:"soga_chin,size:3"`
	SogaNose [3]float32 `eq2:"soga_nose,size:3"`
	SogaBodySize float32 `eq2:"soga_body_size"`
	SogaBodyAge float32 `eq2:"soga_body_age"`
}

// Serialize writes the packet data to the provided buffer
func (p *CreateCharacterV1096) Serialize(dest []byte) uint32 {
	offset := uint32(0)
	dest[offset] = byte(p.Unknown0)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.Unknown1))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.AccountId))
	offset += 4
	dest[offset] = byte(p.Unknown3)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.ServerId))
	offset += 4
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.Name)))
	offset += 2
	copy(dest[offset:], []byte(p.Name))
	offset += uint32(len(p.Name))
	dest[offset] = byte(p.Race)
	offset++
	dest[offset] = byte(p.Gender)
	offset++
	dest[offset] = byte(p.Deity)
	offset++
	dest[offset] = byte(p.Class)
	offset++
	dest[offset] = byte(p.Level)
	offset++
	dest[offset] = byte(p.StartingZone)
	offset++
	dest[offset] = byte(p.Version)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.RaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.RaceFile))
	offset += uint32(len(p.RaceFile))
	dest[offset] = p.SkinColor.R
	dest[offset+1] = p.SkinColor.G
	dest[offset+2] = p.SkinColor.B
	offset += 3
	dest[offset] = p.SkinColor2.R
	dest[offset+1] = p.SkinColor2.G
	dest[offset+2] = p.SkinColor2.B
	offset += 3
	dest[offset] = p.EyeColor.R
	dest[offset+1] = p.EyeColor.G
	dest[offset+2] = p.EyeColor.B
	offset += 3
	dest[offset] = p.HairColor1.R
	dest[offset+1] = p.HairColor1.G
	dest[offset+2] = p.HairColor1.B
	offset += 3
	dest[offset] = p.HairColor2.R
	dest[offset+1] = p.HairColor2.G
	dest[offset+2] = p.HairColor2.B
	offset += 3
	dest[offset] = p.HairHighlight.R
	dest[offset+1] = p.HairHighlight.G
	dest[offset+2] = p.HairHighlight.B
	offset += 3
	for i := 0; i < 26; i++ {
		dest[offset] = p.Unknown8[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.HairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.HairFile))
	offset += uint32(len(p.HairFile))
	dest[offset] = p.HairTypeColor.R
	dest[offset+1] = p.HairTypeColor.G
	dest[offset+2] = p.HairTypeColor.B
	offset += 3
	dest[offset] = p.HairTypeHighlightColor.R
	dest[offset+1] = p.HairTypeHighlightColor.G
	dest[offset+2] = p.HairTypeHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.FaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.FaceFile))
	offset += uint32(len(p.FaceFile))
	dest[offset] = p.HairFaceColor.R
	dest[offset+1] = p.HairFaceColor.G
	dest[offset+2] = p.HairFaceColor.B
	offset += 3
	dest[offset] = p.HairFaceHighlightColor.R
	dest[offset+1] = p.HairFaceHighlightColor.G
	dest[offset+2] = p.HairFaceHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.WingFile)))
	offset += 2
	copy(dest[offset:], []byte(p.WingFile))
	offset += uint32(len(p.WingFile))
	dest[offset] = p.WingColor1.R
	dest[offset+1] = p.WingColor1.G
	dest[offset+2] = p.WingColor1.B
	offset += 3
	dest[offset] = p.WingColor2.R
	dest[offset+1] = p.WingColor2.G
	dest[offset+2] = p.WingColor2.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.ChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.ChestFile))
	offset += uint32(len(p.ChestFile))
	dest[offset] = p.ShirtColor.R
	dest[offset+1] = p.ShirtColor.G
	dest[offset+2] = p.ShirtColor.B
	offset += 3
	dest[offset] = p.UnknownChestColor.R
	dest[offset+1] = p.UnknownChestColor.G
	dest[offset+2] = p.UnknownChestColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.LegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.LegsFile))
	offset += uint32(len(p.LegsFile))
	dest[offset] = p.PantsColor.R
	dest[offset+1] = p.PantsColor.G
	dest[offset+2] = p.PantsColor.B
	offset += 3
	dest[offset] = p.UnknownLegsColor.R
	dest[offset+1] = p.UnknownLegsColor.G
	dest[offset+2] = p.UnknownLegsColor.B
	offset += 3
	dest[offset] = p.Unknown9.R
	dest[offset+1] = p.Unknown9.G
	dest[offset+2] = p.Unknown9.B
	offset += 3
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Eyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Ears[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Cheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Lips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Chin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Nose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodyAge))
	offset += 4
	dest[offset] = byte(p.SogaVersion)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaRaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaRaceFile))
	offset += uint32(len(p.SogaRaceFile))
	dest[offset] = p.SogaSkinColor.R
	dest[offset+1] = p.SogaSkinColor.G
	dest[offset+2] = p.SogaSkinColor.B
	offset += 3
	dest[offset] = p.SogaEyeColor.R
	dest[offset+1] = p.SogaEyeColor.G
	dest[offset+2] = p.SogaEyeColor.B
	offset += 3
	dest[offset] = p.SogaHairColor1.R
	dest[offset+1] = p.SogaHairColor1.G
	dest[offset+2] = p.SogaHairColor1.B
	offset += 3
	dest[offset] = p.SogaHairColor2.R
	dest[offset+1] = p.SogaHairColor2.G
	dest[offset+2] = p.SogaHairColor2.B
	offset += 3
	dest[offset] = p.SogaHairHighlight.R
	dest[offset+1] = p.SogaHairHighlight.G
	dest[offset+2] = p.SogaHairHighlight.B
	offset += 3
	dest[offset] = p.SogaUnknownColor.R
	dest[offset+1] = p.SogaUnknownColor.G
	dest[offset+2] = p.SogaUnknownColor.B
	offset += 3
	for i := 0; i < 26; i++ {
		dest[offset] = p.SogaUnknown11[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaHairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaHairFile))
	offset += uint32(len(p.SogaHairFile))
	dest[offset] = p.SogaHairTypeColor.R
	dest[offset+1] = p.SogaHairTypeColor.G
	dest[offset+2] = p.SogaHairTypeColor.B
	offset += 3
	dest[offset] = p.SogaHairTypeHighlightColor.R
	dest[offset+1] = p.SogaHairTypeHighlightColor.G
	dest[offset+2] = p.SogaHairTypeHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaFaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaFaceFile))
	offset += uint32(len(p.SogaFaceFile))
	dest[offset] = p.SogaHairFaceColor.R
	dest[offset+1] = p.SogaHairFaceColor.G
	dest[offset+2] = p.SogaHairFaceColor.B
	offset += 3
	dest[offset] = p.SogaHairFaceHighlightColor.R
	dest[offset+1] = p.SogaHairFaceHighlightColor.G
	dest[offset+2] = p.SogaHairFaceHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaWingFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaWingFile))
	offset += uint32(len(p.SogaWingFile))
	dest[offset] = p.SogaWingColor1.R
	dest[offset+1] = p.SogaWingColor1.G
	dest[offset+2] = p.SogaWingColor1.B
	offset += 3
	dest[offset] = p.SogaWingColor2.R
	dest[offset+1] = p.SogaWingColor2.G
	dest[offset+2] = p.SogaWingColor2.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaChestFile))
	offset += uint32(len(p.SogaChestFile))
	dest[offset] = p.SogaShirtColor.R
	dest[offset+1] = p.SogaShirtColor.G
	dest[offset+2] = p.SogaShirtColor.B
	offset += 3
	dest[offset] = p.SogaUnknownChestColor.R
	dest[offset+1] = p.SogaUnknownChestColor.G
	dest[offset+2] = p.SogaUnknownChestColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaLegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaLegsFile))
	offset += uint32(len(p.SogaLegsFile))
	dest[offset] = p.SogaPantsColor.R
	dest[offset+1] = p.SogaPantsColor.G
	dest[offset+2] = p.SogaPantsColor.B
	offset += 3
	dest[offset] = p.SogaUnknownLegsColor.R
	dest[offset+1] = p.SogaUnknownLegsColor.G
	dest[offset+2] = p.SogaUnknownLegsColor.B
	offset += 3
	dest[offset] = p.SogaUnknown12.R
	dest[offset+1] = p.SogaUnknown12.G
	dest[offset+2] = p.SogaUnknown12.B
	offset += 3
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEars[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaCheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaLips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaChin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaNose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaBodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaBodyAge))
	offset += 4
	return offset
}

// Size returns the serialized size of the packet
func (p *CreateCharacterV1096) Size() uint32 {
	size := uint32(0)
	size += 1
	size += 4
	size += 4
	size += 1
	size += 4
	size += 2 + uint32(len(p.Name))
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 2 + uint32(len(p.RaceFile))
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += uint32(26)
	size += 2 + uint32(len(p.HairFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.FaceFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.WingFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.ChestFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.LegsFile))
	size += 3
	size += 3
	size += 3
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	size += 1
	size += 2 + uint32(len(p.SogaRaceFile))
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += uint32(26)
	size += 2 + uint32(len(p.SogaHairFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaFaceFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaWingFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaChestFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaLegsFile))
	size += 3
	size += 3
	size += 3
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	return size
}

// CreateCharacterV57080 represents packet structure for OP_CreateCharacterRequestMsg
type CreateCharacterV57080 struct {
	Unknown0 uint8 `eq2:"unknown0"`  // TODO: Identify purpose
	Unknown1 uint32 `eq2:"unknown1"`  // TODO: Identify purpose
	AccountId uint32 `eq2:"account_id"`
	Unknown3 uint8 `eq2:"unknown3"`  // TODO: Identify purpose
	ServerId uint32 `eq2:"server_id"`
	Name string `eq2:"name,type:str16"`
	Race uint8 `eq2:"race"`
	Gender uint8 `eq2:"gender"`
	Deity uint8 `eq2:"deity"`
	Class uint8 `eq2:"class"`
	Level uint8 `eq2:"level"`
	StartingZone uint8 `eq2:"starting_zone"`
	Version uint8 `eq2:"version"`
	Unknown10 uint16 `eq2:"unknown10"`  // TODO: Identify purpose
	RaceFile string `eq2:"race_file,type:str16"`
	SkinColor types.Color `eq2:"skin_color"`
	EyeColor types.Color `eq2:"eye_color"`
	UnknownSkinColor2 types.Color `eq2:"unknown_skin_color2"`  // TODO: Identify purpose
	HairColor1 types.Color `eq2:"hair_color1"`
	HairColor2 types.Color `eq2:"hair_color2"`
	HairHighlight types.Color `eq2:"hair_highlight"`
	Unknown8 [26]uint8 `eq2:"unknown8,size:26"`  // TODO: Identify purpose
	HairFile string `eq2:"hair_file,type:str16"`
	HairTypeColor types.Color `eq2:"hair_type_color"`
	HairTypeHighlightColor types.Color `eq2:"hair_type_highlight_color"`
	FaceFile string `eq2:"face_file,type:str16"`
	HairFaceColor types.Color `eq2:"hair_face_color"`
	HairFaceHighlightColor types.Color `eq2:"hair_face_highlight_color"`
	WingFile string `eq2:"wing_file,type:str16"`
	WingColor1 types.Color `eq2:"wing_color1"`
	WingColor2 types.Color `eq2:"wing_color2"`
	ChestFile string `eq2:"chest_file,type:str16"`
	ShirtColor types.Color `eq2:"shirt_color"`
	UnknownChestColor types.Color `eq2:"unknown_chest_color"`  // TODO: Identify purpose
	LegsFile string `eq2:"legs_file,type:str16"`
	PantsColor types.Color `eq2:"pants_color"`
	UnknownLegsColor types.Color `eq2:"unknown_legs_color"`  // TODO: Identify purpose
	Unknown9 types.Color `eq2:"unknown9"`  // TODO: Identify purpose
	Eyes2 [3]float32 `eq2:"eyes2,size:3"`
	Ears [3]float32 `eq2:"ears,size:3"`
	EyeBrows [3]float32 `eq2:"eye_brows,size:3"`
	Cheeks [3]float32 `eq2:"cheeks,size:3"`
	Lips [3]float32 `eq2:"lips,size:3"`
	Chin [3]float32 `eq2:"chin,size:3"`
	Nose [3]float32 `eq2:"nose,size:3"`
	BodySize float32 `eq2:"body_size"`
	BodyAge float32 `eq2:"body_age"`
	SogaVersion uint8 `eq2:"soga_version"`
	SogaRaceFile string `eq2:"soga_race_file,type:str16"`
	SogaSkinColor types.Color `eq2:"soga_skin_color"`
	SogaEyeColor types.Color `eq2:"soga_eye_color"`
	SogaHairColor1 types.Color `eq2:"soga_hair_color1"`
	SogaHairColor2 types.Color `eq2:"soga_hair_color2"`
	SogaHairHighlight types.Color `eq2:"soga_hair_highlight"`
	SogaUnknownColor types.Color `eq2:"soga_unknown_color"`
	SogaUnknown11 [26]uint8 `eq2:"soga_unknown11,size:26"`
	SogaHairFile string `eq2:"soga_hair_file,type:str16"`
	SogaHairTypeColor types.Color `eq2:"soga_hair_type_color"`
	SogaHairTypeHighlightColor types.Color `eq2:"soga_hair_type_highlight_color"`
	SogaFaceFile string `eq2:"soga_face_file,type:str16"`
	SogaHairFaceColor types.Color `eq2:"soga_hair_face_color"`
	SogaHairFaceHighlightColor types.Color `eq2:"soga_hair_face_highlight_color"`
	SogaWingFile string `eq2:"soga_wing_file,type:str16"`
	SogaWingColor1 types.Color `eq2:"soga_wing_color1"`
	SogaWingColor2 types.Color `eq2:"soga_wing_color2"`
	SogaChestFile string `eq2:"soga_chest_file,type:str16"`
	SogaShirtColor types.Color `eq2:"soga_shirt_color"`
	SogaUnknownChestColor types.Color `eq2:"soga_unknown_chest_color"`
	SogaLegsFile string `eq2:"soga_legs_file,type:str16"`
	SogaPantsColor types.Color `eq2:"soga_pants_color"`
	SogaUnknownLegsColor types.Color `eq2:"soga_unknown_legs_color"`
	SogaUnknown12 types.Color `eq2:"soga_unknown12"`
	SogaEyes2 [3]float32 `eq2:"soga_eyes2,size:3"`
	SogaEars [3]float32 `eq2:"soga_ears,size:3"`
	SogaEyeBrows [3]float32 `eq2:"soga_eye_brows,size:3"`
	SogaCheeks [3]float32 `eq2:"soga_cheeks,size:3"`
	SogaLips [3]float32 `eq2:"soga_lips,size:3"`
	SogaChin [3]float32 `eq2:"soga_chin,size:3"`
	SogaNose [3]float32 `eq2:"soga_nose,size:3"`
	SogaBodySize float32 `eq2:"soga_body_size"`
	SogaBodyAge float32 `eq2:"soga_body_age"`
}

// Serialize writes the packet data to the provided buffer
func (p *CreateCharacterV57080) Serialize(dest []byte) uint32 {
	offset := uint32(0)
	dest[offset] = byte(p.Unknown0)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.Unknown1))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.AccountId))
	offset += 4
	dest[offset] = byte(p.Unknown3)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.ServerId))
	offset += 4
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.Name)))
	offset += 2
	copy(dest[offset:], []byte(p.Name))
	offset += uint32(len(p.Name))
	dest[offset] = byte(p.Race)
	offset++
	dest[offset] = byte(p.Gender)
	offset++
	dest[offset] = byte(p.Deity)
	offset++
	dest[offset] = byte(p.Class)
	offset++
	dest[offset] = byte(p.Level)
	offset++
	dest[offset] = byte(p.StartingZone)
	offset++
	dest[offset] = byte(p.Version)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(p.Unknown10))
	offset += 2
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.RaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.RaceFile))
	offset += uint32(len(p.RaceFile))
	dest[offset] = p.SkinColor.R
	dest[offset+1] = p.SkinColor.G
	dest[offset+2] = p.SkinColor.B
	offset += 3
	dest[offset] = p.EyeColor.R
	dest[offset+1] = p.EyeColor.G
	dest[offset+2] = p.EyeColor.B
	offset += 3
	dest[offset] = p.UnknownSkinColor2.R
	dest[offset+1] = p.UnknownSkinColor2.G
	dest[offset+2] = p.UnknownSkinColor2.B
	offset += 3
	dest[offset] = p.HairColor1.R
	dest[offset+1] = p.HairColor1.G
	dest[offset+2] = p.HairColor1.B
	offset += 3
	dest[offset] = p.HairColor2.R
	dest[offset+1] = p.HairColor2.G
	dest[offset+2] = p.HairColor2.B
	offset += 3
	dest[offset] = p.HairHighlight.R
	dest[offset+1] = p.HairHighlight.G
	dest[offset+2] = p.HairHighlight.B
	offset += 3
	for i := 0; i < 26; i++ {
		dest[offset] = p.Unknown8[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.HairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.HairFile))
	offset += uint32(len(p.HairFile))
	dest[offset] = p.HairTypeColor.R
	dest[offset+1] = p.HairTypeColor.G
	dest[offset+2] = p.HairTypeColor.B
	offset += 3
	dest[offset] = p.HairTypeHighlightColor.R
	dest[offset+1] = p.HairTypeHighlightColor.G
	dest[offset+2] = p.HairTypeHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.FaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.FaceFile))
	offset += uint32(len(p.FaceFile))
	dest[offset] = p.HairFaceColor.R
	dest[offset+1] = p.HairFaceColor.G
	dest[offset+2] = p.HairFaceColor.B
	offset += 3
	dest[offset] = p.HairFaceHighlightColor.R
	dest[offset+1] = p.HairFaceHighlightColor.G
	dest[offset+2] = p.HairFaceHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.WingFile)))
	offset += 2
	copy(dest[offset:], []byte(p.WingFile))
	offset += uint32(len(p.WingFile))
	dest[offset] = p.WingColor1.R
	dest[offset+1] = p.WingColor1.G
	dest[offset+2] = p.WingColor1.B
	offset += 3
	dest[offset] = p.WingColor2.R
	dest[offset+1] = p.WingColor2.G
	dest[offset+2] = p.WingColor2.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.ChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.ChestFile))
	offset += uint32(len(p.ChestFile))
	dest[offset] = p.ShirtColor.R
	dest[offset+1] = p.ShirtColor.G
	dest[offset+2] = p.ShirtColor.B
	offset += 3
	dest[offset] = p.UnknownChestColor.R
	dest[offset+1] = p.UnknownChestColor.G
	dest[offset+2] = p.UnknownChestColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.LegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.LegsFile))
	offset += uint32(len(p.LegsFile))
	dest[offset] = p.PantsColor.R
	dest[offset+1] = p.PantsColor.G
	dest[offset+2] = p.PantsColor.B
	offset += 3
	dest[offset] = p.UnknownLegsColor.R
	dest[offset+1] = p.UnknownLegsColor.G
	dest[offset+2] = p.UnknownLegsColor.B
	offset += 3
	dest[offset] = p.Unknown9.R
	dest[offset+1] = p.Unknown9.G
	dest[offset+2] = p.Unknown9.B
	offset += 3
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Eyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Ears[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Cheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Lips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Chin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Nose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodyAge))
	offset += 4
	dest[offset] = byte(p.SogaVersion)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaRaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaRaceFile))
	offset += uint32(len(p.SogaRaceFile))
	dest[offset] = p.SogaSkinColor.R
	dest[offset+1] = p.SogaSkinColor.G
	dest[offset+2] = p.SogaSkinColor.B
	offset += 3
	dest[offset] = p.SogaEyeColor.R
	dest[offset+1] = p.SogaEyeColor.G
	dest[offset+2] = p.SogaEyeColor.B
	offset += 3
	dest[offset] = p.SogaHairColor1.R
	dest[offset+1] = p.SogaHairColor1.G
	dest[offset+2] = p.SogaHairColor1.B
	offset += 3
	dest[offset] = p.SogaHairColor2.R
	dest[offset+1] = p.SogaHairColor2.G
	dest[offset+2] = p.SogaHairColor2.B
	offset += 3
	dest[offset] = p.SogaHairHighlight.R
	dest[offset+1] = p.SogaHairHighlight.G
	dest[offset+2] = p.SogaHairHighlight.B
	offset += 3
	dest[offset] = p.SogaUnknownColor.R
	dest[offset+1] = p.SogaUnknownColor.G
	dest[offset+2] = p.SogaUnknownColor.B
	offset += 3
	for i := 0; i < 26; i++ {
		dest[offset] = p.SogaUnknown11[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaHairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaHairFile))
	offset += uint32(len(p.SogaHairFile))
	dest[offset] = p.SogaHairTypeColor.R
	dest[offset+1] = p.SogaHairTypeColor.G
	dest[offset+2] = p.SogaHairTypeColor.B
	offset += 3
	dest[offset] = p.SogaHairTypeHighlightColor.R
	dest[offset+1] = p.SogaHairTypeHighlightColor.G
	dest[offset+2] = p.SogaHairTypeHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaFaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaFaceFile))
	offset += uint32(len(p.SogaFaceFile))
	dest[offset] = p.SogaHairFaceColor.R
	dest[offset+1] = p.SogaHairFaceColor.G
	dest[offset+2] = p.SogaHairFaceColor.B
	offset += 3
	dest[offset] = p.SogaHairFaceHighlightColor.R
	dest[offset+1] = p.SogaHairFaceHighlightColor.G
	dest[offset+2] = p.SogaHairFaceHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaWingFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaWingFile))
	offset += uint32(len(p.SogaWingFile))
	dest[offset] = p.SogaWingColor1.R
	dest[offset+1] = p.SogaWingColor1.G
	dest[offset+2] = p.SogaWingColor1.B
	offset += 3
	dest[offset] = p.SogaWingColor2.R
	dest[offset+1] = p.SogaWingColor2.G
	dest[offset+2] = p.SogaWingColor2.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaChestFile))
	offset += uint32(len(p.SogaChestFile))
	dest[offset] = p.SogaShirtColor.R
	dest[offset+1] = p.SogaShirtColor.G
	dest[offset+2] = p.SogaShirtColor.B
	offset += 3
	dest[offset] = p.SogaUnknownChestColor.R
	dest[offset+1] = p.SogaUnknownChestColor.G
	dest[offset+2] = p.SogaUnknownChestColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaLegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaLegsFile))
	offset += uint32(len(p.SogaLegsFile))
	dest[offset] = p.SogaPantsColor.R
	dest[offset+1] = p.SogaPantsColor.G
	dest[offset+2] = p.SogaPantsColor.B
	offset += 3
	dest[offset] = p.SogaUnknownLegsColor.R
	dest[offset+1] = p.SogaUnknownLegsColor.G
	dest[offset+2] = p.SogaUnknownLegsColor.B
	offset += 3
	dest[offset] = p.SogaUnknown12.R
	dest[offset+1] = p.SogaUnknown12.G
	dest[offset+2] = p.SogaUnknown12.B
	offset += 3
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEars[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaCheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaLips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaChin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaNose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaBodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaBodyAge))
	offset += 4
	return offset
}

// Size returns the serialized size of the packet
func (p *CreateCharacterV57080) Size() uint32 {
	size := uint32(0)
	size += 1
	size += 4
	size += 4
	size += 1
	size += 4
	size += 2 + uint32(len(p.Name))
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 2
	size += 2 + uint32(len(p.RaceFile))
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += uint32(26)
	size += 2 + uint32(len(p.HairFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.FaceFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.WingFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.ChestFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.LegsFile))
	size += 3
	size += 3
	size += 3
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	size += 1
	size += 2 + uint32(len(p.SogaRaceFile))
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += uint32(26)
	size += 2 + uint32(len(p.SogaHairFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaFaceFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaWingFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaChestFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaLegsFile))
	size += 3
	size += 3
	size += 3
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	return size
}

// CreateCharacterV60085 represents packet structure for OP_CreateCharacterRequestMsg
type CreateCharacterV60085 struct {
	Unknown0 uint8 `eq2:"unknown0"`  // TODO: Identify purpose
	Unknown1 uint32 `eq2:"unknown1"`  // TODO: Identify purpose
	AccountId uint32 `eq2:"account_id"`
	Unknown3 uint8 `eq2:"unknown3"`  // TODO: Identify purpose
	ServerId uint32 `eq2:"server_id"`
	Name string `eq2:"name,type:str16"`
	Race uint8 `eq2:"race"`
	Gender uint8 `eq2:"gender"`
	Deity uint8 `eq2:"deity"`
	Class uint8 `eq2:"class"`
	Level uint8 `eq2:"level"`
	StartingZone uint8 `eq2:"starting_zone"`
	Version uint8 `eq2:"version"`
	Unknown10 uint16 `eq2:"unknown10"`  // TODO: Identify purpose
	RaceFile string `eq2:"race_file,type:str16"`
	SkinColor types.Color `eq2:"skin_color"`
	EyeColor types.Color `eq2:"eye_color"`
	UnknownSkinColor2 types.Color `eq2:"unknown_skin_color2"`  // TODO: Identify purpose
	HairColor1 types.Color `eq2:"hair_color1"`
	HairColor2 types.Color `eq2:"hair_color2"`
	HairHighlight types.Color `eq2:"hair_highlight"`
	Unknown8 [26]uint8 `eq2:"unknown8,size:26"`  // TODO: Identify purpose
	HairFile string `eq2:"hair_file,type:str16"`
	HairTypeColor types.Color `eq2:"hair_type_color"`
	HairTypeHighlightColor types.Color `eq2:"hair_type_highlight_color"`
	FaceFile string `eq2:"face_file,type:str16"`
	HairFaceColor types.Color `eq2:"hair_face_color"`
	HairFaceHighlightColor types.Color `eq2:"hair_face_highlight_color"`
	WingFile string `eq2:"wing_file,type:str16"`
	WingColor1 types.Color `eq2:"wing_color1"`
	WingColor2 types.Color `eq2:"wing_color2"`
	ChestFile string `eq2:"chest_file,type:str16"`
	ShirtColor types.Color `eq2:"shirt_color"`
	UnknownChestColor types.Color `eq2:"unknown_chest_color"`  // TODO: Identify purpose
	LegsFile string `eq2:"legs_file,type:str16"`
	PantsColor types.Color `eq2:"pants_color"`
	UnknownLegsColor types.Color `eq2:"unknown_legs_color"`  // TODO: Identify purpose
	Unknown9 types.Color `eq2:"unknown9"`  // TODO: Identify purpose
	Eyes2 [3]float32 `eq2:"eyes2,size:3"`
	Ears [3]float32 `eq2:"ears,size:3"`
	EyeBrows [3]float32 `eq2:"eye_brows,size:3"`
	Cheeks [3]float32 `eq2:"cheeks,size:3"`
	Lips [3]float32 `eq2:"lips,size:3"`
	Chin [3]float32 `eq2:"chin,size:3"`
	Nose [3]float32 `eq2:"nose,size:3"`
	BodySize float32 `eq2:"body_size"`
	BodyAge float32 `eq2:"body_age"`
	SogaVersion uint8 `eq2:"soga_version"`
	SogaRaceFile string `eq2:"soga_race_file,type:str16"`
	SogaSkinColor types.Color `eq2:"soga_skin_color"`
	SogaEyeColor types.Color `eq2:"soga_eye_color"`
	SogaHairColor1 types.Color `eq2:"soga_hair_color1"`
	SogaHairColor2 types.Color `eq2:"soga_hair_color2"`
	SogaHairHighlight types.Color `eq2:"soga_hair_highlight"`
	SogaUnknownColor types.Color `eq2:"soga_unknown_color"`
	SogaUnknown11 [26]uint8 `eq2:"soga_unknown11,size:26"`
	SogaHairFile string `eq2:"soga_hair_file,type:str16"`
	SogaHairTypeColor types.Color `eq2:"soga_hair_type_color"`
	SogaHairTypeHighlightColor types.Color `eq2:"soga_hair_type_highlight_color"`
	SogaFaceFile string `eq2:"soga_face_file,type:str16"`
	SogaHairFaceColor types.Color `eq2:"soga_hair_face_color"`
	SogaHairFaceHighlightColor types.Color `eq2:"soga_hair_face_highlight_color"`
	SogaWingFile string `eq2:"soga_wing_file,type:str16"`
	SogaWingColor1 types.Color `eq2:"soga_wing_color1"`
	SogaWingColor2 types.Color `eq2:"soga_wing_color2"`
	SogaChestFile string `eq2:"soga_chest_file,type:str16"`
	SogaShirtColor types.Color `eq2:"soga_shirt_color"`
	SogaUnknownChestColor types.Color `eq2:"soga_unknown_chest_color"`
	SogaLegsFile string `eq2:"soga_legs_file,type:str16"`
	SogaPantsColor types.Color `eq2:"soga_pants_color"`
	SogaUnknownLegsColor types.Color `eq2:"soga_unknown_legs_color"`
	SogaUnknown12 types.Color `eq2:"soga_unknown12"`
	SogaEyes2 [3]float32 `eq2:"soga_eyes2,size:3"`
	SogaEars [3]float32 `eq2:"soga_ears,size:3"`
	SogaEyeBrows [3]float32 `eq2:"soga_eye_brows,size:3"`
	SogaCheeks [3]float32 `eq2:"soga_cheeks,size:3"`
	SogaLips [3]float32 `eq2:"soga_lips,size:3"`
	SogaChin [3]float32 `eq2:"soga_chin,size:3"`
	SogaNose [3]float32 `eq2:"soga_nose,size:3"`
	SogaBodySize float32 `eq2:"soga_body_size"`
	SogaBodyAge float32 `eq2:"soga_body_age"`
}

// Serialize writes the packet data to the provided buffer
func (p *CreateCharacterV60085) Serialize(dest []byte) uint32 {
	offset := uint32(0)
	dest[offset] = byte(p.Unknown0)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.Unknown1))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.AccountId))
	offset += 4
	dest[offset] = byte(p.Unknown3)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.ServerId))
	offset += 4
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.Name)))
	offset += 2
	copy(dest[offset:], []byte(p.Name))
	offset += uint32(len(p.Name))
	dest[offset] = byte(p.Race)
	offset++
	dest[offset] = byte(p.Gender)
	offset++
	dest[offset] = byte(p.Deity)
	offset++
	dest[offset] = byte(p.Class)
	offset++
	dest[offset] = byte(p.Level)
	offset++
	dest[offset] = byte(p.StartingZone)
	offset++
	dest[offset] = byte(p.Version)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(p.Unknown10))
	offset += 2
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.RaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.RaceFile))
	offset += uint32(len(p.RaceFile))
	dest[offset] = p.SkinColor.R
	dest[offset+1] = p.SkinColor.G
	dest[offset+2] = p.SkinColor.B
	offset += 3
	dest[offset] = p.EyeColor.R
	dest[offset+1] = p.EyeColor.G
	dest[offset+2] = p.EyeColor.B
	offset += 3
	dest[offset] = p.UnknownSkinColor2.R
	dest[offset+1] = p.UnknownSkinColor2.G
	dest[offset+2] = p.UnknownSkinColor2.B
	offset += 3
	dest[offset] = p.HairColor1.R
	dest[offset+1] = p.HairColor1.G
	dest[offset+2] = p.HairColor1.B
	offset += 3
	dest[offset] = p.HairColor2.R
	dest[offset+1] = p.HairColor2.G
	dest[offset+2] = p.HairColor2.B
	offset += 3
	dest[offset] = p.HairHighlight.R
	dest[offset+1] = p.HairHighlight.G
	dest[offset+2] = p.HairHighlight.B
	offset += 3
	for i := 0; i < 26; i++ {
		dest[offset] = p.Unknown8[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.HairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.HairFile))
	offset += uint32(len(p.HairFile))
	dest[offset] = p.HairTypeColor.R
	dest[offset+1] = p.HairTypeColor.G
	dest[offset+2] = p.HairTypeColor.B
	offset += 3
	dest[offset] = p.HairTypeHighlightColor.R
	dest[offset+1] = p.HairTypeHighlightColor.G
	dest[offset+2] = p.HairTypeHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.FaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.FaceFile))
	offset += uint32(len(p.FaceFile))
	dest[offset] = p.HairFaceColor.R
	dest[offset+1] = p.HairFaceColor.G
	dest[offset+2] = p.HairFaceColor.B
	offset += 3
	dest[offset] = p.HairFaceHighlightColor.R
	dest[offset+1] = p.HairFaceHighlightColor.G
	dest[offset+2] = p.HairFaceHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.WingFile)))
	offset += 2
	copy(dest[offset:], []byte(p.WingFile))
	offset += uint32(len(p.WingFile))
	dest[offset] = p.WingColor1.R
	dest[offset+1] = p.WingColor1.G
	dest[offset+2] = p.WingColor1.B
	offset += 3
	dest[offset] = p.WingColor2.R
	dest[offset+1] = p.WingColor2.G
	dest[offset+2] = p.WingColor2.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.ChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.ChestFile))
	offset += uint32(len(p.ChestFile))
	dest[offset] = p.ShirtColor.R
	dest[offset+1] = p.ShirtColor.G
	dest[offset+2] = p.ShirtColor.B
	offset += 3
	dest[offset] = p.UnknownChestColor.R
	dest[offset+1] = p.UnknownChestColor.G
	dest[offset+2] = p.UnknownChestColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.LegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.LegsFile))
	offset += uint32(len(p.LegsFile))
	dest[offset] = p.PantsColor.R
	dest[offset+1] = p.PantsColor.G
	dest[offset+2] = p.PantsColor.B
	offset += 3
	dest[offset] = p.UnknownLegsColor.R
	dest[offset+1] = p.UnknownLegsColor.G
	dest[offset+2] = p.UnknownLegsColor.B
	offset += 3
	dest[offset] = p.Unknown9.R
	dest[offset+1] = p.Unknown9.G
	dest[offset+2] = p.Unknown9.B
	offset += 3
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Eyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Ears[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Cheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Lips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Chin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Nose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodyAge))
	offset += 4
	dest[offset] = byte(p.SogaVersion)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaRaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaRaceFile))
	offset += uint32(len(p.SogaRaceFile))
	dest[offset] = p.SogaSkinColor.R
	dest[offset+1] = p.SogaSkinColor.G
	dest[offset+2] = p.SogaSkinColor.B
	offset += 3
	dest[offset] = p.SogaEyeColor.R
	dest[offset+1] = p.SogaEyeColor.G
	dest[offset+2] = p.SogaEyeColor.B
	offset += 3
	dest[offset] = p.SogaHairColor1.R
	dest[offset+1] = p.SogaHairColor1.G
	dest[offset+2] = p.SogaHairColor1.B
	offset += 3
	dest[offset] = p.SogaHairColor2.R
	dest[offset+1] = p.SogaHairColor2.G
	dest[offset+2] = p.SogaHairColor2.B
	offset += 3
	dest[offset] = p.SogaHairHighlight.R
	dest[offset+1] = p.SogaHairHighlight.G
	dest[offset+2] = p.SogaHairHighlight.B
	offset += 3
	dest[offset] = p.SogaUnknownColor.R
	dest[offset+1] = p.SogaUnknownColor.G
	dest[offset+2] = p.SogaUnknownColor.B
	offset += 3
	for i := 0; i < 26; i++ {
		dest[offset] = p.SogaUnknown11[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaHairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaHairFile))
	offset += uint32(len(p.SogaHairFile))
	dest[offset] = p.SogaHairTypeColor.R
	dest[offset+1] = p.SogaHairTypeColor.G
	dest[offset+2] = p.SogaHairTypeColor.B
	offset += 3
	dest[offset] = p.SogaHairTypeHighlightColor.R
	dest[offset+1] = p.SogaHairTypeHighlightColor.G
	dest[offset+2] = p.SogaHairTypeHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaFaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaFaceFile))
	offset += uint32(len(p.SogaFaceFile))
	dest[offset] = p.SogaHairFaceColor.R
	dest[offset+1] = p.SogaHairFaceColor.G
	dest[offset+2] = p.SogaHairFaceColor.B
	offset += 3
	dest[offset] = p.SogaHairFaceHighlightColor.R
	dest[offset+1] = p.SogaHairFaceHighlightColor.G
	dest[offset+2] = p.SogaHairFaceHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaWingFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaWingFile))
	offset += uint32(len(p.SogaWingFile))
	dest[offset] = p.SogaWingColor1.R
	dest[offset+1] = p.SogaWingColor1.G
	dest[offset+2] = p.SogaWingColor1.B
	offset += 3
	dest[offset] = p.SogaWingColor2.R
	dest[offset+1] = p.SogaWingColor2.G
	dest[offset+2] = p.SogaWingColor2.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaChestFile))
	offset += uint32(len(p.SogaChestFile))
	dest[offset] = p.SogaShirtColor.R
	dest[offset+1] = p.SogaShirtColor.G
	dest[offset+2] = p.SogaShirtColor.B
	offset += 3
	dest[offset] = p.SogaUnknownChestColor.R
	dest[offset+1] = p.SogaUnknownChestColor.G
	dest[offset+2] = p.SogaUnknownChestColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaLegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaLegsFile))
	offset += uint32(len(p.SogaLegsFile))
	dest[offset] = p.SogaPantsColor.R
	dest[offset+1] = p.SogaPantsColor.G
	dest[offset+2] = p.SogaPantsColor.B
	offset += 3
	dest[offset] = p.SogaUnknownLegsColor.R
	dest[offset+1] = p.SogaUnknownLegsColor.G
	dest[offset+2] = p.SogaUnknownLegsColor.B
	offset += 3
	dest[offset] = p.SogaUnknown12.R
	dest[offset+1] = p.SogaUnknown12.G
	dest[offset+2] = p.SogaUnknown12.B
	offset += 3
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEars[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaCheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaLips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaChin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaNose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaBodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaBodyAge))
	offset += 4
	return offset
}

// Size returns the serialized size of the packet
func (p *CreateCharacterV60085) Size() uint32 {
	size := uint32(0)
	size += 1
	size += 4
	size += 4
	size += 1
	size += 4
	size += 2 + uint32(len(p.Name))
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 2
	size += 2 + uint32(len(p.RaceFile))
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += uint32(26)
	size += 2 + uint32(len(p.HairFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.FaceFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.WingFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.ChestFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.LegsFile))
	size += 3
	size += 3
	size += 3
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	size += 1
	size += 2 + uint32(len(p.SogaRaceFile))
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += uint32(26)
	size += 2 + uint32(len(p.SogaHairFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaFaceFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaWingFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaChestFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaLegsFile))
	size += 3
	size += 3
	size += 3
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	return size
}

// CreateCharacterV64659 represents packet structure for OP_CreateCharacterRequestMsg
type CreateCharacterV64659 struct {
	Unknown0 uint8 `eq2:"unknown0"`  // TODO: Identify purpose
	Unknown1 uint32 `eq2:"unknown1"`  // TODO: Identify purpose
	AccountId uint32 `eq2:"account_id"`
	Unknown3 uint8 `eq2:"unknown3"`  // TODO: Identify purpose
	ServerId uint32 `eq2:"server_id"`
	Name string `eq2:"name,type:str16"`
	Race uint8 `eq2:"race"`
	Gender uint8 `eq2:"gender"`
	Deity uint8 `eq2:"deity"`
	Class uint8 `eq2:"class"`
	Level uint8 `eq2:"level"`
	StartingZone uint32 `eq2:"starting_zone"`
	Version uint8 `eq2:"version"`
	RaceFile string `eq2:"race_file,type:str16"`
	SkinColor types.Color `eq2:"skin_color"`
	SkinColor2 types.Color `eq2:"skin_color2"`
	EyeColor types.Color `eq2:"eye_color"`
	HairColor1 types.Color `eq2:"hair_color1"`
	HairColor2 types.Color `eq2:"hair_color2"`
	Unknown8 [38]uint8 `eq2:"unknown8,size:38"`  // TODO: Identify purpose
	HairFile string `eq2:"hair_file,type:str16"`
	HairTypeColor types.Color `eq2:"hair_type_color"`
	HairTypeHighlightColor types.Color `eq2:"hair_type_highlight_color"`
	FaceFile string `eq2:"face_file,type:str16"`
	HairFaceColor types.Color `eq2:"hair_face_color"`
	HairFaceHighlightColor types.Color `eq2:"hair_face_highlight_color"`
	WingFile string `eq2:"wing_file,type:str16"`
	WingColor1 types.Color `eq2:"wing_color1"`
	WingColor2 types.Color `eq2:"wing_color2"`
	ChestFile string `eq2:"chest_file,type:str16"`
	ShirtColor types.Color `eq2:"shirt_color"`
	UnknownChestColor types.Color `eq2:"unknown_chest_color"`  // TODO: Identify purpose
	LegsFile string `eq2:"legs_file,type:str16"`
	PantsColor types.Color `eq2:"pants_color"`
	UnknownLegsColor types.Color `eq2:"unknown_legs_color"`  // TODO: Identify purpose
	Unknown9 types.Color `eq2:"unknown9"`  // TODO: Identify purpose
	Eyes2 [3]float32 `eq2:"eyes2,size:3"`
	Ears [3]float32 `eq2:"ears,size:3"`
	EyeBrows [3]float32 `eq2:"eye_brows,size:3"`
	Cheeks [3]float32 `eq2:"cheeks,size:3"`
	Lips [3]float32 `eq2:"lips,size:3"`
	Chin [3]float32 `eq2:"chin,size:3"`
	Nose [3]float32 `eq2:"nose,size:3"`
	BodySize float32 `eq2:"body_size"`
	BodyAge float32 `eq2:"body_age"`
	SogaVersion uint8 `eq2:"soga_version"`
	SogaRaceFile string `eq2:"soga_race_file,type:str16"`
	SogaSkinColor types.Color `eq2:"soga_skin_color"`
	SogaEyeColor types.Color `eq2:"soga_eye_color"`
	SogaHairColor1 types.Color `eq2:"soga_hair_color1"`
	SogaHairColor2 types.Color `eq2:"soga_hair_color2"`
	SogaHairHighlight types.Color `eq2:"soga_hair_highlight"`
	SogaUnknown11 [38]uint8 `eq2:"soga_unknown11,size:38"`
	SogaHairFile string `eq2:"soga_hair_file,type:str16"`
	SogaHairTypeColor types.Color `eq2:"soga_hair_type_color"`
	SogaHairTypeHighlightColor types.Color `eq2:"soga_hair_type_highlight_color"`
	SogaFaceFile string `eq2:"soga_face_file,type:str16"`
	SogaHairFaceColor types.Color `eq2:"soga_hair_face_color"`
	SogaHairFaceHighlightColor types.Color `eq2:"soga_hair_face_highlight_color"`
	SogaWingFile string `eq2:"soga_wing_file,type:str16"`
	SogaWingColor1 types.Color `eq2:"soga_wing_color1"`
	SogaWingColor2 types.Color `eq2:"soga_wing_color2"`
	SogaChestFile string `eq2:"soga_chest_file,type:str16"`
	SogaShirtColor types.Color `eq2:"soga_shirt_color"`
	SogaUnknownChestColor types.Color `eq2:"soga_unknown_chest_color"`
	SogaLegsFile string `eq2:"soga_legs_file,type:str16"`
	SogaPantsColor types.Color `eq2:"soga_pants_color"`
	SogaUnknownLegsColor types.Color `eq2:"soga_unknown_legs_color"`
	SogaUnknown12 types.Color `eq2:"soga_unknown12"`
	SogaEyes2 [3]float32 `eq2:"soga_eyes2,size:3"`
	SogaEars [3]float32 `eq2:"soga_ears,size:3"`
	SogaEyeBrows [3]float32 `eq2:"soga_eye_brows,size:3"`
	SogaCheeks [3]float32 `eq2:"soga_cheeks,size:3"`
	SogaLips [3]float32 `eq2:"soga_lips,size:3"`
	SogaChin [3]float32 `eq2:"soga_chin,size:3"`
	SogaNose [3]float32 `eq2:"soga_nose,size:3"`
	SogaBodySize float32 `eq2:"soga_body_size"`
	SogaBodyAge float32 `eq2:"soga_body_age"`
	Unknown13 [2]uint8 `eq2:"unknown13,size:2"`  // TODO: Identify purpose
}

// Serialize writes the packet data to the provided buffer
func (p *CreateCharacterV64659) Serialize(dest []byte) uint32 {
	offset := uint32(0)
	dest[offset] = byte(p.Unknown0)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.Unknown1))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.AccountId))
	offset += 4
	dest[offset] = byte(p.Unknown3)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.ServerId))
	offset += 4
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.Name)))
	offset += 2
	copy(dest[offset:], []byte(p.Name))
	offset += uint32(len(p.Name))
	dest[offset] = byte(p.Race)
	offset++
	dest[offset] = byte(p.Gender)
	offset++
	dest[offset] = byte(p.Deity)
	offset++
	dest[offset] = byte(p.Class)
	offset++
	dest[offset] = byte(p.Level)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.StartingZone))
	offset += 4
	dest[offset] = byte(p.Version)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.RaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.RaceFile))
	offset += uint32(len(p.RaceFile))
	dest[offset] = p.SkinColor.R
	dest[offset+1] = p.SkinColor.G
	dest[offset+2] = p.SkinColor.B
	offset += 3
	dest[offset] = p.SkinColor2.R
	dest[offset+1] = p.SkinColor2.G
	dest[offset+2] = p.SkinColor2.B
	offset += 3
	dest[offset] = p.EyeColor.R
	dest[offset+1] = p.EyeColor.G
	dest[offset+2] = p.EyeColor.B
	offset += 3
	dest[offset] = p.HairColor1.R
	dest[offset+1] = p.HairColor1.G
	dest[offset+2] = p.HairColor1.B
	offset += 3
	dest[offset] = p.HairColor2.R
	dest[offset+1] = p.HairColor2.G
	dest[offset+2] = p.HairColor2.B
	offset += 3
	for i := 0; i < 38; i++ {
		dest[offset] = p.Unknown8[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.HairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.HairFile))
	offset += uint32(len(p.HairFile))
	dest[offset] = p.HairTypeColor.R
	dest[offset+1] = p.HairTypeColor.G
	dest[offset+2] = p.HairTypeColor.B
	offset += 3
	dest[offset] = p.HairTypeHighlightColor.R
	dest[offset+1] = p.HairTypeHighlightColor.G
	dest[offset+2] = p.HairTypeHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.FaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.FaceFile))
	offset += uint32(len(p.FaceFile))
	dest[offset] = p.HairFaceColor.R
	dest[offset+1] = p.HairFaceColor.G
	dest[offset+2] = p.HairFaceColor.B
	offset += 3
	dest[offset] = p.HairFaceHighlightColor.R
	dest[offset+1] = p.HairFaceHighlightColor.G
	dest[offset+2] = p.HairFaceHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.WingFile)))
	offset += 2
	copy(dest[offset:], []byte(p.WingFile))
	offset += uint32(len(p.WingFile))
	dest[offset] = p.WingColor1.R
	dest[offset+1] = p.WingColor1.G
	dest[offset+2] = p.WingColor1.B
	offset += 3
	dest[offset] = p.WingColor2.R
	dest[offset+1] = p.WingColor2.G
	dest[offset+2] = p.WingColor2.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.ChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.ChestFile))
	offset += uint32(len(p.ChestFile))
	dest[offset] = p.ShirtColor.R
	dest[offset+1] = p.ShirtColor.G
	dest[offset+2] = p.ShirtColor.B
	offset += 3
	dest[offset] = p.UnknownChestColor.R
	dest[offset+1] = p.UnknownChestColor.G
	dest[offset+2] = p.UnknownChestColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.LegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.LegsFile))
	offset += uint32(len(p.LegsFile))
	dest[offset] = p.PantsColor.R
	dest[offset+1] = p.PantsColor.G
	dest[offset+2] = p.PantsColor.B
	offset += 3
	dest[offset] = p.UnknownLegsColor.R
	dest[offset+1] = p.UnknownLegsColor.G
	dest[offset+2] = p.UnknownLegsColor.B
	offset += 3
	dest[offset] = p.Unknown9.R
	dest[offset+1] = p.Unknown9.G
	dest[offset+2] = p.Unknown9.B
	offset += 3
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Eyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Ears[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Cheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Lips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Chin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Nose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodyAge))
	offset += 4
	dest[offset] = byte(p.SogaVersion)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaRaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaRaceFile))
	offset += uint32(len(p.SogaRaceFile))
	dest[offset] = p.SogaSkinColor.R
	dest[offset+1] = p.SogaSkinColor.G
	dest[offset+2] = p.SogaSkinColor.B
	offset += 3
	dest[offset] = p.SogaEyeColor.R
	dest[offset+1] = p.SogaEyeColor.G
	dest[offset+2] = p.SogaEyeColor.B
	offset += 3
	dest[offset] = p.SogaHairColor1.R
	dest[offset+1] = p.SogaHairColor1.G
	dest[offset+2] = p.SogaHairColor1.B
	offset += 3
	dest[offset] = p.SogaHairColor2.R
	dest[offset+1] = p.SogaHairColor2.G
	dest[offset+2] = p.SogaHairColor2.B
	offset += 3
	dest[offset] = p.SogaHairHighlight.R
	dest[offset+1] = p.SogaHairHighlight.G
	dest[offset+2] = p.SogaHairHighlight.B
	offset += 3
	for i := 0; i < 38; i++ {
		dest[offset] = p.SogaUnknown11[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaHairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaHairFile))
	offset += uint32(len(p.SogaHairFile))
	dest[offset] = p.SogaHairTypeColor.R
	dest[offset+1] = p.SogaHairTypeColor.G
	dest[offset+2] = p.SogaHairTypeColor.B
	offset += 3
	dest[offset] = p.SogaHairTypeHighlightColor.R
	dest[offset+1] = p.SogaHairTypeHighlightColor.G
	dest[offset+2] = p.SogaHairTypeHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaFaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaFaceFile))
	offset += uint32(len(p.SogaFaceFile))
	dest[offset] = p.SogaHairFaceColor.R
	dest[offset+1] = p.SogaHairFaceColor.G
	dest[offset+2] = p.SogaHairFaceColor.B
	offset += 3
	dest[offset] = p.SogaHairFaceHighlightColor.R
	dest[offset+1] = p.SogaHairFaceHighlightColor.G
	dest[offset+2] = p.SogaHairFaceHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaWingFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaWingFile))
	offset += uint32(len(p.SogaWingFile))
	dest[offset] = p.SogaWingColor1.R
	dest[offset+1] = p.SogaWingColor1.G
	dest[offset+2] = p.SogaWingColor1.B
	offset += 3
	dest[offset] = p.SogaWingColor2.R
	dest[offset+1] = p.SogaWingColor2.G
	dest[offset+2] = p.SogaWingColor2.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaChestFile))
	offset += uint32(len(p.SogaChestFile))
	dest[offset] = p.SogaShirtColor.R
	dest[offset+1] = p.SogaShirtColor.G
	dest[offset+2] = p.SogaShirtColor.B
	offset += 3
	dest[offset] = p.SogaUnknownChestColor.R
	dest[offset+1] = p.SogaUnknownChestColor.G
	dest[offset+2] = p.SogaUnknownChestColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaLegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaLegsFile))
	offset += uint32(len(p.SogaLegsFile))
	dest[offset] = p.SogaPantsColor.R
	dest[offset+1] = p.SogaPantsColor.G
	dest[offset+2] = p.SogaPantsColor.B
	offset += 3
	dest[offset] = p.SogaUnknownLegsColor.R
	dest[offset+1] = p.SogaUnknownLegsColor.G
	dest[offset+2] = p.SogaUnknownLegsColor.B
	offset += 3
	dest[offset] = p.SogaUnknown12.R
	dest[offset+1] = p.SogaUnknown12.G
	dest[offset+2] = p.SogaUnknown12.B
	offset += 3
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEars[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaCheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaLips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaChin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaNose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaBodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaBodyAge))
	offset += 4
	for i := 0; i < 2; i++ {
		dest[offset] = p.Unknown13[i]
		offset++
	}
	return offset
}

// Size returns the serialized size of the packet
func (p *CreateCharacterV64659) Size() uint32 {
	size := uint32(0)
	size += 1
	size += 4
	size += 4
	size += 1
	size += 4
	size += 2 + uint32(len(p.Name))
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 4
	size += 1
	size += 2 + uint32(len(p.RaceFile))
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += uint32(38)
	size += 2 + uint32(len(p.HairFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.FaceFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.WingFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.ChestFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.LegsFile))
	size += 3
	size += 3
	size += 3
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	size += 1
	size += 2 + uint32(len(p.SogaRaceFile))
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += uint32(38)
	size += 2 + uint32(len(p.SogaHairFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaFaceFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaWingFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaChestFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaLegsFile))
	size += 3
	size += 3
	size += 3
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	size += uint32(2)
	return size
}

// CreateCharacterV65534 represents packet structure for OP_CreateCharacterRequestMsg
type CreateCharacterV65534 struct {
	Unknown0 uint8 `eq2:"unknown0"`  // TODO: Identify purpose
	Unknown1 uint32 `eq2:"unknown1"`  // TODO: Identify purpose
	AccountId uint32 `eq2:"account_id"`
	Unknown3 uint8 `eq2:"unknown3"`  // TODO: Identify purpose
	ServerId uint32 `eq2:"server_id"`
	Name string `eq2:"name,type:str16"`
	Race uint8 `eq2:"race"`
	Gender uint8 `eq2:"gender"`
	Deity uint8 `eq2:"deity"`
	Class uint8 `eq2:"class"`
	Level uint8 `eq2:"level"`
	StartingZone uint32 `eq2:"starting_zone"`
	Version uint8 `eq2:"version"`
	RaceFile string `eq2:"race_file,type:str16"`
	SkinColor types.Color `eq2:"skin_color"`
	SkinColor2 types.Color `eq2:"skin_color2"`
	EyeColor types.Color `eq2:"eye_color"`
	HairColor1 types.Color `eq2:"hair_color1"`
	HairColor2 types.Color `eq2:"hair_color2"`
	Unknown8 [38]uint8 `eq2:"unknown8,size:38"`  // TODO: Identify purpose
	HairFile string `eq2:"hair_file,type:str16"`
	HairTypeColor types.Color `eq2:"hair_type_color"`
	HairTypeHighlightColor types.Color `eq2:"hair_type_highlight_color"`
	FaceFile string `eq2:"face_file,type:str16"`
	HairFaceColor types.Color `eq2:"hair_face_color"`
	HairFaceHighlightColor types.Color `eq2:"hair_face_highlight_color"`
	WingFile string `eq2:"wing_file,type:str16"`
	WingColor1 types.Color `eq2:"wing_color1"`
	WingColor2 types.Color `eq2:"wing_color2"`
	ChestFile string `eq2:"chest_file,type:str16"`
	ShirtColor types.Color `eq2:"shirt_color"`
	UnknownChestColor types.Color `eq2:"unknown_chest_color"`  // TODO: Identify purpose
	LegsFile string `eq2:"legs_file,type:str16"`
	PantsColor types.Color `eq2:"pants_color"`
	UnknownLegsColor types.Color `eq2:"unknown_legs_color"`  // TODO: Identify purpose
	Unknown9 types.Color `eq2:"unknown9"`  // TODO: Identify purpose
	Eyes2 [3]float32 `eq2:"eyes2,size:3"`
	Ears [3]float32 `eq2:"ears,size:3"`
	EyeBrows [3]float32 `eq2:"eye_brows,size:3"`
	Cheeks [3]float32 `eq2:"cheeks,size:3"`
	Lips [3]float32 `eq2:"lips,size:3"`
	Chin [3]float32 `eq2:"chin,size:3"`
	Nose [3]float32 `eq2:"nose,size:3"`
	BodySize float32 `eq2:"body_size"`
	BodyAge float32 `eq2:"body_age"`
	SogaVersion uint8 `eq2:"soga_version"`
	SogaRaceFile string `eq2:"soga_race_file,type:str16"`
	SogaSkinColor types.Color `eq2:"soga_skin_color"`
	SogaEyeColor types.Color `eq2:"soga_eye_color"`
	SogaHairColor1 types.Color `eq2:"soga_hair_color1"`
	SogaHairColor2 types.Color `eq2:"soga_hair_color2"`
	SogaHairHighlight types.Color `eq2:"soga_hair_highlight"`
	SogaUnknown11 [38]uint8 `eq2:"soga_unknown11,size:38"`
	SogaHairFile string `eq2:"soga_hair_file,type:str16"`
	SogaHairTypeColor types.Color `eq2:"soga_hair_type_color"`
	SogaHairTypeHighlightColor types.Color `eq2:"soga_hair_type_highlight_color"`
	SogaFaceFile string `eq2:"soga_face_file,type:str16"`
	SogaHairFaceColor types.Color `eq2:"soga_hair_face_color"`
	SogaHairFaceHighlightColor types.Color `eq2:"soga_hair_face_highlight_color"`
	SogaWingFile string `eq2:"soga_wing_file,type:str16"`
	SogaWingColor1 types.Color `eq2:"soga_wing_color1"`
	SogaWingColor2 types.Color `eq2:"soga_wing_color2"`
	SogaChestFile string `eq2:"soga_chest_file,type:str16"`
	SogaShirtColor types.Color `eq2:"soga_shirt_color"`
	SogaUnknownChestColor types.Color `eq2:"soga_unknown_chest_color"`
	SogaLegsFile string `eq2:"soga_legs_file,type:str16"`
	SogaPantsColor types.Color `eq2:"soga_pants_color"`
	SogaUnknownLegsColor types.Color `eq2:"soga_unknown_legs_color"`
	SogaUnknown12 types.Color `eq2:"soga_unknown12"`
	SogaEyes2 [3]float32 `eq2:"soga_eyes2,size:3"`
	SogaEars [3]float32 `eq2:"soga_ears,size:3"`
	SogaEyeBrows [3]float32 `eq2:"soga_eye_brows,size:3"`
	SogaCheeks [3]float32 `eq2:"soga_cheeks,size:3"`
	SogaLips [3]float32 `eq2:"soga_lips,size:3"`
	SogaChin [3]float32 `eq2:"soga_chin,size:3"`
	SogaNose [3]float32 `eq2:"soga_nose,size:3"`
	SogaBodySize float32 `eq2:"soga_body_size"`
	SogaBodyAge float32 `eq2:"soga_body_age"`
	Unknown13 [2]uint8 `eq2:"unknown13,size:2"`  // TODO: Identify purpose
}

// Serialize writes the packet data to the provided buffer
func (p *CreateCharacterV65534) Serialize(dest []byte) uint32 {
	offset := uint32(0)
	dest[offset] = byte(p.Unknown0)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.Unknown1))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.AccountId))
	offset += 4
	dest[offset] = byte(p.Unknown3)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.ServerId))
	offset += 4
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.Name)))
	offset += 2
	copy(dest[offset:], []byte(p.Name))
	offset += uint32(len(p.Name))
	dest[offset] = byte(p.Race)
	offset++
	dest[offset] = byte(p.Gender)
	offset++
	dest[offset] = byte(p.Deity)
	offset++
	dest[offset] = byte(p.Class)
	offset++
	dest[offset] = byte(p.Level)
	offset++
	binary.LittleEndian.PutUint32(dest[offset:], uint32(p.StartingZone))
	offset += 4
	dest[offset] = byte(p.Version)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.RaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.RaceFile))
	offset += uint32(len(p.RaceFile))
	dest[offset] = p.SkinColor.R
	dest[offset+1] = p.SkinColor.G
	dest[offset+2] = p.SkinColor.B
	offset += 3
	dest[offset] = p.SkinColor2.R
	dest[offset+1] = p.SkinColor2.G
	dest[offset+2] = p.SkinColor2.B
	offset += 3
	dest[offset] = p.EyeColor.R
	dest[offset+1] = p.EyeColor.G
	dest[offset+2] = p.EyeColor.B
	offset += 3
	dest[offset] = p.HairColor1.R
	dest[offset+1] = p.HairColor1.G
	dest[offset+2] = p.HairColor1.B
	offset += 3
	dest[offset] = p.HairColor2.R
	dest[offset+1] = p.HairColor2.G
	dest[offset+2] = p.HairColor2.B
	offset += 3
	for i := 0; i < 38; i++ {
		dest[offset] = p.Unknown8[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.HairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.HairFile))
	offset += uint32(len(p.HairFile))
	dest[offset] = p.HairTypeColor.R
	dest[offset+1] = p.HairTypeColor.G
	dest[offset+2] = p.HairTypeColor.B
	offset += 3
	dest[offset] = p.HairTypeHighlightColor.R
	dest[offset+1] = p.HairTypeHighlightColor.G
	dest[offset+2] = p.HairTypeHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.FaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.FaceFile))
	offset += uint32(len(p.FaceFile))
	dest[offset] = p.HairFaceColor.R
	dest[offset+1] = p.HairFaceColor.G
	dest[offset+2] = p.HairFaceColor.B
	offset += 3
	dest[offset] = p.HairFaceHighlightColor.R
	dest[offset+1] = p.HairFaceHighlightColor.G
	dest[offset+2] = p.HairFaceHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.WingFile)))
	offset += 2
	copy(dest[offset:], []byte(p.WingFile))
	offset += uint32(len(p.WingFile))
	dest[offset] = p.WingColor1.R
	dest[offset+1] = p.WingColor1.G
	dest[offset+2] = p.WingColor1.B
	offset += 3
	dest[offset] = p.WingColor2.R
	dest[offset+1] = p.WingColor2.G
	dest[offset+2] = p.WingColor2.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.ChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.ChestFile))
	offset += uint32(len(p.ChestFile))
	dest[offset] = p.ShirtColor.R
	dest[offset+1] = p.ShirtColor.G
	dest[offset+2] = p.ShirtColor.B
	offset += 3
	dest[offset] = p.UnknownChestColor.R
	dest[offset+1] = p.UnknownChestColor.G
	dest[offset+2] = p.UnknownChestColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.LegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.LegsFile))
	offset += uint32(len(p.LegsFile))
	dest[offset] = p.PantsColor.R
	dest[offset+1] = p.PantsColor.G
	dest[offset+2] = p.PantsColor.B
	offset += 3
	dest[offset] = p.UnknownLegsColor.R
	dest[offset+1] = p.UnknownLegsColor.G
	dest[offset+2] = p.UnknownLegsColor.B
	offset += 3
	dest[offset] = p.Unknown9.R
	dest[offset+1] = p.Unknown9.G
	dest[offset+2] = p.Unknown9.B
	offset += 3
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Eyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Ears[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.EyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Cheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Lips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Chin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.Nose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.BodyAge))
	offset += 4
	dest[offset] = byte(p.SogaVersion)
	offset++
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaRaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaRaceFile))
	offset += uint32(len(p.SogaRaceFile))
	dest[offset] = p.SogaSkinColor.R
	dest[offset+1] = p.SogaSkinColor.G
	dest[offset+2] = p.SogaSkinColor.B
	offset += 3
	dest[offset] = p.SogaEyeColor.R
	dest[offset+1] = p.SogaEyeColor.G
	dest[offset+2] = p.SogaEyeColor.B
	offset += 3
	dest[offset] = p.SogaHairColor1.R
	dest[offset+1] = p.SogaHairColor1.G
	dest[offset+2] = p.SogaHairColor1.B
	offset += 3
	dest[offset] = p.SogaHairColor2.R
	dest[offset+1] = p.SogaHairColor2.G
	dest[offset+2] = p.SogaHairColor2.B
	offset += 3
	dest[offset] = p.SogaHairHighlight.R
	dest[offset+1] = p.SogaHairHighlight.G
	dest[offset+2] = p.SogaHairHighlight.B
	offset += 3
	for i := 0; i < 38; i++ {
		dest[offset] = p.SogaUnknown11[i]
		offset++
	}
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaHairFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaHairFile))
	offset += uint32(len(p.SogaHairFile))
	dest[offset] = p.SogaHairTypeColor.R
	dest[offset+1] = p.SogaHairTypeColor.G
	dest[offset+2] = p.SogaHairTypeColor.B
	offset += 3
	dest[offset] = p.SogaHairTypeHighlightColor.R
	dest[offset+1] = p.SogaHairTypeHighlightColor.G
	dest[offset+2] = p.SogaHairTypeHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaFaceFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaFaceFile))
	offset += uint32(len(p.SogaFaceFile))
	dest[offset] = p.SogaHairFaceColor.R
	dest[offset+1] = p.SogaHairFaceColor.G
	dest[offset+2] = p.SogaHairFaceColor.B
	offset += 3
	dest[offset] = p.SogaHairFaceHighlightColor.R
	dest[offset+1] = p.SogaHairFaceHighlightColor.G
	dest[offset+2] = p.SogaHairFaceHighlightColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaWingFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaWingFile))
	offset += uint32(len(p.SogaWingFile))
	dest[offset] = p.SogaWingColor1.R
	dest[offset+1] = p.SogaWingColor1.G
	dest[offset+2] = p.SogaWingColor1.B
	offset += 3
	dest[offset] = p.SogaWingColor2.R
	dest[offset+1] = p.SogaWingColor2.G
	dest[offset+2] = p.SogaWingColor2.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaChestFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaChestFile))
	offset += uint32(len(p.SogaChestFile))
	dest[offset] = p.SogaShirtColor.R
	dest[offset+1] = p.SogaShirtColor.G
	dest[offset+2] = p.SogaShirtColor.B
	offset += 3
	dest[offset] = p.SogaUnknownChestColor.R
	dest[offset+1] = p.SogaUnknownChestColor.G
	dest[offset+2] = p.SogaUnknownChestColor.B
	offset += 3
	binary.LittleEndian.PutUint16(dest[offset:], uint16(len(p.SogaLegsFile)))
	offset += 2
	copy(dest[offset:], []byte(p.SogaLegsFile))
	offset += uint32(len(p.SogaLegsFile))
	dest[offset] = p.SogaPantsColor.R
	dest[offset+1] = p.SogaPantsColor.G
	dest[offset+2] = p.SogaPantsColor.B
	offset += 3
	dest[offset] = p.SogaUnknownLegsColor.R
	dest[offset+1] = p.SogaUnknownLegsColor.G
	dest[offset+2] = p.SogaUnknownLegsColor.B
	offset += 3
	dest[offset] = p.SogaUnknown12.R
	dest[offset+1] = p.SogaUnknown12.G
	dest[offset+2] = p.SogaUnknown12.B
	offset += 3
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEyes2[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEars[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaEyeBrows[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaCheeks[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaLips[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaChin[i]))
		offset += 4
	}
	for i := 0; i < 3; i++ {
		binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaNose[i]))
		offset += 4
	}
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaBodySize))
	offset += 4
	binary.LittleEndian.PutUint32(dest[offset:], math.Float32bits(p.SogaBodyAge))
	offset += 4
	for i := 0; i < 2; i++ {
		dest[offset] = p.Unknown13[i]
		offset++
	}
	return offset
}

// Size returns the serialized size of the packet
func (p *CreateCharacterV65534) Size() uint32 {
	size := uint32(0)
	size += 1
	size += 4
	size += 4
	size += 1
	size += 4
	size += 2 + uint32(len(p.Name))
	size += 1
	size += 1
	size += 1
	size += 1
	size += 1
	size += 4
	size += 1
	size += 2 + uint32(len(p.RaceFile))
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += uint32(38)
	size += 2 + uint32(len(p.HairFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.FaceFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.WingFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.ChestFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.LegsFile))
	size += 3
	size += 3
	size += 3
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	size += 1
	size += 2 + uint32(len(p.SogaRaceFile))
	size += 3
	size += 3
	size += 3
	size += 3
	size += 3
	size += uint32(38)
	size += 2 + uint32(len(p.SogaHairFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaFaceFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaWingFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaChestFile))
	size += 3
	size += 3
	size += 2 + uint32(len(p.SogaLegsFile))
	size += 3
	size += 3
	size += 3
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += uint32(3) * 4
	size += 4
	size += 4
	size += uint32(2)
	return size
}

// BadLanguageFilter represents packet structure for OP_BadLanguageFilter
type BadLanguageFilter struct {
	NumWords uint16 `eq2:"num_words"`
	WordsArray []struct {
		Word string `eq2:"word,type:str16"`
	} `eq2:"words_array,sizeVar:num_words"`
}

// Serialize writes the packet data to the provided buffer
func (p *BadLanguageFilter) Serialize(dest []byte) uint32 {
	offset := uint32(0)
	binary.LittleEndian.PutUint16(dest[offset:], uint16(p.NumWords))
	offset += 2
	for _, elem := range p.WordsArray {
		dest[offset] = byte(len(elem.Word))
		offset++
		copy(dest[offset:], []byte(elem.Word))
		offset += uint32(len(elem.Word))
	}
	return offset
}

// Size returns the serialized size of the packet
func (p *BadLanguageFilter) Size() uint32 {
	size := uint32(0)
	size += 2
	for _, elem := range p.WordsArray {
		_ = elem
		size += 1 + uint32(len(elem.Word))

	}
	return size
}









