Merge branch 'dev_pigbank2' into develop

# Conflicts:
#	worldsrv/welfmgr.go
This commit is contained in:
DESKTOP-45ANQ2C\unis 2025-01-02 11:14:46 +08:00
commit a2acd36596
2 changed files with 8 additions and 8 deletions

View File

@ -2945,7 +2945,7 @@ func init() {
var msg *webapi.DebugTestReq var msg *webapi.DebugTestReq
err := json.Unmarshal(params, &msg) err := json.Unmarshal(params, &msg)
if err != nil { if err != nil {
logger.Logger.Error("Unmarshal webapi.PlatfromUpScoreReq error:", err) logger.Logger.Error("Unmarshal webapi.DebugTestReq error:", err)
return common.ResponseTag_ParamError, pack return common.ResponseTag_ParamError, pack
} }
@ -2955,7 +2955,7 @@ func init() {
Message: "未知错误", Message: "未知错误",
} }
logger.Logger.Tracef("/api/platform/debug upScoreReqInfo%v", msg) logger.Logger.Tracef("/api/platform/debug DebugTestReq%v", msg)
player := PlayerMgrSington.GetPlayerBySnId(msg.Snid) player := PlayerMgrSington.GetPlayerBySnId(msg.Snid)
//玩家在线 //玩家在线
@ -2967,7 +2967,7 @@ func init() {
if msg.Rpc == 1 { if msg.Rpc == 1 {
addCoin, _ := strconv.ParseInt(msg.Count, 10, 64) addCoin, _ := strconv.ParseInt(msg.Count, 10, 64)
player.AddCoin(addCoin, 0, 5555, "platform", "debug加钻石") player.AddCoin(addCoin, 0, 5555, "platform", "debug加金币")
player.SendDiffData() player.SendDiffData()
jsonRet.Data.Count = player.Coin jsonRet.Data.Count = player.Coin
} else if msg.Rpc == 2 { } else if msg.Rpc == 2 {

View File

@ -2066,15 +2066,15 @@ func (this *WelfareMgr) DiamondBankTakeCoin(p *Player) (retItemArr []*model.Item
Num: 1, Num: 1,
}) })
retItemArr = append(retItemArr, &model.Item{
ItemId: common.ItemIDDiamond,
ItemNum: addDiamond,
})
// 发放奖励道具 // 发放奖励道具
if infoData.DiamondExc != nil { if infoData.DiamondExc != nil {
var items []*model.Item var items []*model.Item
retItemArr = append(retItemArr, &model.Item{
ItemId: common.ItemIDDiamond,
ItemNum: addDiamond,
})
for _, v := range infoData.DiamondExc { for _, v := range infoData.DiamondExc {
items = append(items, &model.Item{ items = append(items, &model.Item{
ItemId: v.ItemId, ItemId: v.ItemId,