Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop

This commit is contained in:
sk 2024-09-25 17:47:01 +08:00
commit 867df580b5
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 { func (this *ShopMgr) GetDollExchangeRecord(p *Player) {
pack := &bag.SCDillChangeLog{}
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} { task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
pack := &webapi_proto.ASGetDollExchangeOrder{ pack := &webapi_proto.ASGetDollExchangeOrder{
Snid: p.SnId, Snid: p.SnId,
@ -1446,6 +1445,7 @@ func (this *ShopMgr) GetDollExchangeRecord(p *Player) *bag.SCDillChangeLog {
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) { }), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
if data != nil { if data != nil {
if as := data.(*webapi_proto.SAGetDollExchangeOrder); as != nil { if as := data.(*webapi_proto.SAGetDollExchangeOrder); as != nil {
pack := &bag.SCDillChangeLog{}
for _, v := range as.OrderList { for _, v := range as.OrderList {
cdata := this.GetExchangeData(p.Platform, v.GoodsId) cdata := this.GetExchangeData(p.Platform, v.GoodsId)
record := &bag.DillChangeLogInfo{ record := &bag.DillChangeLogInfo{
@ -1458,10 +1458,11 @@ func (this *ShopMgr) GetDollExchangeRecord(p *Player) *bag.SCDillChangeLog {
} }
pack.Info = append(pack.Info, record) pack.Info = append(pack.Info, record)
} }
p.SendToClient(int(bag.SPacketID_PACKET_SC_DollChangeLog), pack)
} }
} }
}), "DollExchangeRecord").Start() }), "DollExchangeRecord").Start()
return pack return
} }
func (this *ShopMgr) StartTimer(SnId int32, afterTs int32) { func (this *ShopMgr) StartTimer(SnId int32, afterTs int32) {