Esempio n. 1
0
func (this *RoleListResp) DecodePacket() bool {
	if this.IsDecoded() {
		return true
	}
	arrLen := packet.DecoderReadArrayLength(this.Packet)
	for i := 0; i < arrLen; i++ {
		e := &LoginRoleEntity{}
		packet.DecoderReadEntity(this.Packet, e)
		this.RoleList = append(this.RoleList, *e)
	}
	this.PackDecoded = true
	return true
}
Esempio n. 2
0
func (this *Login_Req) DecodePacket() bool {
	if this.IsDecoded() {
		return true
	}
	packet.DecoderReadValue(this.Packet, &this.UserName)

	packet.DecoderReadValue(this.Packet, &this.PWD)

	packet.DecoderReadEntity(this.Packet, &this.e)

	arrLen := packet.DecoderReadArrayLength(this.Packet)
	for i := 0; i < arrLen; i++ {
		e := &Entity{}
		packet.DecoderReadEntity(this.Packet, e)
		this.eList = append(this.eList, *e)
	}
	this.PackDecoded = true
	return true
}