friends/nex/friends-3ds/get_pid_by_lfc.go
Daniel López Guimaraes 2f80336681
Rename friends-secure to friends and remove Mongo
Replace MongoDB usage with GRPC calls to the account server. Also
include documentation on the README and a Makefile.
2023-08-13 01:05:08 +01:00

32 lines
945 B
Go

package nex_friends_3ds
import (
"github.com/PretendoNetwork/friends/globals"
nex "github.com/PretendoNetwork/nex-go"
friends_3ds "github.com/PretendoNetwork/nex-protocols-go/friends-3ds"
)
func GetPrincipalIDByLocalFriendCode(err error, client *nex.Client, callID uint32, lfc uint64, lfcList []uint64) uint32 {
// Respond with unimplemented, waiting for gRPC to retrieve PID from account server
rmcResponse := nex.NewRMCResponse(friends_3ds.ProtocolID, callID)
rmcResponse.SetError(nex.Errors.Core.NotImplemented)
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)
globals.SecureServer.Send(responsePacket)
return 0
}