mirror of
https://github.com/PretendoNetwork/super-mario-maker.git
synced 2026-08-02 16:35:36 -05:00
stubbed GetDeletionReason
This commit is contained in:
parent
973d163563
commit
a0102cef97
42
get_deletion_reason.go
Normal file
42
get_deletion_reason.go
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
nex "github.com/PretendoNetwork/nex-go"
|
||||
nexproto "github.com/PretendoNetwork/nex-protocols-go"
|
||||
)
|
||||
|
||||
func getDeletionReason(err error, client *nex.Client, callID uint32, dataIdLst []uint64) {
|
||||
// TODO: Complete this
|
||||
|
||||
pDeletionReasons := make([]uint32, 0)
|
||||
|
||||
for range dataIdLst {
|
||||
// We don't need the values right now
|
||||
// stub this
|
||||
pDeletionReasons = append(pDeletionReasons, 0x690007)
|
||||
}
|
||||
|
||||
rmcResponseStream := nex.NewStreamOut(nexServer)
|
||||
|
||||
rmcResponseStream.WriteListUInt32LE(pDeletionReasons)
|
||||
|
||||
rmcResponseBody := rmcResponseStream.Bytes()
|
||||
|
||||
rmcResponse := nex.NewRMCResponse(nexproto.DataStoreSMMProtocolID, callID)
|
||||
rmcResponse.SetSuccess(nexproto.DataStoreSMMMethodGetDeletionReason, rmcResponseBody)
|
||||
|
||||
rmcResponseBytes := rmcResponse.Bytes()
|
||||
|
||||
responsePacket, _ := nex.NewPacketV1(client, nil)
|
||||
|
||||
responsePacket.SetVersion(1)
|
||||
responsePacket.SetSource(0xA1)
|
||||
responsePacket.SetDestination(0xAF)
|
||||
responsePacket.SetType(nex.DataPacket)
|
||||
responsePacket.SetPayload(rmcResponseBytes)
|
||||
|
||||
responsePacket.AddFlag(nex.FlagNeedsAck)
|
||||
responsePacket.AddFlag(nex.FlagReliable)
|
||||
|
||||
nexServer.Send(responsePacket)
|
||||
}
|
||||
1
main.go
1
main.go
|
|
@ -84,6 +84,7 @@ func main() {
|
|||
dataStoreSmmServer.UploadCourseRecord(uploadCourseRecord)
|
||||
dataStoreSmmServer.GetCourseRecord(getCourseRecord)
|
||||
dataStoreSmmServer.GetApplicationConfigString(getApplicationConfigString)
|
||||
dataStoreSmmServer.GetDeletionReason(getDeletionReason)
|
||||
dataStoreSmmServer.GetMetasWithCourseRecord(getMetasWithCourseRecord)
|
||||
dataStoreSmmServer.CheckRateCustomRankingCounter(checkRateCustomRankingCounter)
|
||||
dataStoreSmmServer.CTRPickUpCourseSearchObject(ctrPickUpCourseSearchObject)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user