diff --git a/worldsrv/shopmgr.go b/worldsrv/shopmgr.go index 5441ecb..8e32367 100644 --- a/worldsrv/shopmgr.go +++ b/worldsrv/shopmgr.go @@ -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) {