func (this *AckRoleLoginOk) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteString(this.uname) return pack.Encode(P_ACK_ROLE_LOGIN_OK) }
func (this *AckSceneEnter) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteBytes(this.player.Encode()) return pack.Encode(P_ACK_SCENE_ENTER) }
func (this *MsgTestPhp) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteUint16(this.u16) return pack.ReadBytes() }
func (this *AckSceneExit) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteUint32(this.uid) return pack.Encode(P_ACK_SCENE_EXIT) }
func (this *ReqChatGm) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteString(this.content) return pack.Encode(P_REQ_CHAT_GM) }
func (this *AckRoleRandNameOk) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteString(this.uname) return pack.Encode(P_ACK_ROLE_RAND_NAME_OK) }
func (this *ReqSceneEnterFly) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteUint32(this.mapId) return pack.Encode(P_REQ_SCENE_ENTER_FLY) }
func (this *MsgScenePlayer) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteUint32(this.uid) pack.WriteBytes(this.sceneRotPos.Encode()) return pack.ReadBytes() }
func (this *MsgFriendBaseAdd) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteUint32(this.uid) pack.WriteString(this.uname) return pack.ReadBytes() }
func (this *ReqChatSend) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteUint8(this.channel) pack.WriteUint32(this.destUid) pack.WriteString(this.content) return pack.Encode(P_REQ_CHAT_SEND) }
func (this *MsgSceneVector3) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteInt16(this.x) pack.WriteInt16(this.y) pack.WriteInt16(this.z) return pack.ReadBytes() }
func (this *ReqSceneMove) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteBytes(this.sceneRotPos.Encode()) pack.WriteBytes(this.forward.Encode()) pack.WriteString(this.aniName) pack.WriteInt16(this.xAxis) return pack.Encode(P_REQ_SCENE_MOVE) }
func (this *AckChatSendOk) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteUint8(this.channel) pack.WriteUint32(this.uid) pack.WriteString(this.uname) pack.WriteString(this.content) return pack.Encode(P_ACK_CHAT_SEND_OK) }
func (this *AckScenePlayers) Encode() []byte { pack := packet.NewWriteBuff(64) playersCount := uint16(len(this.players)) pack.WriteUint16(playersCount) for i := uint16(0); i < playersCount; i++ { pack.WriteBytes(this.players[i].Encode()) } return pack.Encode(P_ACK_SCENE_PLAYERS) }
func (this *MsgSceneRotPos) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteInt16(this.rotX) pack.WriteInt16(this.rotY) pack.WriteInt16(this.rotZ) pack.WriteInt16(this.posX) pack.WriteInt16(this.posY) pack.WriteInt16(this.posZ) return pack.ReadBytes() }
func (this *ReqRoleCreate) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteUint32(this.uid) pack.WriteUint32(this.uuid) pack.WriteUint16(this.sid) pack.WriteUint16(this.cid) pack.WriteString(this.os) pack.WriteString(this.version) pack.WriteString(this.uname) pack.WriteString(this.source) pack.WriteString(this.sourceSub) pack.WriteUint32(this.loginTime) return pack.Encode(P_REQ_ROLE_CREATE) }
func (this *ReqRoleLogin) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteUint32(this.uid) pack.WriteUint32(this.uuid) pack.WriteUint16(this.sid) pack.WriteUint16(this.cid) pack.WriteUint32(this.loginTime) pack.WriteString(this.pwd) pack.WriteUint8(this.relink) pack.WriteUint8(this.debug) pack.WriteString(this.os) pack.WriteString(this.version) return pack.Encode(P_REQ_ROLE_LOGIN) }
func (this *MsgTestXX) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteUint8(this.idU8) idF32Count := uint16(len(this.idF32)) pack.WriteUint16(idF32Count) for i := uint16(0); i < idF32Count; i++ { pack.WriteFloat32(this.idF32[i]) } pack.WriteUint8(this.idOpU8Flag) if this.idOpU8Flag == 1 { pack.WriteUint8(this.idOpU8) } return pack.ReadBytes() }
func (this *ReqTestXX) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteUint8(this.idU8) pack.WriteUint16(this.idU16) pack.WriteUint32(this.idU32) repeatIdU8Count := uint16(len(this.repeatIdU8)) pack.WriteUint16(repeatIdU8Count) for i := uint16(0); i < repeatIdU8Count; i++ { pack.WriteUint8(this.repeatIdU8[i]) } pack.WriteUint8(this.optionalIdU8Flag) if this.optionalIdU8Flag == 1 { pack.WriteUint8(this.optionalIdU8) } return pack.Encode(P_REQ_TEST_X_X) }
func (this *AckTestPhpOk) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteUint64(this.u64) pack.WriteString(this.strxx) pack.WriteBytes(this.msgReq.Encode()) pack.WriteUint8(this.msgOptFlag) if this.msgOptFlag == 1 { pack.WriteBytes(this.msgOpt.Encode()) } msgRepCount := uint16(len(this.msgRep)) pack.WriteUint16(msgRepCount) for i := uint16(0); i < msgRepCount; i++ { pack.WriteBytes(this.msgRep[i].Encode()) } return pack.Encode(P_ACK_TEST_PHP_OK) }
func (this *AckTestSendOk) Encode() []byte { pack := packet.NewWriteBuff(64) pack.WriteUint8(this.idU8) pack.WriteBytes(this.roleBase.Encode()) idF32Count := uint16(len(this.idF32)) pack.WriteUint16(idF32Count) for i := uint16(0); i < idF32Count; i++ { pack.WriteFloat32(this.idF32[i]) } pack.WriteUint8(this.idOpU8Flag) if this.idOpU8Flag == 1 { pack.WriteUint8(this.idOpU8) } pack.WriteUint8(this.opRoleBaseFlag) if this.opRoleBaseFlag == 1 { pack.WriteBytes(this.opRoleBase.Encode()) } return pack.Encode(P_ACK_TEST_SEND_OK) }
func (this *AckRoleLoginOkNoRole) Encode() []byte { pack := packet.NewWriteBuff(64) return pack.Encode(P_ACK_ROLE_LOGIN_OK_NO_ROLE) }
func (this *ReqRoleRandName) Encode() []byte { pack := packet.NewWriteBuff(64) return pack.Encode(P_REQ_ROLE_RAND_NAME) }
func (this *ReqSceneReqPlayers) Encode() []byte { pack := packet.NewWriteBuff(64) return pack.Encode(P_REQ_SCENE_REQ_PLAYERS) }