From d9e6e5aac14261fad5bd18053b600bd513b45509 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 04 九月 2018 15:28:38 +0800
Subject: [PATCH] 1889 【前端】神兽地界及界面相关
---
System/DogzDungeon/DogzDungeonModel.cs | 50 +++++++++++++++++++++++++++++++-------------------
1 files changed, 31 insertions(+), 19 deletions(-)
diff --git a/System/DogzDungeon/DogzDungeonModel.cs b/System/DogzDungeon/DogzDungeonModel.cs
index 435b219..56cb4d1 100644
--- a/System/DogzDungeon/DogzDungeonModel.cs
+++ b/System/DogzDungeon/DogzDungeonModel.cs
@@ -13,11 +13,14 @@
public const int DATA_MAPID = 21110;
int m_SelectedBoss = 0;
- public int selectedBoss {
- get {
+ public int selectedBoss
+ {
+ get
+ {
return this.m_SelectedBoss;
}
- set {
+ set
+ {
if (this.m_SelectedBoss != value)
{
this.m_SelectedBoss = value;
@@ -30,9 +33,11 @@
}
int m_WearyValue = 0;
- public int wearyValue {
+ public int wearyValue
+ {
get { return m_WearyValue; }
- set {
+ set
+ {
if (m_WearyValue != value)
{
m_WearyValue = value;
@@ -45,9 +50,11 @@
}
int m_BigBoxCollectCount = 0;
- public int bigBoxCollectCount {
+ public int bigBoxCollectCount
+ {
get { return m_BigBoxCollectCount; }
- set {
+ set
+ {
if (m_BigBoxCollectCount != value)
{
m_BigBoxCollectCount = value;
@@ -60,7 +67,8 @@
}
int m_SmallBoxCollectCount = 0;
- public int smallBoxCollectCount {
+ public int smallBoxCollectCount
+ {
get { return m_SmallBoxCollectCount; }
set { m_SmallBoxCollectCount = value; }
}
@@ -125,10 +133,10 @@
for (int i = sortedBossIds.Count - 1; i >= 0; i--)
{
var bossId = sortedBossIds[i];
- var dogzConfig = ConfigManager.Instance.GetTemplate<DogzDungeonConfig>(bossId);
+ var dogzConfig = Config.Instance.Get<DogzDungeonConfig>(bossId);
if (dogzConfig.MonsterType == 3 || dogzConfig.MonsterType == 4)
{
- var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
+ var npcConfig = Config.Instance.Get<NPCConfig>(bossId);
if (IsBossUnLocked(bossId) && findPreciousModel.IsBossAlive(bossId) && playerLevel >= npcConfig.NPCLV)
{
return bossId;
@@ -283,7 +291,7 @@
private void ParseConfig()
{
- var configs = ConfigManager.Instance.GetAllValues<DogzDungeonConfig>();
+ var configs = Config.Instance.GetAllValues<DogzDungeonConfig>();
foreach (var config in configs)
{
switch (config.MonsterType)
@@ -336,8 +344,10 @@
public class DogzDungeonElite
{
public Dictionary<int, int> eliteCounts = new Dictionary<int, int>();
- public int eliteSurplus {
- get {
+ public int eliteSurplus
+ {
+ get
+ {
var count = 0;
foreach (var eliteCount in eliteCounts.Values)
{
@@ -358,7 +368,7 @@
public void UpdateEliteRefreshTime(int _seconds)
{
refreshTime = DateTime.Now + new TimeSpan(_seconds * TimeSpan.TicksPerSecond);
- if (refreshTimeEvent!=null)
+ if (refreshTimeEvent != null)
{
refreshTimeEvent();
}
@@ -382,9 +392,11 @@
public class DogzDungeonBossData
{
public int id { get; private set; }
- public bool isUnLocked {
- get {
- var config = ConfigManager.Instance.GetTemplate<NPCConfig>(id);
+ public bool isUnLocked
+ {
+ get
+ {
+ var config = Config.Instance.Get<NPCConfig>(id);
return PlayerDatas.Instance.baseData.LV >= config.NPCLV;
}
}
@@ -396,8 +408,8 @@
public static int LevelCompare(int a, int b)
{
- var configA = ConfigManager.Instance.GetTemplate<NPCConfig>(a);
- var configB = ConfigManager.Instance.GetTemplate<NPCConfig>(b);
+ var configA = Config.Instance.Get<NPCConfig>(a);
+ var configB = Config.Instance.Get<NPCConfig>(b);
return configA.NPCLV < configB.NPCLV ? -1 : 1;
}
--
Gitblit v1.8.0