优化订单接口

This commit is contained in:
hahwu 2025-05-22 10:14:00 +08:00
parent 4255f95a12
commit 8ea3efb33a
2 changed files with 13 additions and 2 deletions

View File

@ -220,6 +220,8 @@ func ReqRewardOrder(player *Player, buf []byte) error {
PlayroomMod := player.PlayMod.getPlayroomMod()
LimitedTimeEventMod := player.PlayMod.getLimitedTimeEventMod()
Item, mergeList, OrderType, Star, err := OrderMod.RewardOrder(int(req.OrderId))
ActItem := GetActivityItem(player, GoUtil.Int32ToInt(req.ActType))
Item = item.Merge(Item, ActItem)
if OrderType == order.Trigger_type { // playroom触发式订单获取额外道具
Item1 := PlayroomMod.GetReward()
Item = item.Merge(Item, Item1)

View File

@ -5493,6 +5493,7 @@ type ReqRewardOrder struct {
state protoimpl.MessageState `protogen:"open.v1"`
OrderId int32 `protobuf:"varint,1,opt,name=OrderId,proto3" json:"OrderId,omitempty"`
MChessData map[string]int32 `protobuf:"bytes,2,rep,name=mChessData,proto3" json:"mChessData,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
ActType []int32 `protobuf:"varint,3,rep,packed,name=ActType,proto3" json:"ActType,omitempty"` // 活动类型
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -5541,6 +5542,13 @@ func (x *ReqRewardOrder) GetMChessData() map[string]int32 {
return nil
}
func (x *ReqRewardOrder) GetActType() []int32 {
if x != nil {
return x.ActType
}
return nil
}
type ResRewardOrder struct {
state protoimpl.MessageState `protogen:"open.v1"`
Code RES_CODE `protobuf:"varint,1,opt,name=Code,proto3,enum=tutorial.RES_CODE" json:"Code,omitempty"`
@ -23074,12 +23082,13 @@ const file_proto_Gameapi_proto_rawDesc = "" +
"\x04Type\x18\x01 \x01(\tR\x04Type\"P\n" +
"\x14ResHandbookAllReward\x12&\n" +
"\x04Code\x18\x01 \x01(\x0e2\x12.tutorial.RES_CODER\x04Code\x12\x10\n" +
"\x03Msg\x18\x02 \x01(\tR\x03Msg\"\xb3\x01\n" +
"\x03Msg\x18\x02 \x01(\tR\x03Msg\"\xcd\x01\n" +
"\x0eReqRewardOrder\x12\x18\n" +
"\aOrderId\x18\x01 \x01(\x05R\aOrderId\x12H\n" +
"\n" +
"mChessData\x18\x02 \x03(\v2(.tutorial.ReqRewardOrder.MChessDataEntryR\n" +
"mChessData\x1a=\n" +
"mChessData\x12\x18\n" +
"\aActType\x18\x03 \x03(\x05R\aActType\x1a=\n" +
"\x0fMChessDataEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\"J\n" +