解决冲突

This commit is contained in:
sk 2024-09-19 09:25:13 +08:00
commit e1f5447da0
9 changed files with 2977 additions and 102 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@ -11,7 +11,7 @@
"FinishTimes": 1, "FinishTimes": 1,
"Award": { "Award": {
"100001": 500000, "100001": 500000,
"100004": 5 "100004": 20
}, },
"Position": [ "Position": [
1, 1,
@ -28,7 +28,7 @@
"TargetTimes": 1, "TargetTimes": 1,
"FinishTimes": 1, "FinishTimes": 1,
"Award": { "Award": {
"100001": 100000, "100001": 200000,
"100004": 20 "100004": 20
}, },
"Position": [ "Position": [
@ -47,7 +47,7 @@
"FinishTimes": 1, "FinishTimes": 1,
"Award": { "Award": {
"100001": 50000, "100001": 50000,
"100004": 15 "100004": 10
} }
}, },
{ {
@ -76,7 +76,7 @@
"FinishTimes": 1, "FinishTimes": 1,
"Award": { "Award": {
"100001": 100000, "100001": 100000,
"100004": 30 "100004": 20
}, },
"GameType": 1 "GameType": 1
}, },
@ -90,11 +90,47 @@
"TargetTimes": 1, "TargetTimes": 1,
"FinishTimes": 1, "FinishTimes": 1,
"Award": { "Award": {
"100001": 100000, "100001": 50000,
"100004": 20 "100004": 20
}, },
"GameType": 1 "GameType": 1
}, },
{
"Id": 27,
"Order": 7,
"Name": "每日任务",
"Des": "累计充值$4.99",
"ActivityType": 1,
"TaskType": 7,
"TargetTimes": 499,
"FinishTimes": 1,
"Award": {
"100001": 1000000,
"100004": 30
},
"Position": [
1,
1
]
},
{
"Id": 28,
"Order": 8,
"Name": "每日任务",
"Des": "累计充值$9.99",
"ActivityType": 1,
"TaskType": 7,
"TargetTimes": 999,
"FinishTimes": 1,
"Award": {
"100001": 2000000,
"100004": 50
},
"Position": [
1,
1
]
},
{ {
"Id": 7, "Id": 7,
"Order": 1, "Order": 1,
@ -116,7 +152,7 @@
"TargetTimes": 300, "TargetTimes": 300,
"FinishTimes": 1, "FinishTimes": 1,
"Award": { "Award": {
"50001": 2 "50001": 5
} }
}, },
{ {
@ -140,7 +176,7 @@
"TargetTimes": 500, "TargetTimes": 500,
"FinishTimes": 1, "FinishTimes": 1,
"Award": { "Award": {
"50001": 5 "50001": 10
} }
}, },
{ {
@ -149,10 +185,10 @@
"Name": "周活跃任务", "Name": "周活跃任务",
"ActivityType": 2, "ActivityType": 2,
"TaskType": 14, "TaskType": 14,
"TargetTimes": 600, "TargetTimes": 650,
"FinishTimes": 1, "FinishTimes": 1,
"Award": { "Award": {
"100002": 10 "30008": 1
} }
}, },
{ {

View File

@ -106,7 +106,7 @@ func init() {
if err != nil { if err != nil {
pack.Tag = webapiproto.TagCode_FAILED pack.Tag = webapiproto.TagCode_FAILED
pack.Msg = "数据序列化失败" pack.Msg = "数据序列化失败"
return transact.TransResult_Failed, pack return common.ResponseTag_Ok, pack
} }
pack.Tag = webapiproto.TagCode_SUCCESS pack.Tag = webapiproto.TagCode_SUCCESS
@ -114,7 +114,7 @@ func init() {
if scene == nil || scene.ExtraData == nil { if scene == nil || scene.ExtraData == nil {
pack.Tag = webapiproto.TagCode_NotFound pack.Tag = webapiproto.TagCode_NotFound
pack.Msg = "房间没找到" pack.Msg = "房间没找到"
return transact.TransResult_Failed, pack return common.ResponseTag_Ok, pack
} }
switch d := scene.ExtraData.(type) { switch d := scene.ExtraData.(type) {
@ -140,11 +140,11 @@ func init() {
} }
pack.List = append(pack.List, item) pack.List = append(pack.List, item)
} }
return transact.TransResult_Success, pack return common.ResponseTag_Ok, pack
default: default:
pack.Tag = webapiproto.TagCode_FAILED pack.Tag = webapiproto.TagCode_FAILED
pack.Msg = "未实现" pack.Msg = "未实现"
} }
return transact.TransResult_Failed, pack return common.ResponseTag_Ok, pack
})) }))
} }

View File

@ -6,8 +6,10 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"io" "io"
"mongo.games.com/game/common" "net/http"
"mongo.games.com/game/model" "sync/atomic"
"time"
"mongo.games.com/goserver/core" "mongo.games.com/goserver/core"
"mongo.games.com/goserver/core/admin" "mongo.games.com/goserver/core/admin"
"mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/logger"
@ -15,9 +17,10 @@ import (
"mongo.games.com/goserver/core/transact" "mongo.games.com/goserver/core/transact"
"mongo.games.com/goserver/core/utils" "mongo.games.com/goserver/core/utils"
"mongo.games.com/goserver/srvlib" "mongo.games.com/goserver/srvlib"
"net/http"
"sync/atomic" "mongo.games.com/game/common"
"time" "mongo.games.com/game/model"
"mongo.games.com/game/protocol/webapi"
) )
const ( const (
@ -173,10 +176,11 @@ func init() {
}), }),
OnChildRespWrapper: transact.OnChildRespWrapper(func(tNode *transact.TransNode, hChild transact.TransNodeID, retCode int, ud interface{}) transact.TransExeResult { OnChildRespWrapper: transact.OnChildRespWrapper(func(tNode *transact.TransNode, hChild transact.TransNodeID, retCode int, ud interface{}) transact.TransExeResult {
logger.Logger.Tracef("GameSrvApi OnChildRespWrapper %v:%v", hChild, ud) logger.Logger.Tracef("GameSrvApi OnChildRespWrapper %v:%v", hChild, ud)
if retCode == transact.TransResult_Success { msg, ok := ud.(*webapi.SARoomInfo)
if ok && msg.GetTag() == webapi.TagCode_SUCCESS {
tNode.TransEnv.SetField(GAMESRVAPI_TRANSACTE_RESPONSE, ud) tNode.TransEnv.SetField(GAMESRVAPI_TRANSACTE_RESPONSE, ud)
} }
return transact.TransExeResult_Success return transact.TransExeResult(retCode)
}), }),
}) })
// 对局详情 // 对局详情

Binary file not shown.

Binary file not shown.