Sfoglia il codice sorgente

修复英灵殿匹配错误也会扣次数问题

yy 1 anno fa
parent
commit
1c81f71df3

+ 7 - 7
RO_Server_Trunk-branch_0.1.39/roserver/game/model/role_arena.go

@@ -397,16 +397,16 @@ func (this *RoleArena) SetLastFighter(info *serverproto.FightRoleInfo) {
 	}
 	}
 	this.SetDirty(true)
 	this.SetDirty(true)
 
 
-	//匹配到对手立即扣除次数
-	this.arenaInfo.ChallengeCount--
-	this.arenaInfo.RecordTotalCount++
-	TaskMagCheck(this.role, serverproto.TaskType_Arena_Battle_Start_Count, 1)
-	TaskMagCheck(this.role, serverproto.TaskType_Arena_Battle_Start_Count_Accu, 1)
-	this.dataChangeNtf()
-
 	util.DebugF("uid=%v SetLastFighter info=%v", this.role.GetUUid(), info)
 	util.DebugF("uid=%v SetLastFighter info=%v", this.role.GetUUid(), info)
 	if info == nil {
 	if info == nil {
 		ackMsg.Error = int32(serverproto.ErrorCode_ERROR_FAIL)
 		ackMsg.Error = int32(serverproto.ErrorCode_ERROR_FAIL)
+	} else {
+		//匹配到对手立即扣除次数
+		this.arenaInfo.ChallengeCount--
+		this.arenaInfo.RecordTotalCount++
+		TaskMagCheck(this.role, serverproto.TaskType_Arena_Battle_Start_Count, 1)
+		TaskMagCheck(this.role, serverproto.TaskType_Arena_Battle_Start_Count_Accu, 1)
+		this.dataChangeNtf()
 	}
 	}
 	ackMsg.FightInfo = info
 	ackMsg.FightInfo = info
 	this.role.ReplayGate(ackMsg, true)
 	this.role.ReplayGate(ackMsg, true)