修复竞技场挑战阵型bug

This commit is contained in:
liwei1dao 2024-01-30 13:54:32 +08:00
parent 9f14ed050b
commit a479a077ba
2 changed files with 1 additions and 2 deletions

View File

@ -67,7 +67,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge
})
if red.Attack != nil {
for i, v := range req.Battle.Format {
if (red.Attack.Formt[i] != nil && red.Attack.Formt[i].Id != v) || (red.Attack.Formt[i] == nil && v == "") {
if (red.Attack.Formt[i] != nil && red.Attack.Formt[i].Id != v) || (red.Attack.Formt[i] == nil && v != "") {
change = true
}
}

View File

@ -399,7 +399,6 @@ func (this *DBModel) ChangeLists(uid string, datas map[string]interface{}, opt .
func (this *DBModel) BatchChange(uids []string, datas map[string]interface{}, opt ...DBOption) (err error) {
pipe := this.Redis.RedisPipe(context.TODO())
for _, uid := range uids {
if err = pipe.HMSet(this.ukey(uid), datas); err != nil {
log.Error("DBModel ChangeList", log.Field{Key: "err", Value: err.Error()})
return