Commit 8622c3ec authored by chenweijian's avatar chenweijian

游戏

parent 54a94a53
......@@ -21,7 +21,7 @@ type gameAutoJoinMsg struct {
func SetAutoMathEnterRoom(userId uint64, imGroupId, traceId, token, enterType, gameCode, is1V1, gameMode, is1V1Robot string) error {
key := game_e.GetAutoMathEnterRoom(userId, imGroupId)
mylogrus.MyLog.Infof("Start1V1AfterEnterRoom is1V1Robot:%d, userId:%d, imGroupId:%v", is1V1Robot, userId, imGroupId)
mylogrus.MyLog.Infof("Start1V1AfterEnterRoom is1V1Robot:%s, userId:%d, imGroupId:%v", is1V1Robot, userId, imGroupId)
info := gameAutoJoinMsg{traceId, token, enterType, gameCode, is1V1, gameMode, is1V1Robot}
data, err := json.Marshal(info)
if err != nil {
......
......@@ -1893,7 +1893,7 @@ func GroupIn(c *gin.Context) (*mycontext.MyContext, error) {
}()
}
// 判断是否需要执行游戏逻辑
if enterType != "" && gameCode != "" {
if enterType != "" && (gameCode != "" || is1V1Robot == "1") {
traceId, _ := c.Get(mycontext.TRACEID)
token := c.Writer.Header().Get(mycontext.TOKEN)
err := game_c.SetAutoMathEnterRoom(userId, gi.ImGroupId, cast.ToString(traceId), token, enterType, gameCode, is1V1, gameMode, is1V1Robot)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment