friends/update_profile.go
2021-09-11 23:59:07 -04:00

29 lines
799 B
Go

package main
import (
nex "github.com/PretendoNetwork/nex-go"
nexproto "github.com/PretendoNetwork/nex-protocols-go"
)
func updateProfile(err error, client *nex.Client, callID uint32, profileData *nexproto.MyProfile) {
// TODO: Do something with this
rmcResponse := nex.NewRMCResponse(nexproto.Friends3DSProtocolID, callID)
rmcResponse.SetSuccess(nexproto.Friends3DSMethodUpdateProfile, nil)
rmcResponseBytes := rmcResponse.Bytes()
responsePacket, _ := nex.NewPacketV0(client, nil)
responsePacket.SetVersion(0)
responsePacket.SetSource(0xA1)
responsePacket.SetDestination(0xAF)
responsePacket.SetType(nex.DataPacket)
responsePacket.SetPayload(rmcResponseBytes)
responsePacket.AddFlag(nex.FlagNeedsAck)
responsePacket.AddFlag(nex.FlagReliable)
nexServer.Send(responsePacket)
}