From ab903309d1966e8ddbed1c76fe5e79fd66321ee8 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期一, 15 七月 2019 17:39:13 +0800
Subject: [PATCH] 3335 地图解锁条件支持境界
---
System/WorldMap/MapModel.cs | 27 +++++++++++++--------------
1 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/System/WorldMap/MapModel.cs b/System/WorldMap/MapModel.cs
index 4c15816..9339304 100644
--- a/System/WorldMap/MapModel.cs
+++ b/System/WorldMap/MapModel.cs
@@ -463,23 +463,22 @@
private bool CanMapUnlock(int _mapId)
{
var config = MapConfig.Get(_mapId);
- var level = PlayerDatas.Instance.baseData.LV;
-
- if (level >= config.LV)
- {
- if (config.MainTaskID > 0)
- {
- return mapUnLockIndex >= config.MainTaskID;
- }
- else
- {
- return true;
- }
- }
- else
+ if (config.LV != 0 && PlayerDatas.Instance.baseData.LV < config.LV)
{
return false;
}
+
+ if (config.MainTaskID != 0 && mapUnLockIndex < config.MainTaskID)
+ {
+ return false;
+ }
+
+ if (config.realmLevel != 0 && PlayerDatas.Instance.baseData.realmLevel < config.realmLevel)
+ {
+ return false;
+ }
+
+ return true;
}
private void OnPlayerLevelChange(PlayerDataType refreshType)
--
Gitblit v1.8.0