diff --git a/modules/entertainment/room.go b/modules/entertainment/room.go index e92401be0..7694150d9 100644 --- a/modules/entertainment/room.go +++ b/modules/entertainment/room.go @@ -145,13 +145,6 @@ func (this *Room) AiOperator() { this.player2.Ps-- // 交换元素 szMap, oid1, oid2, bAddPs = this.chessboard.AiSwapGirde() - for _, v := range szMap { // - this.player2.Energy += v.CurEnergy - v.CurEnergy = this.player2.Energy - curScore += v.CurSocre - this.player2.Score += v.CurSocre - v.CurSocre = this.player2.Score - } if bAddPs { this.player2.Ps++ @@ -165,7 +158,7 @@ func (this *Room) AiOperator() { this.round++ } // 校验下次是不是消除 - if this.chessboard.CheckAndRefreshPlat() { + if !this.chessboard.CheckAndRefreshPlat() { this.chessboard.RedsetPlatData() szMap = append(szMap, &pb.MapData{ Data: this.chessboard.GetPalatData(), @@ -342,7 +335,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr } // 校验下次是不是消除 - if this.chessboard.CheckAndRefreshPlat() { + if !this.chessboard.CheckAndRefreshPlat() { this.chessboard.RedsetPlatData() szMap = append(szMap, &pb.MapData{ Data: this.chessboard.GetPalatData(), diff --git a/modules/entertainment/xxlPlat.go b/modules/entertainment/xxlPlat.go index edb827e4d..840a14087 100644 --- a/modules/entertainment/xxlPlat.go +++ b/modules/entertainment/xxlPlat.go @@ -525,7 +525,9 @@ func (this *MapData) SkillUp(color int32, skillid int32, value int32, bDrop bool CurSocre: skillScore, CurEnergy: skillEnergy, }) - szMap, _ = this.CheckMap(1, false) + if list, _ := this.CheckMap(color, false); len(list) > 0 { + szMap = append(szMap, list...) + } } } }