Пример #1
1
func MsgFriendBaseAddDecode(pack *packet.Packet) *MsgFriendBaseAdd {
	msgFriendBaseAdd := &MsgFriendBaseAdd{}

	msgFriendBaseAdd.uid = pack.ReadUint32()
	msgFriendBaseAdd.uname = pack.ReadString()
	return msgFriendBaseAdd
}
Пример #2
0
func MsgScenePlayerDecode(pack *packet.Packet) *MsgScenePlayer {
	msgScenePlayer := &MsgScenePlayer{}

	msgScenePlayer.uid = pack.ReadUint32()
	msgScenePlayer.sceneRotPos = MsgSceneRotPosDecode(pack)
	return msgScenePlayer
}
Пример #3
0
func MsgRoleBaseDecode(pack *packet.Packet) *MsgRoleBase {
	msgRoleBase := &MsgRoleBase{}

	msgRoleBase.uid = pack.ReadUint32()
	msgRoleBase.uname = pack.ReadString()
	return msgRoleBase
}
Пример #4
0
func ReqChatSendDecode(pack *packet.Packet) *ReqChatSend {
	reqChatSend := &ReqChatSend{}

	reqChatSend.channel = pack.ReadUint8()
	reqChatSend.destUid = pack.ReadUint32()
	reqChatSend.content = pack.ReadString()
	return reqChatSend
}
Пример #5
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
}
Пример #6
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
}
Пример #7
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
}
Пример #8
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
}
Пример #9
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
}
Пример #10
0
func ReqSceneEnterFlyDecode(pack *packet.Packet) *ReqSceneEnterFly {
	reqSceneEnterFly := &ReqSceneEnterFly{}

	reqSceneEnterFly.mapId = pack.ReadUint32()
	return reqSceneEnterFly
}
Пример #11
0
func AckSceneExitDecode(pack *packet.Packet) *AckSceneExit {
	ackSceneExit := &AckSceneExit{}

	ackSceneExit.uid = pack.ReadUint32()
	return ackSceneExit
}
Пример #12
0
func ReqSceneEnterDecode(pack *packet.Packet) *ReqSceneEnter {
	reqSceneEnter := &ReqSceneEnter{}

	reqSceneEnter.doorId = pack.ReadUint32()
	return reqSceneEnter
}