From fb6fc3920ff86f604d1de6e2d50765c1fdcedc2c Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Wed, 25 Sep 2024 17:46:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=A8=83=E5=A8=83=E5=95=86?= =?UTF-8?q?=E5=9F=8E=E5=85=91=E6=8D=A2=E5=8D=95=E7=8B=AC=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/shopmgr.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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) {