Ejemplo n.º 1
1
func MsgFriendBaseAddDecode(pack *packet.Packet) *MsgFriendBaseAdd {
	msgFriendBaseAdd := &MsgFriendBaseAdd{}

	msgFriendBaseAdd.uid = pack.ReadUint32()
	msgFriendBaseAdd.uname = pack.ReadString()
	return msgFriendBaseAdd
}
Ejemplo n.º 2
0
func MsgScenePlayerDecode(pack *packet.Packet) *MsgScenePlayer {
	msgScenePlayer := &MsgScenePlayer{}

	msgScenePlayer.uid = pack.ReadUint32()
	msgScenePlayer.sceneRotPos = MsgSceneRotPosDecode(pack)
	return msgScenePlayer
}
Ejemplo n.º 3
0
func MsgRoleBaseDecode(pack *packet.Packet) *MsgRoleBase {
	msgRoleBase := &MsgRoleBase{}

	msgRoleBase.uid = pack.ReadUint32()
	msgRoleBase.uname = pack.ReadString()
	return msgRoleBase
}
Ejemplo n.º 4
0
func MsgSceneVector3Decode(pack *packet.Packet) *MsgSceneVector3 {
	msgSceneVector3 := &MsgSceneVector3{}

	msgSceneVector3.x = pack.ReadInt16()
	msgSceneVector3.y = pack.ReadInt16()
	msgSceneVector3.z = pack.ReadInt16()
	return msgSceneVector3
}
Ejemplo n.º 5
0
func ReqSceneMoveDecode(pack *packet.Packet) *ReqSceneMove {
	reqSceneMove := &ReqSceneMove{}

	reqSceneMove.sceneRotPos = MsgSceneRotPosDecode(pack)
	reqSceneMove.forward = MsgSceneVector3Decode(pack)
	reqSceneMove.aniName = pack.ReadString()
	reqSceneMove.xAxis = pack.ReadInt16()
	return reqSceneMove
}
Ejemplo n.º 6
0
func AckScenePlayersDecode(pack *packet.Packet) *AckScenePlayers {
	ackScenePlayers := &AckScenePlayers{}

	playersCount := pack.ReadUint16()
	for ; playersCount > 0; playersCount-- {
		ackScenePlayers.players = append(ackScenePlayers.players, MsgScenePlayerDecode(pack))
	}
	return ackScenePlayers
}
Ejemplo n.º 7
0
func MsgTestXXDecode(pack *packet.Packet) *MsgTestXX {
	msgTestXX := &MsgTestXX{}

	msgTestXX.idU8 = pack.ReadUint8()
	idF32Count := pack.ReadUint16()
	for ; idF32Count > 0; idF32Count-- {
		msgTestXX.idF32 = append(msgTestXX.idF32, pack.ReadFloat32())
	}
	msgTestXX.idOpU8Flag = pack.ReadUint8()
	if msgTestXX.idOpU8Flag == 1 {
		msgTestXX.idOpU8 = pack.ReadUint8()
	}
	return msgTestXX
}
Ejemplo n.º 8
0
func AckChatSendOkDecode(pack *packet.Packet) *AckChatSendOk {
	ackChatSendOk := &AckChatSendOk{}

	ackChatSendOk.channel = pack.ReadUint8()
	ackChatSendOk.uid = pack.ReadUint32()
	ackChatSendOk.uname = pack.ReadString()
	ackChatSendOk.content = pack.ReadString()
	return ackChatSendOk
}
Ejemplo n.º 9
0
func ReqChatSendDecode(pack *packet.Packet) *ReqChatSend {
	reqChatSend := &ReqChatSend{}

	reqChatSend.channel = pack.ReadUint8()
	reqChatSend.destUid = pack.ReadUint32()
	reqChatSend.content = pack.ReadString()
	return reqChatSend
}
Ejemplo n.º 10
0
func AckTestPhpOkDecode(pack *packet.Packet) *AckTestPhpOk {
	ackTestPhpOk := &AckTestPhpOk{}

	ackTestPhpOk.u64 = pack.ReadUint64()
	ackTestPhpOk.strxx = pack.ReadString()
	ackTestPhpOk.msgReq = MsgTestPhpDecode(pack)
	ackTestPhpOk.msgOptFlag = pack.ReadUint8()
	if ackTestPhpOk.msgOptFlag == 1 {
		ackTestPhpOk.msgOpt = MsgTestPhpDecode(pack)
	}
	msgRepCount := pack.ReadUint16()
	for ; msgRepCount > 0; msgRepCount-- {
		ackTestPhpOk.msgRep = append(ackTestPhpOk.msgRep, MsgTestPhpDecode(pack))
	}
	return ackTestPhpOk
}
Ejemplo n.º 11
0
func AckSceneMoveDecode(pack *packet.Packet) *AckSceneMove {
	ackSceneMove := &AckSceneMove{}

	ackSceneMove.sceneRotPos = MsgSceneRotPosDecode(pack)
	ackSceneMove.forward = MsgSceneVector3Decode(pack)
	ackSceneMove.aniName = pack.ReadString()
	ackSceneMove.xAxis = pack.ReadInt16()
	ackSceneMove.uid = pack.ReadUint32()
	return ackSceneMove
}
Ejemplo n.º 12
0
func MsgSceneRotPosDecode(pack *packet.Packet) *MsgSceneRotPos {
	msgSceneRotPos := &MsgSceneRotPos{}

	msgSceneRotPos.rotX = pack.ReadInt16()
	msgSceneRotPos.rotY = pack.ReadInt16()
	msgSceneRotPos.rotZ = pack.ReadInt16()
	msgSceneRotPos.posX = pack.ReadInt16()
	msgSceneRotPos.posY = pack.ReadInt16()
	msgSceneRotPos.posZ = pack.ReadInt16()
	return msgSceneRotPos
}
Ejemplo n.º 13
0
func ReqChatGmDecode(pack *packet.Packet) *ReqChatGm {
	reqChatGm := &ReqChatGm{}

	reqChatGm.content = pack.ReadString()
	return reqChatGm
}
Ejemplo n.º 14
0
func AckTestSendOkDecode(pack *packet.Packet) *AckTestSendOk {
	ackTestSendOk := &AckTestSendOk{}

	ackTestSendOk.idU8 = pack.ReadUint8()
	ackTestSendOk.roleBase = MsgRoleBaseDecode(pack)
	idF32Count := pack.ReadUint16()
	for ; idF32Count > 0; idF32Count-- {
		ackTestSendOk.idF32 = append(ackTestSendOk.idF32, pack.ReadFloat32())
	}
	ackTestSendOk.idOpU8Flag = pack.ReadUint8()
	if ackTestSendOk.idOpU8Flag == 1 {
		ackTestSendOk.idOpU8 = pack.ReadUint8()
	}
	ackTestSendOk.opRoleBaseFlag = pack.ReadUint8()
	if ackTestSendOk.opRoleBaseFlag == 1 {
		ackTestSendOk.opRoleBase = MsgRoleBaseDecode(pack)
	}
	return ackTestSendOk
}
Ejemplo n.º 15
0
func ReqSceneEnterFlyDecode(pack *packet.Packet) *ReqSceneEnterFly {
	reqSceneEnterFly := &ReqSceneEnterFly{}

	reqSceneEnterFly.mapId = pack.ReadUint32()
	return reqSceneEnterFly
}
Ejemplo n.º 16
0
func AckSceneExitDecode(pack *packet.Packet) *AckSceneExit {
	ackSceneExit := &AckSceneExit{}

	ackSceneExit.uid = pack.ReadUint32()
	return ackSceneExit
}
Ejemplo n.º 17
0
func ReqSceneEnterDecode(pack *packet.Packet) *ReqSceneEnter {
	reqSceneEnter := &ReqSceneEnter{}

	reqSceneEnter.doorId = pack.ReadUint32()
	return reqSceneEnter
}
Ejemplo n.º 18
0
func AckTestXXDecode(pack *packet.Packet) *AckTestXX {
	ackTestXX := &AckTestXX{}

	ackTestXX.idU8 = pack.ReadUint8()
	ackTestXX.idU16 = pack.ReadUint16()
	ackTestXX.idU32 = pack.ReadUint32()
	repeatIdU8Count := pack.ReadUint16()
	for ; repeatIdU8Count > 0; repeatIdU8Count-- {
		ackTestXX.repeatIdU8 = append(ackTestXX.repeatIdU8, pack.ReadUint8())
	}
	ackTestXX.optionalIdU8Flag = pack.ReadUint8()
	if ackTestXX.optionalIdU8Flag == 1 {
		ackTestXX.optionalIdU8 = pack.ReadUint8()
	}
	return ackTestXX
}
Ejemplo n.º 19
0
func MsgTestPhpDecode(pack *packet.Packet) *MsgTestPhp {
	msgTestPhp := &MsgTestPhp{}

	msgTestPhp.u16 = pack.ReadUint16()
	return msgTestPhp
}
Ejemplo n.º 20
0
func ReqRoleCreateDecode(pack *packet.Packet) *ReqRoleCreate {
	reqRoleCreate := &ReqRoleCreate{}

	reqRoleCreate.uid = pack.ReadUint32()
	reqRoleCreate.uuid = pack.ReadUint32()
	reqRoleCreate.sid = pack.ReadUint16()
	reqRoleCreate.cid = pack.ReadUint16()
	reqRoleCreate.os = pack.ReadString()
	reqRoleCreate.version = pack.ReadString()
	reqRoleCreate.uname = pack.ReadString()
	reqRoleCreate.source = pack.ReadString()
	reqRoleCreate.sourceSub = pack.ReadString()
	reqRoleCreate.loginTime = pack.ReadUint32()
	return reqRoleCreate
}
Ejemplo n.º 21
0
func AckRoleLoginOkDecode(pack *packet.Packet) *AckRoleLoginOk {
	ackRoleLoginOk := &AckRoleLoginOk{}

	ackRoleLoginOk.uname = pack.ReadString()
	return ackRoleLoginOk
}
Ejemplo n.º 22
0
func ReqTestSendDecode(pack *packet.Packet) *ReqTestSend {
	reqTestSend := &ReqTestSend{}

	reqTestSend.idU8 = pack.ReadUint8()
	reqTestSend.roleBase = MsgRoleBaseDecode(pack)
	idF32Count := pack.ReadUint16()
	for ; idF32Count > 0; idF32Count-- {
		reqTestSend.idF32 = append(reqTestSend.idF32, pack.ReadFloat32())
	}
	reqTestSend.idOpU8Flag = pack.ReadUint8()
	if reqTestSend.idOpU8Flag == 1 {
		reqTestSend.idOpU8 = pack.ReadUint8()
	}
	reqTestSend.opRoleBaseFlag = pack.ReadUint8()
	if reqTestSend.opRoleBaseFlag == 1 {
		reqTestSend.opRoleBase = MsgRoleBaseDecode(pack)
	}
	return reqTestSend
}
Ejemplo n.º 23
0
func MsgTestSendDecode(pack *packet.Packet) *MsgTestSend {
	msgTestSend := &MsgTestSend{}

	msgTestSend.idU8 = pack.ReadUint8()
	msgTestSend.roleBase = MsgRoleBaseDecode(pack)
	idF32Count := pack.ReadUint16()
	for ; idF32Count > 0; idF32Count-- {
		msgTestSend.idF32 = append(msgTestSend.idF32, pack.ReadFloat32())
	}
	msgTestSend.idOpU8Flag = pack.ReadUint8()
	if msgTestSend.idOpU8Flag == 1 {
		msgTestSend.idOpU8 = pack.ReadUint8()
	}
	msgTestSend.opRoleBaseFlag = pack.ReadUint8()
	if msgTestSend.opRoleBaseFlag == 1 {
		msgTestSend.opRoleBase = MsgRoleBaseDecode(pack)
	}
	return msgTestSend
}
Ejemplo n.º 24
0
func ReqRoleLoginDecode(pack *packet.Packet) *ReqRoleLogin {
	reqRoleLogin := &ReqRoleLogin{}

	reqRoleLogin.uid = pack.ReadUint32()
	reqRoleLogin.uuid = pack.ReadUint32()
	reqRoleLogin.sid = pack.ReadUint16()
	reqRoleLogin.cid = pack.ReadUint16()
	reqRoleLogin.loginTime = pack.ReadUint32()
	reqRoleLogin.pwd = pack.ReadString()
	reqRoleLogin.relink = pack.ReadUint8()
	reqRoleLogin.debug = pack.ReadUint8()
	reqRoleLogin.os = pack.ReadString()
	reqRoleLogin.version = pack.ReadString()
	return reqRoleLogin
}