예제 #1
0
파일: login.go 프로젝트: colefan/gsgo-hgame
func (this *LoginRoleEntity) EncodeEntity(buf *iobuffer.OutBuffer) *iobuffer.OutBuffer {
	buf.PutRawValue(this.UserID)
	buf.PutRawValue(this.RoleID)
	buf.PutRawValue(this.OldServerId)
	buf.PutRawValue(this.RoleName)
	buf.PutRawValue(this.Level)
	buf.PutRawValue(this.RoleJob)
	buf.PutRawValue(this.RoleIcon)
	buf.PutRawValue(this.IsPayRole)
	buf.PutRawValue(this.LastLoginTime)
	return buf
}
예제 #2
0
파일: packet.go 프로젝트: dulumao/gsgo
func (h *Header) Encode(writeBuf *iobuffer.OutBuffer) *iobuffer.OutBuffer {
	if writeBuf == nil {
		writeBuf = iobuffer.NewOutBuffer(1024)
	}
	writeBuf.PutUint16(h.PackLen)
	writeBuf.PutUint16(h.CmdID)
	writeBuf.PutUint32(h.ID)
	writeBuf.PutUint16(h.FSID)
	writeBuf.PutUint16(h.TSID)
	writeBuf.PutUint16(h.ValidCode)
	writeBuf.PutUint8(h.Version)
	writeBuf.PutUint8(h.ClientSrc)
	writeBuf.PutUint16(h.ErrCode)
	return writeBuf
}
예제 #3
0
파일: login.go 프로젝트: dulumao/gsgo
func (this *Entity) EncodeEntity(writeBuf *iobuffer.OutBuffer) *iobuffer.OutBuffer {
	writeBuf.PutRawValue(this.a)
	writeBuf.PutRawValue(this.b)
	return writeBuf
}