获取娃娃商城兑换单独接口修改

This commit is contained in:
by 2024-09-25 17:46:02 +08:00
parent ef8cbfaedd
commit fb6fc3920f
1 changed files with 4 additions and 3 deletions

View File

@ -1424,8 +1424,7 @@ func (this *ShopMgr) SendAPICreateOrder(p *Player, ConfigPayId int32, data any,
}
// 获取娃娃兑换记录
func (this *ShopMgr) GetDollExchangeRecord(p *Player) *bag.SCDillChangeLog {
pack := &bag.SCDillChangeLog{}
func (this *ShopMgr) GetDollExchangeRecord(p *Player) {
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
pack := &webapi_proto.ASGetDollExchangeOrder{
Snid: p.SnId,
@ -1446,6 +1445,7 @@ func (this *ShopMgr) GetDollExchangeRecord(p *Player) *bag.SCDillChangeLog {
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
if data != nil {
if as := data.(*webapi_proto.SAGetDollExchangeOrder); as != nil {
pack := &bag.SCDillChangeLog{}
for _, v := range as.OrderList {
cdata := this.GetExchangeData(p.Platform, v.GoodsId)
record := &bag.DillChangeLogInfo{
@ -1458,10 +1458,11 @@ func (this *ShopMgr) GetDollExchangeRecord(p *Player) *bag.SCDillChangeLog {
}
pack.Info = append(pack.Info, record)
}
p.SendToClient(int(bag.SPacketID_PACKET_SC_DollChangeLog), pack)
}
}
}), "DollExchangeRecord").Start()
return pack
return
}
func (this *ShopMgr) StartTimer(SnId int32, afterTs int32) {