From 5f96222da876151bd7ab1649c038902b30ef8e1c Mon Sep 17 00:00:00 2001
From: client_Lhy <995049470@qq.com>
Date: 星期四, 13 六月 2019 15:15:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/FindPrecious/DemonJarModel.cs | 35 ++++++++++++++++++++++++++++-------
1 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/System/FindPrecious/DemonJarModel.cs b/System/FindPrecious/DemonJarModel.cs
index 6da841c..540d493 100644
--- a/System/FindPrecious/DemonJarModel.cs
+++ b/System/FindPrecious/DemonJarModel.cs
@@ -2,12 +2,9 @@
// [Author]: 绗簩涓栫晫
// [ Date ]: Thursday, December 21, 2017
//--------------------------------------------------------
-using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
-using System;
-
using LitJson;
+using System;
+using System.Collections.Generic;
namespace Snxxz.UI
{
@@ -192,6 +189,23 @@
return bosses;
}
+ public bool IsBossUnlock(int bossId)
+ {
+ return findPreciousModel.IsBossUnlock(bossId) && IsPlayerLevelEnough(bossId);
+ }
+
+ public bool IsPlayerLevelEnough(int bossId)
+ {
+ var config = NPCConfig.Get(bossId);
+ return PlayerDatas.Instance.baseData.LV >= config.NPCLV;
+ }
+
+ public bool IsPlayerRealmEnough(int bossId)
+ {
+ var config = NPCConfig.Get(bossId);
+ return PlayerDatas.Instance.baseData.realmLevel >= config.Realm;
+ }
+
public int GetBossIdByLine(int _line)
{
if (lineToBoss.ContainsKey(_line))
@@ -212,7 +226,7 @@
for (int i = sortedBossIds.Count - 1; i >= 0; i--)
{
var bossId = sortedBossIds[i];
- if (findPreciousModel.IsBossUnlock(bossId))
+ if (IsBossUnlock(bossId))
{
if (preferBoss == 0)
{
@@ -244,7 +258,7 @@
for (int i = sortedBossIds.Count - 1; i >= 0; i--)
{
var bossId = sortedBossIds[i];
- if (findPreciousModel.IsBossUnlock(bossId))
+ if (IsBossUnlock(bossId))
{
return bossId;
}
@@ -370,6 +384,13 @@
var bossId = GetLastUnlockBoss();
AutoSubscribeLastUnLockBoss(bossId);
}
+ break;
+ case PlayerDataType.LV:
+ if (FuncOpen.Instance.IsFuncOpen(76))
+ {
+ var bossId = GetLastUnlockBoss();
+ AutoSubscribeLastUnLockBoss(bossId);
+ }
if (PlayerDatas.Instance.baseData.LV == GeneralDefine.demonJarRedPoint)
{
--
Gitblit v1.8.0