From 894c28fa0eae348110f2d54740fca1a633d81724 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Fri, 10 Jan 2025 16:27:06 +0800 Subject: [PATCH] =?UTF-8?q?modify=20=E6=8E=A8=E5=B8=81=E6=9C=BA=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/action_pushcoin.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/worldsrv/action_pushcoin.go b/worldsrv/action_pushcoin.go index e62233b..1b04d6e 100644 --- a/worldsrv/action_pushcoin.go +++ b/worldsrv/action_pushcoin.go @@ -53,10 +53,15 @@ func CSPushCoinInfo(s *netlib.Session, packetid int, data interface{}, sid int64 } if p.WelfData.PushCoin == nil { + // 初始化 p.WelfData.PushCoin = &model.PushCoinData{ Power: PowerInit, Exchange: make(map[int32]int32), - Items: make(map[int32]int64), + Items: map[int32]int64{ + common.ItemIDVCard: 1, + common.ItemIDCoin: 50 * 5000, + common.ItemIDPlum: 1, + }, } } @@ -216,9 +221,7 @@ func CSPushCoinPlayerOp(s *netlib.Session, packetid int, data interface{}, sid i p.WelfData.PushCoin.Refresh++ // 1个v卡,50个金币,大梅花1个 p.WelfData.PushCoin.Items = map[int32]int64{ - common.ItemIDVCard: 1, - common.ItemIDCoin: 50 * 5000, - common.ItemIDPlum: 1, + common.ItemIDCoin: 50 * 5000, } case activity.OpCodes_OP_Exchange: