Merge branch 'dev_login' of git.pogorockgames.com:mango-games/server/game into dev_login
This commit is contained in:
commit
db1a88684a
|
@ -2994,11 +2994,13 @@ func init() {
|
||||||
addcoin, err = strconv.ParseInt(msg.Count, 10, 64)
|
addcoin, err = strconv.ParseInt(msg.Count, 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Logger.Error("Unmarshal webapi.PlatfromUpScoreReq strconv.ParseInt error:", err)
|
logger.Logger.Error("Unmarshal webapi.PlatfromUpScoreReq strconv.ParseInt error:", err)
|
||||||
|
jsonDataRsp, err = json.Marshal(pack)
|
||||||
return common.ResponseTag_ParamError, jsonDataRsp
|
return common.ResponseTag_ParamError, jsonDataRsp
|
||||||
}
|
}
|
||||||
|
|
||||||
if addcoin <= 0 {
|
if addcoin <= 0 {
|
||||||
logger.Logger.Error("/api/platform/upscore addcoin:%v less 0", addcoin)
|
logger.Logger.Error("/api/platform/upscore addcoin:%v less 0", addcoin)
|
||||||
|
jsonDataRsp, err = json.Marshal(pack)
|
||||||
return common.ResponseTag_ParamError, jsonDataRsp
|
return common.ResponseTag_ParamError, jsonDataRsp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3051,18 +3053,12 @@ func init() {
|
||||||
pack.Code = int(webapiproto.TagCode_SUCCESS)
|
pack.Code = int(webapiproto.TagCode_SUCCESS)
|
||||||
pack.Message = data.(error).Error()
|
pack.Message = data.(error).Error()
|
||||||
} else {
|
} else {
|
||||||
//player.Coin += addcoin
|
|
||||||
player.AddCoin(addcoin, 0, common.GainWayPlatformUpScore, "platform", "平台上分")
|
player.AddCoin(addcoin, 0, common.GainWayPlatformUpScore, "platform", "平台上分")
|
||||||
player.SendDiffData()
|
player.SendDiffData()
|
||||||
}
|
}
|
||||||
|
|
||||||
pack.Data.Count = player.Coin
|
pack.Data.Count = player.Coin
|
||||||
|
|
||||||
// 玩家在游戏内
|
|
||||||
if player.scene != nil {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
jsonDataRsp, err = json.Marshal(pack)
|
jsonDataRsp, err = json.Marshal(pack)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Logger.Errorf("/api/platform/upscore err: %v", err)
|
logger.Logger.Errorf("/api/platform/upscore err: %v", err)
|
||||||
|
@ -3172,17 +3168,19 @@ func init() {
|
||||||
addcoin = -player.Coin
|
addcoin = -player.Coin
|
||||||
remainNum = player.Coin
|
remainNum = player.Coin
|
||||||
platform := player.Platform
|
platform := player.Platform
|
||||||
////玩家在游戏内
|
//玩家在游戏内
|
||||||
//if player.scene != nil {
|
if player.scene != nil {
|
||||||
// pack.Code = int(webapiproto.TagCode_FAILED)
|
pack.Code = int(webapiproto.TagCode_FAILED)
|
||||||
// pack.Message = "Unsupported!!! because player in scene!"
|
pack.Message = "Unsupported!!! because player in scene!"
|
||||||
// return common.ResponseTag_ParamError, pack
|
jsonDataRsp, err = json.Marshal(pack)
|
||||||
//}
|
return common.ResponseTag_ParamError, jsonDataRsp
|
||||||
|
}
|
||||||
|
|
||||||
if len(platform) <= 0 {
|
if len(platform) <= 0 {
|
||||||
pack.Code = int(webapiproto.TagCode_FAILED)
|
pack.Code = int(webapiproto.TagCode_FAILED)
|
||||||
pack.Message = "player platform forbit!"
|
pack.Message = "player platform forbit!"
|
||||||
return common.ResponseTag_ParamError, pack
|
jsonDataRsp, err = json.Marshal(pack)
|
||||||
|
return common.ResponseTag_ParamError, jsonDataRsp
|
||||||
}
|
}
|
||||||
|
|
||||||
//增加帐变记录
|
//增加帐变记录
|
||||||
|
|
Loading…
Reference in New Issue