From ee945ee8d3199e91df76e7b320d2c37f5efc599a Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期三, 12 九月 2018 17:10:57 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/AssetVersion/AssetVersionUtility.cs | 11
System/Dogz/DogzItemCell.cs | 1
System/WorldMap/LocalMapFindPath.cs | 14
System/WorldMap/LocalMapTag.cs | 2
System/Rune/RuneMosaicWin.cs | 30
System/WorldMap/MapModel.cs | 212 ++----
Core/GameEngine/DataToCtl/PackageRegedit.cs | 1
Fight/Stage/Dungeon/MapTransfer.cs | 2
System/BlastFurnace/PrayDrugCell.cs | 55 +
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA514_tagCMPrayElixir.cs.meta | 12
System/Message/RichMoveEvent.cs | 2
System/Team/MyTeamWin.cs | 6
System/BlastFurnace/PrayforDrugGetItemWin.cs.meta | 12
System/WorldMap/LocalMapEventPointToggle.cs | 12
System/MainInterfacePanel/FeatureNoticeModel.cs.meta | 12
Utility/ComponentExtersion.cs | 44 +
System/FindPrecious/WorldBossModel.cs | 4
Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta | 2
System/BlastFurnace/PrayforDrugWin.cs.meta | 12
System/WorldMap/LocalMapWin.cs | 14
System/BlastFurnace/PrayforDrugWin.cs | 132 ++++
System/Store/StoreModel.cs | 51 +
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA321_tagMCPrayElixirResult.cs | 21
System/SystemSetting/ChatSetting.cs | 29
Core/NetworkPackage/ServerPack/HA3_Function/HA321_tagMCPrayElixirResult.cs | 19
Fight/MapTransferUtility.cs | 10
Core/NetworkPackage/ServerPack/HA3_Function/HA321_tagMCPrayElixirResult.cs.meta | 12
System/MainInterfacePanel/MainInterfaceWin.cs | 7
System/FairyAu/FairyGrabBossModel.cs | 2
System/WorldMap/WorldMapAreaBehaviour.cs | 11
System/BlastFurnace/PrayDrugCell.cs.meta | 12
System/MainInterfacePanel/FunctionForecastTip.cs | 1
System/Chat/ChatCenter.cs | 36
System/HappyXB/RuneXBWin.cs | 2
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA321_tagMCPrayElixirResult.cs.meta | 12
System/Team/TeamModel.cs | 36
System/BlastFurnace/PrayForDurgModel.cs | 180 +++++
System/BlastFurnace/PrayForDurgModel.cs.meta | 12
System/MainInterfacePanel/FeatureNoticeModel.cs | 245 +++++++
System/MainInterfacePanel/LowSettingTip.cs | 4
System/Store/StoreWin.cs | 29
Core/GameEngine/Model/Config/FunctionForecastConfig.cs | 15
System/BlastFurnace/LingDanTips.cs | 5
System/BlastFurnace/PrayforDrugGetItemWin.cs | 54 +
System/HappyXB/BestXBWin.cs | 2
System/Chat/ChatCtrl.cs | 34 +
System/Dungeon/DungeonModel.cs | 2
System/Chat/ChatWin.cs | 2
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA514_tagCMPrayElixir.cs | 16
System/Team/TeamData.cs | 7
System/DailyQuest/DailyQuestModel.cs | 57 -
System/MainInterfacePanel/FeatureNoticeWin.cs | 240 +++++++
System/WorldMap/WorldMapWin.cs | 6
System/MainInterfacePanel/FeaturesType2.cs | 8
System/FindPrecious/FindPreciousModel.cs | 39
System/FindPrecious/FindPreciousTimer.cs | 10
System/MainInterfacePanel/TaskListTip.cs | 15
System/WindowBase/ModelCenter.cs | 2
System/Rune/RuneModel.cs | 10
59 files changed, 1,478 insertions(+), 369 deletions(-)
diff --git a/Core/GameEngine/DataToCtl/PackageRegedit.cs b/Core/GameEngine/DataToCtl/PackageRegedit.cs
index dcc2338..fef4fc3 100644
--- a/Core/GameEngine/DataToCtl/PackageRegedit.cs
+++ b/Core/GameEngine/DataToCtl/PackageRegedit.cs
@@ -164,6 +164,7 @@
Register(typeof(HA309_tagMCEquipPartSuiteLVInfo), typeof(DTCA309_tagMCEquipPartSuiteLVInfo)); //寰楀埌濂楄鏁版嵁
Register(typeof(HA814_tagMCMakeItemAnswer), typeof(DTCA814_tagMCMakeItemAnswer)); //寰楀埌鍚堟垚缁撴灉鍥炲簲
Register(typeof(HA317_tagMCAllEquipAttrActiveInfo), typeof(DTCA317_tagMCAllEquipAttrActiveInfo)); //寰楀埌婵�娲诲叏韬槦绾у拰鍏ㄨ韩寮哄寲鐨勪俊鎭�
+ Register(typeof(HA321_tagMCPrayElixirResult), typeof(DTCA321_tagMCPrayElixirResult)); //绁堢涓硅嵂缁撴灉
#region 鑳屽寘
Register(typeof(H0724_tagRolePackCanUseCount), typeof(DTC0724_tagRolePackCanUseCount));
diff --git a/Core/GameEngine/Model/Config/FunctionForecastConfig.cs b/Core/GameEngine/Model/Config/FunctionForecastConfig.cs
index ba97f64..99ab8de 100644
--- a/Core/GameEngine/Model/Config/FunctionForecastConfig.cs
+++ b/Core/GameEngine/Model/Config/FunctionForecastConfig.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: 绗簩涓栫晫
-// [ Date ]: Tuesday, September 11, 2018
+// [ Date ]: Wednesday, September 12, 2018
//--------------------------------------------------------
using UnityEngine;
@@ -21,7 +21,10 @@
public string Icon { get ; private set; }
public string Content { get ; private set; }
public int DisplayLevel { get ; private set ; }
- public int Display { get ; private set ; }
+ public int Display { get ; private set ; }
+ public int RedPointLV { get ; private set ; }
+ public int RedPointPercentage { get ; private set ; }
+ public int FrameLevel { get ; private set ; }
public override string getKey()
{
@@ -51,7 +54,13 @@
DisplayLevel=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0;
- Display=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0;
+ Display=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0;
+
+ RedPointLV=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0;
+
+ RedPointPercentage=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0;
+
+ FrameLevel=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0;
}
catch (Exception ex)
{
diff --git a/Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta b/Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta
index 386c997..9f47e68 100644
--- a/Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta
+++ b/Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: bced258647f0fa940b752dd56e6a27e0
-timeCreated: 1536670750
+timeCreated: 1536737693
licenseType: Free
MonoImporter:
serializedVersion: 2
diff --git a/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA514_tagCMPrayElixir.cs b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA514_tagCMPrayElixir.cs
new file mode 100644
index 0000000..e47c730
--- /dev/null
+++ b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA514_tagCMPrayElixir.cs
@@ -0,0 +1,16 @@
+using UnityEngine;
+using System.Collections;
+
+// A5 14 祈福丹药 #tagCMPrayElixir
+
+public class CA514_tagCMPrayElixir : GameNetPackBasic {
+
+ public CA514_tagCMPrayElixir () {
+ combineCmd = (ushort)0x03FE;
+ _cmd = (ushort)0xA514;
+ }
+
+ public override void WriteToBytes () {
+ }
+
+}
diff --git a/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA514_tagCMPrayElixir.cs.meta b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA514_tagCMPrayElixir.cs.meta
new file mode 100644
index 0000000..af2ba62
--- /dev/null
+++ b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA514_tagCMPrayElixir.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5bde2875341bd7c49962b151d98e4195
+timeCreated: 1536719781
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA321_tagMCPrayElixirResult.cs b/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA321_tagMCPrayElixirResult.cs
new file mode 100644
index 0000000..6c55840
--- /dev/null
+++ b/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA321_tagMCPrayElixirResult.cs
@@ -0,0 +1,21 @@
+using UnityEngine;
+using System.Collections;
+using Snxxz.UI;
+// A3 21 祈福丹药结果 #tagMCPrayElixirResult
+
+
+
+public class DTCA321_tagMCPrayElixirResult : DtcBasic {
+
+ PrayForDurgModel prayModel { get { return ModelCenter.Instance.GetModel<PrayForDurgModel>(); } }
+
+ public override void Done(GameNetPackBasic vNetPack) {
+
+ base.Done(vNetPack);
+
+ HA321_tagMCPrayElixirResult vNetData = vNetPack as HA321_tagMCPrayElixirResult;
+ prayModel.SetPrayResult(vNetData);
+ }
+
+}
+
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA321_tagMCPrayElixirResult.cs.meta b/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA321_tagMCPrayElixirResult.cs.meta
new file mode 100644
index 0000000..16ba390
--- /dev/null
+++ b/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA321_tagMCPrayElixirResult.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0388f4972c8e8d84c93f7797c0ce87a2
+timeCreated: 1536719781
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/ServerPack/HA3_Function/HA321_tagMCPrayElixirResult.cs b/Core/NetworkPackage/ServerPack/HA3_Function/HA321_tagMCPrayElixirResult.cs
new file mode 100644
index 0000000..e2e6d65
--- /dev/null
+++ b/Core/NetworkPackage/ServerPack/HA3_Function/HA321_tagMCPrayElixirResult.cs
@@ -0,0 +1,19 @@
+using UnityEngine;
+using System.Collections;
+
+// A3 21 祈福丹药结果 #tagMCPrayElixirResult
+
+public class HA321_tagMCPrayElixirResult : GameNetPackBasic {
+ public uint ItemID; // 物品ID
+ public byte PrayCnt; // 今日祈福次数
+
+ public HA321_tagMCPrayElixirResult () {
+ _cmd = (ushort)0xA321;
+ }
+
+ public override void ReadFromBytes (byte[] vBytes) {
+ TransBytes (out ItemID, vBytes, NetDataType.DWORD);
+ TransBytes (out PrayCnt, vBytes, NetDataType.BYTE);
+ }
+
+}
diff --git a/Core/NetworkPackage/ServerPack/HA3_Function/HA321_tagMCPrayElixirResult.cs.meta b/Core/NetworkPackage/ServerPack/HA3_Function/HA321_tagMCPrayElixirResult.cs.meta
new file mode 100644
index 0000000..ef301a1
--- /dev/null
+++ b/Core/NetworkPackage/ServerPack/HA3_Function/HA321_tagMCPrayElixirResult.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 047cdded69879da4181bd2c1bbd0e426
+timeCreated: 1536719781
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Fight/MapTransferUtility.cs b/Fight/MapTransferUtility.cs
index bec6394..1352753 100644
--- a/Fight/MapTransferUtility.cs
+++ b/Fight/MapTransferUtility.cs
@@ -80,7 +80,7 @@
if (mapID != PlayerDatas.Instance.baseData.MapID)
{
- if (_model.IsMapUnLocked(mapID) == false)
+ if (_model.IsMapUnlocked(mapID) == false)
{
SysNotifyMgr.Instance.ShowTip("Map_Delivery");
return;
@@ -408,7 +408,7 @@
}
// 鍒ゆ柇鍦板浘鏄惁瑙i攣
- if (_model.IsMapUnLocked(_npcLocation.mapId) == false)
+ if (_model.IsMapUnlocked(_npcLocation.mapId) == false)
{
SysNotifyMgr.Instance.ShowTip("Map_Delivery");
return;
@@ -642,7 +642,7 @@
return;
}
- if (_model.IsMapUnLocked(npcLocation.mapId) == false)
+ if (_model.IsMapUnlocked(npcLocation.mapId) == false)
{
SysNotifyMgr.Instance.ShowTip("Map_Delivery");
return;
@@ -722,7 +722,7 @@
MapModel _model = ModelCenter.Instance.GetModel<MapModel>();
- if (_model.IsMapUnLocked(mapID) == false)
+ if (_model.IsMapUnlocked(mapID) == false)
{
SysNotifyMgr.Instance.ShowTip("Map_Delivery");
return;
@@ -747,7 +747,7 @@
public static bool Send_WorldTransfer(int mapId, Vector3 position, MapTransferType type, byte lineID = 255, int _npcId = 0)
{
- if (!AssetSource.sceneFromEditor && VersionConfig.Get().assetAccess != InstalledAsset.IngoreDownLoad && !AssetVersionUtility.unPriorAssetDownLoadDone)
+ if (!AssetSource.sceneFromEditor && !AssetVersionUtility.IsUnpriorAssetDownLoadOk())
{
var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(mapId, 0);
var assetVersion = AssetVersionUtility.GetAssetVersion(StringUtility.Contact("maps/", mapResConfig.MapResources.ToLower()));
diff --git a/Fight/Stage/Dungeon/MapTransfer.cs b/Fight/Stage/Dungeon/MapTransfer.cs
index 575faf7..be66351 100644
--- a/Fight/Stage/Dungeon/MapTransfer.cs
+++ b/Fight/Stage/Dungeon/MapTransfer.cs
@@ -73,7 +73,7 @@
if (transportModel.TransportType == 1)
{
- if (_model.IsMapUnLocked(transportModel.TargetMapID))
+ if (_model.IsMapUnlocked(transportModel.TargetMapID))
{
C0807_tagCChangeMap _proto = new C0807_tagCChangeMap();
_proto.TransportID = TransportID;
diff --git a/System/AssetVersion/AssetVersionUtility.cs b/System/AssetVersion/AssetVersionUtility.cs
index 116bfbb..4164c18 100644
--- a/System/AssetVersion/AssetVersionUtility.cs
+++ b/System/AssetVersion/AssetVersionUtility.cs
@@ -185,4 +185,15 @@
return path;
}
+ public static bool IsUnpriorAssetDownLoadOk()
+ {
+ if (VersionConfig.Get().assetAccess == InstalledAsset.IngoreDownLoad)
+ {
+ return true;
+ }
+
+ return unPriorAssetDownLoadDone;
+ }
+
+
}
diff --git a/System/BlastFurnace/LingDanTips.cs b/System/BlastFurnace/LingDanTips.cs
index 6bd330d..fb989e3 100644
--- a/System/BlastFurnace/LingDanTips.cs
+++ b/System/BlastFurnace/LingDanTips.cs
@@ -49,6 +49,7 @@
[SerializeField]
private Button _makeDanBtn;
+ [SerializeField] Button prayDurgBtn;
[SerializeField] FurnaceFireChooseWin ChooseWin;
[SerializeField] UIEffect bgEffect;
@@ -95,6 +96,10 @@
_danDrugCtrl.lockType = EnhanceLockType.KeepVertical;
_toggleGroup = _danDrugCtrl.GetComponent<ToggleGroup>();
_makeDanBtn.onClick.AddListener(OnClickMakeDan);
+ prayDurgBtn.AddListener(()=>
+ {
+ WindowCenter.Instance.Open<PrayforDrugWin>();
+ });
FurnaceModel.RefreshStoveModelEvent += RefreshStoveModel;
FurnaceModel.RefreshAddSpecMatEvent += SetSpecMatItemCell;
_randomLineCtrl.OnRefreshCell += RefreshRandomLineCell;
diff --git a/System/BlastFurnace/PrayDrugCell.cs b/System/BlastFurnace/PrayDrugCell.cs
new file mode 100644
index 0000000..4676b4f
--- /dev/null
+++ b/System/BlastFurnace/PrayDrugCell.cs
@@ -0,0 +1,55 @@
+锘縰sing UnityEngine;
+using UnityEngine.UI;
+using EnhancedUI.EnhancedScroller;
+using TableConfig;
+
+namespace Snxxz.UI
+{
+ public class PrayDrugCell : MonoBehaviour
+ {
+ [SerializeField] CommonItemBaisc itemBaisc;
+ [SerializeField] UIEffect effect;
+
+ ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
+ PrayForDurgModel prayModel { get { return ModelCenter.Instance.GetModel<PrayForDurgModel>(); } }
+
+ public void SetDisplayModel(int itemId)
+ {
+ ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(itemId);
+ if(itemConfig == null)
+ {
+ itemBaisc.gameObject.SetActive(false);
+ if(effect.IsPlaying)
+ {
+ effect.Stop();
+ }
+ }
+ else
+ {
+ int effectId = prayModel.GetEffectIdById(itemId);
+ if(effectId != 0)
+ {
+ effect.effect = effectId;
+ effect.Play();
+ }
+ else
+ {
+ if(effect.IsPlaying)
+ {
+ effect.Stop();
+ }
+ }
+
+ itemBaisc.gameObject.SetActive(true);
+ ItemCellModel cellModel = new ItemCellModel(itemId,false,0,1);
+ itemBaisc.Init(cellModel);
+ itemBaisc.cellBtn.RemoveAllListeners();
+ itemBaisc.cellBtn.AddListener(()=>
+ {
+ ItemAttrData attrData = new ItemAttrData(itemId,false,0,-1,1);
+ tipsModel.SetItemTipsModel(attrData);
+ });
+ }
+ }
+ }
+}
diff --git a/System/BlastFurnace/PrayDrugCell.cs.meta b/System/BlastFurnace/PrayDrugCell.cs.meta
new file mode 100644
index 0000000..3733141
--- /dev/null
+++ b/System/BlastFurnace/PrayDrugCell.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cf5babd996559ba41b01936b0a94c660
+timeCreated: 1536667518
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/BlastFurnace/PrayForDurgModel.cs b/System/BlastFurnace/PrayForDurgModel.cs
new file mode 100644
index 0000000..b6e614b
--- /dev/null
+++ b/System/BlastFurnace/PrayForDurgModel.cs
@@ -0,0 +1,180 @@
+锘縰sing LitJson;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using TableConfig;
+
+namespace Snxxz.UI
+{
+ public class PrayForDurgModel : Model,IBeforePlayerDataInitialize,IAfterPlayerDataInitialize,IPlayerLoginOk
+ {
+ BlastFurnaceModel blastModel { get { return ModelCenter.Instance.GetModel<BlastFurnaceModel>(); } }
+ PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
+ Dictionary<int, int> prayDrugDict = new Dictionary<int, int>(); //涓硅嵂id 鐗规晥id
+
+ public override void Init()
+ {
+ SetPrayDrugCondi();
+ SetPrayDrugDict();
+ }
+
+ public override void UnInit()
+ {
+
+ }
+
+ public void OnBeforePlayerDataInitialize()
+ {
+ PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= RefreshPlayeLv;
+ FuncOpen.Instance.OnFuncStateChangeEvent -= UpdateFuncState;
+ }
+
+ public void OnAfterPlayerDataInitialize()
+ {
+
+ }
+
+ public void OnPlayerLoginOk()
+ {
+ PlayerDatas.Instance.PlayerDataRefreshInfoEvent += RefreshPlayeLv;
+ FuncOpen.Instance.OnFuncStateChangeEvent += UpdateFuncState;
+ UpdatePrayDanRedpoint();
+ }
+
+ private void UpdateFuncState(int funcId)
+ {
+ if (funcId != (int)FuncOpenEnum.BlastFurnace) return;
+
+ UpdatePrayDanRedpoint();
+ }
+
+ private void RefreshPlayeLv(PlayerDataRefresh type)
+ {
+ if (type != PlayerDataRefresh.LV) return;
+
+ UpdatePrayDanRedpoint();
+ }
+
+ #region 璇诲彇鏈湴閰嶇疆
+ public int costMoney { get; private set; }
+ public int everyDayNum { get; private set; }
+ public int prayPushLv { get; private set;}
+
+ private void SetPrayDrugCondi()
+ {
+ FuncConfigConfig func = Config.Instance.Get<FuncConfigConfig>("GodAlchemy");
+ costMoney = int.Parse(func.Numerical2);
+ everyDayNum = int.Parse(func.Numerical3);
+ func = Config.Instance.Get<FuncConfigConfig>("GodAlchemyShow");
+ prayPushLv = int.Parse(func.Numerical2);
+ }
+ /// <summary>
+ /// 寰楀埌鎵�鏈夌姹備腹鑽暟鎹�
+ /// </summary>
+ private Dictionary<int, int> SetPrayDrugDict()
+ {
+ FuncConfigConfig funcConfig = Config.Instance.Get<FuncConfigConfig>("GodAlchemyShow");
+ JsonData jsonData = JsonMapper.ToObject(funcConfig.Numerical1);
+ prayDrugDict.Clear();
+ if (jsonData.IsArray)
+ {
+ for (int i = 0; i < jsonData.Count; i++)
+ {
+ if (jsonData[i].IsArray)
+ {
+ int itemId = int.Parse(jsonData[i][0].ToString());
+ if (jsonData[i].Count > 1)
+ {
+ int effectId = int.Parse(jsonData[i][1].ToString());
+ prayDrugDict.Add(itemId, effectId);
+ }
+ else
+ {
+ prayDrugDict.Add(itemId, 0);
+ }
+ }
+ }
+ }
+ return prayDrugDict;
+ }
+ #endregion
+
+ #region 鍗忚
+ public int itemId { get; private set; }
+ public int alreadyPrayNum { get; private set;}
+ public event Action RefreshPrayEvent;
+ public void SetPrayResult(HA321_tagMCPrayElixirResult elixirResult)
+ {
+ itemId = (int)elixirResult.ItemID;
+ alreadyPrayNum = elixirResult.PrayCnt;
+ if(itemId != 0)
+ {
+ WindowCenter.Instance.Open<PrayforDrugGetItemWin>();
+ }
+ UpdatePrayDanRedpoint();
+ if(RefreshPrayEvent != null)
+ {
+ RefreshPrayEvent();
+ }
+ }
+
+ public void SendPrayElixir()
+ {
+ CA514_tagCMPrayElixir prayElixir = new CA514_tagCMPrayElixir();
+ GameNetSystem.Instance.SendInfo(prayElixir);
+ }
+ #endregion
+
+ List<int> prayIdlist = new List<int>();
+ public List<int> GetPrayDruglist()
+ {
+ prayIdlist.Clear();
+ List<AlchemyConfig> configs = blastModel.alchemyModellist;
+ foreach(var key in prayDrugDict.Keys)
+ {
+ for (int i = 0; i < configs.Count; i++)
+ {
+ if (blastModel.StoveLV >= configs[i].BlastFurnaceLV)
+ {
+ List<int> idlist = blastModel.GetPreviewMakeDruglist(configs[i]).Keys.ToList();
+ if(idlist.Contains(key))
+ {
+ AttrFruitConfig fruitConfig = Config.Instance.Get<AttrFruitConfig>(key);
+ if (!playerPack.IsReachMaxUseDrug(fruitConfig))
+ {
+ prayIdlist.Add(key);
+ }
+ break;
+ }
+ }
+ }
+ }
+ return prayIdlist;
+ }
+
+ public int GetEffectIdById(int drugId)
+ {
+ int effectId = 0;
+ prayDrugDict.TryGetValue(drugId,out effectId);
+ return effectId;
+ }
+
+ #region 绾㈢偣
+ public const int PRAYDRUGREDPOINT_KEY = 110011001;
+ private Redpoint prayRedpoint = new Redpoint(BlastFurnaceModel.LINGDANREDPOINT_KEY, PRAYDRUGREDPOINT_KEY);
+ public void UpdatePrayDanRedpoint()
+ {
+ if (PlayerDatas.Instance.baseData.LV < prayPushLv
+ || !FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace)
+ || alreadyPrayNum >= everyDayNum)
+ {
+ prayRedpoint.state = RedPointState.None;
+ return;
+ }
+
+ prayRedpoint.state = RedPointState.Simple;
+ }
+
+ #endregion
+ }
+}
diff --git a/System/BlastFurnace/PrayForDurgModel.cs.meta b/System/BlastFurnace/PrayForDurgModel.cs.meta
new file mode 100644
index 0000000..984db45
--- /dev/null
+++ b/System/BlastFurnace/PrayForDurgModel.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9daef4307100edf43a11679d8c407d48
+timeCreated: 1536671165
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/BlastFurnace/PrayforDrugGetItemWin.cs b/System/BlastFurnace/PrayforDrugGetItemWin.cs
new file mode 100644
index 0000000..797ca40
--- /dev/null
+++ b/System/BlastFurnace/PrayforDrugGetItemWin.cs
@@ -0,0 +1,54 @@
+锘縰sing UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI
+{
+ public class PrayforDrugGetItemWin : Window
+ {
+ [SerializeField] Button sureBtn;
+ [SerializeField] CommonItemBaisc itemBaisc;
+ PrayForDurgModel prayModel { get { return ModelCenter.Instance.GetModel<PrayForDurgModel>(); } }
+ ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
+
+ protected override void BindController()
+ {
+
+ }
+
+ protected override void AddListeners()
+ {
+ sureBtn.AddListener(CloseClick);
+ }
+
+ protected override void OnPreOpen()
+ {
+ SetDisplayUI();
+ }
+ protected override void OnAfterOpen()
+ {
+
+ }
+
+ protected override void OnPreClose()
+ {
+
+ }
+
+ protected override void OnAfterClose()
+ {
+
+ }
+
+ private void SetDisplayUI()
+ {
+ ItemCellModel cellModel = new ItemCellModel(prayModel.itemId,false,1,1);
+ itemBaisc.Init(cellModel);
+ itemBaisc.cellBtn.RemoveAllListeners();
+ itemBaisc.cellBtn.AddListener(()=>
+ {
+ ItemAttrData attrData = new ItemAttrData(prayModel.itemId,false,1,-1,1);
+ tipsModel.SetItemTipsModel(attrData);
+ });
+ }
+ }
+}
diff --git a/System/BlastFurnace/PrayforDrugGetItemWin.cs.meta b/System/BlastFurnace/PrayforDrugGetItemWin.cs.meta
new file mode 100644
index 0000000..686b188
--- /dev/null
+++ b/System/BlastFurnace/PrayforDrugGetItemWin.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2ce8b7c45f5b3964191f025f929f0399
+timeCreated: 1536720996
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/BlastFurnace/PrayforDrugWin.cs b/System/BlastFurnace/PrayforDrugWin.cs
new file mode 100644
index 0000000..6cc1add
--- /dev/null
+++ b/System/BlastFurnace/PrayforDrugWin.cs
@@ -0,0 +1,132 @@
+锘縰sing System;
+using UnityEngine;
+using UnityEngine.UI;
+using System.Collections.Generic;
+
+namespace Snxxz.UI
+{
+ public class PrayforDrugWin : Window
+ {
+ [SerializeField] ScrollerController ctrl;
+ [SerializeField] Button prayBtn;
+ [SerializeField] Image prayBtnImg;
+ [SerializeField] Text costText;
+ [SerializeField] Button closeBtn;
+ [Header("鏈�澶ф牸瀛愭暟")]
+ [SerializeField] int gridCount = 100;
+ [Header("姣忚鏁伴噺")]
+ [SerializeField] int columnCout = 5;
+
+ PrayForDurgModel PrayModel { get { return ModelCenter.Instance.GetModel<PrayForDurgModel>(); } }
+ List<int> praylist;
+
+ protected override void BindController()
+ {
+ ctrl.OnRefreshCell += RefreshPrayDrug;
+ }
+
+ protected override void AddListeners()
+ {
+ closeBtn.AddListener(CloseClick);
+
+ }
+
+ protected override void OnPreOpen()
+ {
+ praylist = PrayModel.GetPrayDruglist();
+ PrayModel.RefreshPrayEvent += UpdatePrayBtn;
+ UpdatePrayPack();
+ SetDisplayUI();
+ }
+
+ protected override void OnAfterOpen()
+ {
+
+ }
+
+ protected override void OnPreClose()
+ {
+ PrayModel.RefreshPrayEvent -= UpdatePrayBtn;
+ }
+
+ protected override void OnAfterClose()
+ {
+
+ }
+
+ private void SetDisplayUI()
+ {
+ costText.text = PrayModel.costMoney.ToString();
+ UpdatePrayBtn();
+ }
+
+ private void UpdatePrayBtn()
+ {
+ prayBtn.RemoveAllListeners();
+ if (PrayModel.alreadyPrayNum >= PrayModel.everyDayNum)
+ {
+ prayBtnImg.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
+ }
+ else
+ {
+ prayBtn.AddListener(ClickPrayBtn);
+ prayBtnImg.material = MaterialUtility.GetUIDefaultGraphicMaterial();
+ }
+ }
+
+ private void ClickPrayBtn()
+ {
+ if(PrayModel.alreadyPrayNum >= PrayModel.everyDayNum)
+ {
+ return;
+ }
+
+ if(UIHelper.GetMoneyCnt(1) >= (ulong)PrayModel.costMoney)
+ {
+ PrayModel.SendPrayElixir();
+ }
+ else
+ {
+ WindowCenter.Instance.Open<RechargeTipWin>();
+ }
+ }
+
+ private void UpdatePrayPack()
+ {
+ if (ctrl.GetNumberOfCells(ctrl.m_Scorller) == 0)
+ {
+ ctrl.Refresh();
+ var _line = gridCount / columnCout;
+ for (int i = 0; i < _line; i++)
+ {
+ ctrl.AddCell(ScrollerDataType.Header, i);
+ }
+ ctrl.Restart();
+ }
+ else
+ {
+ ctrl.m_Scorller.RefreshActiveCellViews();
+ }
+ }
+
+ private void RefreshPrayDrug(ScrollerDataType type, CellView cell)
+ {
+ var _line = cell.index;
+ int length = cell.transform.childCount;
+ for (int i = 0; i < length; i++)
+ {
+ var _index = _line * length + i;
+ PrayDrugCell prayCell = cell.transform.GetChild(i).GetComponent<PrayDrugCell>();
+ if(_index < praylist.Count)
+ {
+ prayCell.SetDisplayModel(praylist[_index]);
+ }
+ else
+ {
+ prayCell.SetDisplayModel(0);
+ }
+
+ }
+ }
+ }
+}
diff --git a/System/BlastFurnace/PrayforDrugWin.cs.meta b/System/BlastFurnace/PrayforDrugWin.cs.meta
new file mode 100644
index 0000000..5b1ea68
--- /dev/null
+++ b/System/BlastFurnace/PrayforDrugWin.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e78dc3625a4636348b8ef7501bdb51a2
+timeCreated: 1536667028
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/Chat/ChatCenter.cs b/System/Chat/ChatCenter.cs
index ac1ecd0..05adb6c 100644
--- a/System/Chat/ChatCenter.cs
+++ b/System/Chat/ChatCenter.cs
@@ -148,7 +148,6 @@
m_VoiceChatDict.Clear();
autoPlayVoices.Clear();
voicePlaying = false;
- netState = 0;
}
public void OnSwitchAccount()
@@ -346,12 +345,6 @@
}
var bytes = Convert.FromBase64String(speech.content);
SaveSpeech(_player, tick, bytes);
- if (autoPlayVoices.Count > 0
- && autoPlayVoices[0].playerId == _player
- && autoPlayVoices[0].tick == tick)
- {
- AutoPlayVoice();
- }
}
catch (Exception e)
{
@@ -404,12 +397,20 @@
dict = new Dictionary<long, AudioClip>();
speechDict.Add(_decodec.playerId, dict);
}
+ if (dict.ContainsKey(_decodec.tick))
+ {
+ return;
+ }
var clip = AudioClip.Create("Sound", _decodec.samples.Length, 1, VoiceSettings.frequency, false);
clip.SetData(_decodec.samples, 0);
dict.Add(_decodec.tick, clip);
if (_decodec.playerId == cachePlayerId && cacheTick == _decodec.tick)
{
PlaySpeech(clip, cacheLength);
+ }
+ else if (autoPlayVoices.Count > 0)
+ {
+ AutoPlayVoice();
}
if (speechDownloadSuccess != null)
{
@@ -520,12 +521,9 @@
return ChatInfoType.World;
}
- int netState = 0;
-
private void OnNetStatusChanged(NetworkReachability _state)
{
- netState = (int)_state;
- if (netState != 1 && netState != 4)
+ if ((int)SDKUtility.Instance.NetworkType == 0)
{
autoPlayVoices.Clear();
}
@@ -536,9 +534,9 @@
public void CheckAutoPlayVoice(ChatData _chat)
{
- var _netState = netState;
+ var netType = (int)SDKUtility.Instance.NetworkType;
#if UNITY_EDITOR
- _netState = 1;
+ netType = 2;
#endif
if (!serverInited)
{
@@ -557,7 +555,7 @@
{
return;
}
- if (!ChatSetting.Instance.GetAutoPlayVoice(_chat.type, _netState))
+ if (!ChatSetting.Instance.GetAutoPlayVoice(_chat.type, netType))
{
return;
}
@@ -626,7 +624,7 @@
case ChatBoolType.GradVoice4G:
case ChatBoolType.GradVoiceWifi:
if (!ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.Fairy, 1)
- && !ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.Fairy, 4))
+ && !ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.Fairy, 2))
{
RemoveAutoVoice(ChatInfoType.Fairy);
}
@@ -634,7 +632,7 @@
case ChatBoolType.PrivatChatVoice4G:
case ChatBoolType.PrivateChatVoiceWifi:
if (!ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.Friend, 1)
- && !ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.Friend, 4))
+ && !ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.Friend, 2))
{
RemoveAutoVoice(ChatInfoType.Friend);
}
@@ -642,7 +640,7 @@
case ChatBoolType.TeamVoice4G:
case ChatBoolType.TeamVoiceWifi:
if (!ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.Team, 1)
- && !ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.Team, 4))
+ && !ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.Team, 2))
{
RemoveAutoVoice(ChatInfoType.Team);
}
@@ -650,7 +648,7 @@
case ChatBoolType.WorldVoice4G:
case ChatBoolType.WorldVoiceWifi:
if (!ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.World, 1)
- && !ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.World, 4))
+ && !ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.World, 2))
{
RemoveAutoVoice(ChatInfoType.World);
}
@@ -658,7 +656,7 @@
case ChatBoolType.AreaVoiceWifi:
case ChatBoolType.AreaVoice4G:
if (!ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.Area, 1)
- && !ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.Area, 4))
+ && !ChatSetting.Instance.GetAutoPlayVoice(ChatInfoType.Area, 2))
{
RemoveAutoVoice(ChatInfoType.Area);
}
diff --git a/System/Chat/ChatCtrl.cs b/System/Chat/ChatCtrl.cs
index a382bfd..982cd01 100644
--- a/System/Chat/ChatCtrl.cs
+++ b/System/Chat/ChatCtrl.cs
@@ -290,6 +290,8 @@
chatPack.Len = (ushort)GetUTF8InfoLen(msg);
chatPack.Content = msg;
GameNetSystem.Instance.SendInfo(chatPack);
+
+ CheckSendAssitChat(msg);
}
break;
case ChatInfoType.Area:
@@ -329,6 +331,8 @@
chatPack.Len = (ushort)GetUTF8InfoLen(msg);
chatPack.Content = msg;
GameNetSystem.Instance.SendInfo(chatPack);
+
+ CheckSendAssitChat(msg);
}
break;
case ChatInfoType.Trumpet:
@@ -442,6 +446,10 @@
{
OnRefreshSelf(chatData);
}
+ }
+ if (chatData.IsSound)
+ {
+ chatCenter.CheckAutoPlayVoice(chatData);
}
}
private void AddPteChat(ChatFriendData chatData)
@@ -905,6 +913,32 @@
}
return string.Empty;
}
+
+ public bool needCheckAssitChat { get; set; }
+ void CheckSendAssitChat(string message)
+ {
+ if (needCheckAssitChat)
+ {
+ bool requestTeam = false;
+ for (int i = 0; i < 2; i++)
+ {
+ if (message.Equals(Language.Get(realmRandomChats[i])))
+ {
+ requestTeam = true;
+ break;
+ }
+ if (message.Equals(Language.Get(dungeonRandomChats[i])))
+ {
+ requestTeam = true;
+ break;
+ }
+ }
+ if (requestTeam)
+ {
+ teamModel.RequestAssistAutoMatch();
+ }
+ }
+ }
#endregion
#region 瀹濈煶鐐��璺宠浆
diff --git a/System/Chat/ChatWin.cs b/System/Chat/ChatWin.cs
index 1881b8c..b250bc7 100644
--- a/System/Chat/ChatWin.cs
+++ b/System/Chat/ChatWin.cs
@@ -60,6 +60,7 @@
if (ChatCtrl.Inst.openFromDaily)
{
AssitRandomChat();
+ ChatCtrl.Inst.needCheckAssitChat = true;
}
else if (ChatCtrl.Inst.openFromGem)
{
@@ -75,6 +76,7 @@
ChatCtrl.Inst.OpenPteChatEvent -= OpenPteChatEvent;
ChatCtrl.Inst.openFromDaily = false;
ChatCtrl.Inst.openFromGem = false;
+ ChatCtrl.Inst.needCheckAssitChat = false;
chatCenter.ChangeChatValue(string.Empty, false, true);
}
diff --git a/System/DailyQuest/DailyQuestModel.cs b/System/DailyQuest/DailyQuestModel.cs
index b825ade..9748735 100644
--- a/System/DailyQuest/DailyQuestModel.cs
+++ b/System/DailyQuest/DailyQuestModel.cs
@@ -30,31 +30,26 @@
public Redpoint trialExchangeRedpoint = new Redpoint(EVERYDAY_REDPOINTID, TRIALEXCHANGE_REDPOINTID);
int m_DailyQuestTotalActiveValue = 150;
- public int dailyQuestTotalActiveValue
- {
+ public int dailyQuestTotalActiveValue {
get { return m_DailyQuestTotalActiveValue; }
}
int m_CurrentDailyQuest = 0;
- public int currentDailyQuest
- {
+ public int currentDailyQuest {
get { return this.m_CurrentDailyQuest; }
set { this.m_CurrentDailyQuest = value; }
}
int m_CurrentRewardStageIndex = 0;
- public int currentRewardStageIndex
- {
+ public int currentRewardStageIndex {
get { return m_CurrentRewardStageIndex; }
private set { m_CurrentRewardStageIndex = value; }
}
int m_TotalActiveValue = 0;
- public int totalActiveValue
- {
+ public int totalActiveValue {
get { return m_TotalActiveValue; }
- private set
- {
+ private set {
if (m_TotalActiveValue != value)
{
m_TotalActiveValue = value;
@@ -68,11 +63,9 @@
}
int m_GotableRealmPoint;
- public int gotableRealmPoint
- {
+ public int gotableRealmPoint {
get { return m_GotableRealmPoint; }
- private set
- {
+ private set {
if (m_GotableRealmPoint != value)
{
m_GotableRealmPoint = value;
@@ -210,29 +203,26 @@
return false;
}
- public bool TestDailyQuestUnLock(int _dailyQuestId)
+ public bool IsDailyQuestUnLock(int _dailyQuestId)
{
+ var config = Config.Instance.Get<DailyQuestConfig>(_dailyQuestId);
+ var unlockFunctionId = config.UnLockFuncID;
+ var defaultUnlock = unlockFunctionId == 0 || FuncOpen.Instance.IsFuncOpen(unlockFunctionId);
+
switch ((DailyQuestType)_dailyQuestId)
{
case DailyQuestType.FairyFeast:
case DailyQuestType.FairyTask:
case DailyQuestType.FairyGrabBoss:
- var _dailyConfig = Config.Instance.Get<DailyQuestConfig>(_dailyQuestId);
- return PlayerDatas.Instance.baseData.Family > 0 &&
- (_dailyConfig.UnLockFuncID == 0 || FuncOpen.Instance.IsFuncOpen(_dailyConfig.UnLockFuncID));
+ return defaultUnlock && PlayerDatas.Instance.baseData.Family > 0;
case DailyQuestType.RuneTowerSweep:
return ModelCenter.Instance.GetModel<RuneTowerModel>().yesterdayPassFloor > 0;
case DailyQuestType.GuardSky:
- var _dailyGuardSkyConfig = Config.Instance.Get<DailyQuestConfig>(_dailyQuestId);
- bool _isGuardSkyOpen = _dailyGuardSkyConfig.UnLockFuncID == 0 || FuncOpen.Instance.IsFuncOpen(_dailyGuardSkyConfig.UnLockFuncID);
- return fairyModel.SatisfyGuardSkyFairyLv() && _isGuardSkyOpen;
+ return defaultUnlock && fairyModel.SatisfyGuardSkyFairyLv();
case DailyQuestType.FairyLeague:
- var _dailyFairyLeagueConfig = Config.Instance.Get<DailyQuestConfig>(_dailyQuestId);
- bool _isFairyLeagueOpen = _dailyFairyLeagueConfig.UnLockFuncID == 0 || FuncOpen.Instance.IsFuncOpen(_dailyFairyLeagueConfig.UnLockFuncID);
- return fairyModel.SatisfyOpenFairyLeagueLv() && _isFairyLeagueOpen;
+ return defaultUnlock && fairyModel.SatisfyOpenFairyLeagueLv();
default:
- var dailyConfig = Config.Instance.Get<DailyQuestConfig>(_dailyQuestId);
- return dailyConfig.UnLockFuncID == 0 || FuncOpen.Instance.IsFuncOpen(dailyConfig.UnLockFuncID);
+ return defaultUnlock;
}
}
@@ -267,14 +257,7 @@
case 16:
return ModelCenter.Instance.GetModel<VipModel>().GetVipPrivilegeCnt(VipPrivilegeType.BossHomeAwardLimit);
default:
- if (dailyQuestOpenTime.DayReKind > 0)
- {
- return dailyQuestOpenTime.DayTimes;
- }
- else
- {
- return dailyQuestOpenTime.WeekTimes;
- }
+ return dailyQuestOpenTime.DayReKind > 0 ? dailyQuestOpenTime.DayTimes : dailyQuestOpenTime.WeekTimes;
}
}
else
@@ -705,8 +688,8 @@
private int TimeLimitQuestCompare(int _lhs, int _rhs)
{
- var unLock1 = TestDailyQuestUnLock(_lhs);
- var unLock2 = TestDailyQuestUnLock(_rhs);
+ var unLock1 = IsDailyQuestUnLock(_lhs);
+ var unLock2 = IsDailyQuestUnLock(_rhs);
if (unLock1 && !unLock2)
{
@@ -794,7 +777,7 @@
public DailyQuestState GetQuestState(int _dailyQuestId)
{
- var isUnLocked = TestDailyQuestUnLock(_dailyQuestId);
+ var isUnLocked = IsDailyQuestUnLock(_dailyQuestId);
if (!isUnLocked)
{
return DailyQuestState.Locked;
diff --git a/System/Dogz/DogzItemCell.cs b/System/Dogz/DogzItemCell.cs
index 4b3e648..92e1ec5 100644
--- a/System/Dogz/DogzItemCell.cs
+++ b/System/Dogz/DogzItemCell.cs
@@ -15,7 +15,6 @@
{
dogzModel.GetDogzItemList();
ItemModel model = null;
- DebugEx.Log("Display:" + index + "鏁版嵁闀垮害锛�" + dogzModel.dogzItemList.Count);
if (index < dogzModel.dogzItemList.Count)
{
model = dogzModel.dogzItemList[index];
diff --git a/System/Dungeon/DungeonModel.cs b/System/Dungeon/DungeonModel.cs
index ae50e8f..a8ea790 100644
--- a/System/Dungeon/DungeonModel.cs
+++ b/System/Dungeon/DungeonModel.cs
@@ -1165,7 +1165,7 @@
public void RequestChallangeDungeon(int _dataMapId, int _lineId)
{
- if (!AssetSource.sceneFromEditor && VersionConfig.Get().assetAccess != InstalledAsset.IngoreDownLoad && !AssetVersionUtility.unPriorAssetDownLoadDone)
+ if (!AssetSource.sceneFromEditor && !AssetVersionUtility.IsUnpriorAssetDownLoadOk())
{
var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(_dataMapId, _lineId);
var assetVersion = AssetVersionUtility.GetAssetVersion(StringUtility.Contact("maps/", mapResConfig.MapResources.ToLower()));
diff --git a/System/FairyAu/FairyGrabBossModel.cs b/System/FairyAu/FairyGrabBossModel.cs
index 6188651..dbb484a 100644
--- a/System/FairyAu/FairyGrabBossModel.cs
+++ b/System/FairyAu/FairyGrabBossModel.cs
@@ -414,7 +414,7 @@
var config = Config.Instance.Get<BossInfoConfig>(bossId);
if (config != null)
{
- if (!mapModel.IsMapUnLocked(config.MapID))
+ if (!mapModel.IsMapUnlocked(config.MapID))
{
_error = 6;
return false;
diff --git a/System/FindPrecious/FindPreciousModel.cs b/System/FindPrecious/FindPreciousModel.cs
index a33a349..687ccad 100644
--- a/System/FindPrecious/FindPreciousModel.cs
+++ b/System/FindPrecious/FindPreciousModel.cs
@@ -14,8 +14,7 @@
Redpoint findPreciousRedpoint = new Redpoint(FINDPRECIOUS_REDPOINTID);
int m_ViewKillRecordsBoss = 0;
- public int ViewKillRecordsBoss
- {
+ public int ViewKillRecordsBoss {
get { return this.m_ViewKillRecordsBoss; }
set { this.m_ViewKillRecordsBoss = value; }
}
@@ -24,11 +23,9 @@
List<int> bossNotifies = new List<int>();
int m_CurrentBossNotify = 0;
- public int currentBossNotify
- {
+ public int currentBossNotify {
get { return m_CurrentBossNotify; }
- private set
- {
+ private set {
if (m_CurrentBossNotify != value)
{
m_CurrentBossNotify = value;
@@ -51,7 +48,6 @@
DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
DemonJarModel demonJarModel { get { return ModelCenter.Instance.GetModel<DemonJarModel>(); } }
-
WorldBossModel worldBossModel { get { return ModelCenter.Instance.GetModel<WorldBossModel>(); } }
BossHomeModel bossHomeModel { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } }
PersonalBossModel personalBossModel { get { return ModelCenter.Instance.GetModel<PersonalBossModel>(); } }
@@ -60,7 +56,6 @@
{
DTCA003_tagUniversalGameRecInfo.onGetUniversalGameInfo += OnPreciousDropRecordUpdate;
FindPreciousTimer.Instance.bossRebornNotifyEvent += OnBossRebornUpComing;
-
RedpointCenter.Instance.redpointValueChangeEvent += UpdateRedpoint;
}
@@ -68,7 +63,6 @@
{
DTCA003_tagUniversalGameRecInfo.onGetUniversalGameInfo -= OnPreciousDropRecordUpdate;
FindPreciousTimer.Instance.bossRebornNotifyEvent -= OnBossRebornUpComing;
-
RedpointCenter.Instance.redpointValueChangeEvent -= UpdateRedpoint;
}
@@ -122,33 +116,23 @@
}
bossDropRecords.Clear();
- for (int i = 0; i < _serverInfo.Count; i++)
+ foreach (var item in _serverInfo.UniversalGameRec)
{
- var serverRecord = _serverInfo.UniversalGameRec[i];
- bossDropRecords.Add(new DropRecord(serverRecord));
+ bossDropRecords.Add(new DropRecord(item));
}
bossDropRecords.Sort(DropRecord.Compare);
if (bossDropRecords.Count > 5)
{
- var records1 = new List<DropRecord>();
- for (int i = 0; i < 5; i++)
- {
- records1.Add(bossDropRecords[i]);
- }
-
var records2 = new List<DropRecord>();
- for (int i = 5; i < bossDropRecords.Count; i++)
+ for (int i = bossDropRecords.Count - 1; i >= 5; i--)
{
records2.Add(bossDropRecords[i]);
+ bossDropRecords.RemoveAt(i);
}
records2.Sort(DropRecord.Compare2);
-
- bossDropRecords.Clear();
-
- bossDropRecords.AddRange(records1);
bossDropRecords.AddRange(records2);
}
@@ -399,9 +383,12 @@
_redpointId == BossHomeModel.BOSSHOME_REDPOINT ||
_redpointId == PersonalBossModel.PERSONAL_REDPOINTID)
{
- var count = worldBossModel.worldBossRedPoint.count + bossHomeModel.bossHomeRedpoint.count + personalBossModel.personalRedpoint.count;
- findPreciousRedpoint.state = count > 0 ? RedPointState.Quantity : RedPointState.None;
- findPreciousRedpoint.count = count;
+ var worldBossRedpointCount = worldBossModel.worldBossRedPoint.count;
+ var bossHomeRedpointCount = bossHomeModel.bossHomeRedpoint.count;
+ var personalBossRedpointCount = personalBossModel.personalRedpoint.count;
+ var totalCount = worldBossRedpointCount + bossHomeRedpointCount + personalBossRedpointCount;
+ findPreciousRedpoint.state = totalCount > 0 ? RedPointState.Quantity : RedPointState.None;
+ findPreciousRedpoint.count = totalCount;
}
}
diff --git a/System/FindPrecious/FindPreciousTimer.cs b/System/FindPrecious/FindPreciousTimer.cs
index 7286510..8626479 100644
--- a/System/FindPrecious/FindPreciousTimer.cs
+++ b/System/FindPrecious/FindPreciousTimer.cs
@@ -26,7 +26,6 @@
if (IsValidClockSetting(_rebornTime))
{
clocks[_npcId] = new BossRebornClock(_npcId, _rebornTime);
-
if (!bossIds.Contains(_npcId))
{
bossIds.Add(_npcId);
@@ -69,14 +68,7 @@
private bool IsValidClockSetting(DateTime _rebornTime)
{
- if ((_rebornTime - DateTime.Now).TotalSeconds < FindPreciousModel.PREPOSE_SECONDS)
- {
- return false;
- }
- else
- {
- return true;
- }
+ return (_rebornTime - DateTime.Now).TotalSeconds >= FindPreciousModel.PREPOSE_SECONDS;
}
public class BossRebornClock
diff --git a/System/FindPrecious/WorldBossModel.cs b/System/FindPrecious/WorldBossModel.cs
index 5d18c0a..1ef067b 100644
--- a/System/FindPrecious/WorldBossModel.cs
+++ b/System/FindPrecious/WorldBossModel.cs
@@ -87,7 +87,7 @@
var bossId = sortedBossIds[i];
var config = Config.Instance.Get<WorldBossConfig>(bossId);
var mapId = config.MapID;
- if (mapModel.IsMapUnLocked(mapId))
+ if (mapModel.IsMapUnlocked(mapId))
{
activedBossIds.Add(bossId);
}
@@ -156,7 +156,7 @@
public bool isUnLocked {
get {
var config = Config.Instance.Get<WorldBossConfig>(id);
- var mapUnLocked = mapModel.IsMapUnLocked(config.MapID);
+ var mapUnLocked = mapModel.IsMapUnlocked(config.MapID);
return mapUnLocked;
}
}
diff --git a/System/HappyXB/BestXBWin.cs b/System/HappyXB/BestXBWin.cs
index d5b8a3e..0fa3388 100644
--- a/System/HappyXB/BestXBWin.cs
+++ b/System/HappyXB/BestXBWin.cs
@@ -466,7 +466,7 @@
yield return new WaitForSeconds(xbSpeed1);
break;
case 9:
- if(cycle > 1 && remainIndex <= 4)
+ if(cycle > cycleTimes && remainIndex <= 4)
{
xbSpeed2 += XbA2 * 0.05f;
if (xbSpeed2 >= maxTimeInter)
diff --git a/System/HappyXB/RuneXBWin.cs b/System/HappyXB/RuneXBWin.cs
index 620716c..e25ab8e 100644
--- a/System/HappyXB/RuneXBWin.cs
+++ b/System/HappyXB/RuneXBWin.cs
@@ -475,7 +475,7 @@
yield return new WaitForSeconds(xbSpeed1);
break;
case 9:
- if (cycle > 1 && remainIndex <= 4)
+ if (cycle > cycleTimes && remainIndex <= 4)
{
xbSpeed2 += XbA2 * 0.05f;
if (xbSpeed2 >= maxTimeInter)
diff --git a/System/MainInterfacePanel/FeatureNoticeModel.cs b/System/MainInterfacePanel/FeatureNoticeModel.cs
new file mode 100644
index 0000000..cf812f4
--- /dev/null
+++ b/System/MainInterfacePanel/FeatureNoticeModel.cs
@@ -0,0 +1,245 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Wednesday, September 12, 2018
+//--------------------------------------------------------
+using UnityEngine;
+using System.Collections;
+using UnityEngine.UI;
+using TableConfig;
+using System.Collections.Generic;
+using System;
+using Snxxz.UI;
+
+//鍔熻兘棰勫憡绾㈢偣
+public class FeatureNoticeModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
+{
+ public List<FunctionForecastConfig> FunctionList = new List<FunctionForecastConfig>();
+ private const int Redpoint_key1 = 38;
+ public Redpoint redPointStre1 = new Redpoint(Redpoint_key1);
+ private int OpenFuncId = 0;
+ private bool RedPointChange = false;
+ private bool IsRedPoint = false;
+ public override void Init()
+ {
+ AddList();
+ }
+
+ public void OnBeforePlayerDataInitialize()
+ {
+
+ }
+
+ public void OnPlayerLoginOk()
+ {
+ RedDotStatus();
+ PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnPlayersUpLV;
+ FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
+ treasureModel.treasureStateChangeEvent -= treasureStateChangeEvent;
+ treasureModel.treasureStageUpEvent -= treasureStageUpEvent;
+ FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
+ PlayerDatas.Instance.PlayerDataRefreshInfoEvent += OnPlayersUpLV;
+ treasureModel.treasureStateChangeEvent += treasureStateChangeEvent;
+ treasureModel.treasureStageUpEvent += treasureStageUpEvent;
+ }
+
+
+
+ public override void UnInit()
+ {
+
+ }
+ private void treasureStageUpEvent(int obj)
+ {
+ RedDotStatus();
+ }
+
+ private void treasureStateChangeEvent(int obj)
+ {
+ RedDotStatus();
+ }
+
+ private void OnFuncStateChangeEvent(int obj)
+ {
+ RedDotStatus();
+ }
+
+ private void OnPlayersUpLV(PlayerDataRefresh obj)
+ {
+ if (obj == PlayerDataRefresh.LV)
+ {
+ RedDotStatus();
+ }
+ }
+ private void AddList()//娣诲姞鍒楄〃淇℃伅
+ {
+ if (FunctionList.Count <= 0)
+ {
+ var configs = Config.Instance.GetAllKeys<FunctionForecastConfig>();
+ foreach (var key in configs)
+ {
+ var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(key);
+ if (functionForecastConfig != null && functionForecastConfig.Display == 1)
+ {
+ FunctionList.Add(functionForecastConfig);
+ }
+ }
+ }
+ }
+
+ private void RedDotStatus()
+ {
+ for (int i = 0; i < FunctionList.Count; i++)
+ {
+ if (!FuncOpen.Instance.IsFuncOpen(FunctionList[i].FuncId))
+ {
+ redPointStre1.state = RedPointState.None;
+ if (OpenFuncId != FunctionList[i].FuncId)
+ {
+ RedPointChange = false;
+ }
+ if (OpenFuncId != FunctionList[i].FuncId || !RedPointChange)
+ {
+ IsRedPoint = false;
+ TrailerClassification(FunctionList[i].FuncId);
+ }
+ return;
+ }
+ }
+ }
+
+ private void TrailerClassification(int funcID)
+ {
+ FuncOpenLVConfig funcoPenConfig = Config.Instance.Get<FuncOpenLVConfig>(funcID);
+ var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(funcID);
+ if (funcoPenConfig.LimitMagicWeapon != 0 || funcoPenConfig.LimitMissionID != 0)
+ {
+ if (funcoPenConfig.LimitMagicWeapon != 0)//娉曞疂
+ {
+ int faBaoID = funcoPenConfig.LimitMagicWeapon / 100;
+ MagicWeapon(faBaoID, funcID);
+ }
+ else if (funcoPenConfig.LimitMissionID != 0)//浠诲姟
+ {
+ if (functionForecastConfig.RedPointLV <= 0)
+ {
+ return;
+ }
+ if (PlayerDatas.Instance.baseData.LV - functionForecastConfig.RedPointLV >= funcoPenConfig.LimitLV)
+ {
+ RedPointChange = true;
+ IsRedPoint = true;
+ }
+ if (IsRedPoint)
+ {
+ redPointStre1.state = RedPointState.Simple;
+ }
+ else
+ {
+ redPointStre1.state = RedPointState.None;
+ }
+ return;
+ }
+ }
+ else//绛夌骇
+ {
+ if (functionForecastConfig.RedPointLV <= 0)
+ {
+ return;
+ }
+ if (PlayerDatas.Instance.baseData.LV - functionForecastConfig.RedPointLV >= funcoPenConfig.LimitLV)
+ {
+ RedPointChange = true;
+ IsRedPoint = true;
+ }
+ if (IsRedPoint)
+ {
+ redPointStre1.state = RedPointState.Simple;
+ }
+ else
+ {
+ redPointStre1.state = RedPointState.None;
+ }
+ return;
+ }
+ }
+ TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
+ private void MagicWeapon(int fabaoID,int funcID)
+ {
+ var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(funcID);
+ Treasure treasure;
+ if (treasureModel.TryGetTreasure(fabaoID, out treasure)
+ && treasure.state == TreasureState.Collected)
+ {
+ var list = treasure.treasureStages;
+ var funcStage = 0;
+ for (int i = 0; i < list.Count; i++)
+ {
+ if (list[i].unlockType == TreasureStageUnlock.Func &&
+ list[i].func == funcID)
+ {
+ funcStage = i;
+ break;
+ }
+ }
+ if (treasure.stage == funcStage - 1 || funcStage == 0)
+ {
+ float exp = (treasure.exp / treasure.treasureStages[funcStage].exp)*100;
+ if (functionForecastConfig.RedPointPercentage > 0)
+ {
+ if (exp >= functionForecastConfig.RedPointPercentage)
+ {
+ RedPointChange = true;
+ IsRedPoint = true;
+ }
+ if (IsRedPoint)
+ {
+ redPointStre1.state = RedPointState.Simple;
+ }
+ }
+ else
+ {
+ redPointStre1.state = RedPointState.None;
+ }
+ }
+ }
+ }
+
+ public void WhetherToPlayTheBox()
+ {
+ var inDungeon = IsDungeon();
+ var IsOpenMaininterface = WindowCenter.Instance.CheckOpen<MainInterfaceWin>();
+ if (NewBieCenter.Instance.inGuiding || ModelCenter.Instance.GetModel<TreasureModel>().newGotShowing || inDungeon || !IsOpenMaininterface)
+ {
+ return;
+ }
+ for (int i = 0; i < FunctionList.Count; i++)
+ {
+ if (!FuncOpen.Instance.IsFuncOpen(FunctionList[i].FuncId))
+ {
+ var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(FunctionList[i].FuncId);
+ if (functionForecastConfig.FrameLevel <= 0)
+ {
+ return;
+ }
+ string strKey = "FeatureNotice" + functionForecastConfig.FrameLevel;
+ int type = LocalSave.GetInt(strKey);
+ bool IsOpenMain = WindowCenter.Instance.CheckOpen<MainInterfaceWin>();
+ if (PlayerDatas.Instance.baseData.LV >= functionForecastConfig.FrameLevel && type == 0)
+ {
+ LocalSave.SetInt(strKey, functionForecastConfig.FrameLevel);
+ WindowCenter.Instance.Open<FeatureNoticeWin>();
+ }
+ }
+ }
+ }
+ private bool IsDungeon()
+ {
+ var mapId = PlayerDatas.Instance.baseData.MapID;
+ var mapConfig = Config.Instance.Get<MapConfig>(mapId);
+ return mapConfig != null && mapConfig.MapFBType != 0;
+ }
+}
+
+
+
+
diff --git a/System/MainInterfacePanel/FeatureNoticeModel.cs.meta b/System/MainInterfacePanel/FeatureNoticeModel.cs.meta
new file mode 100644
index 0000000..9d4c558
--- /dev/null
+++ b/System/MainInterfacePanel/FeatureNoticeModel.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e9c203c14c6a0b4419efaefdddbe4d89
+timeCreated: 1536732400
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/MainInterfacePanel/FeatureNoticeWin.cs b/System/MainInterfacePanel/FeatureNoticeWin.cs
index 71749f6..383f6e7 100644
--- a/System/MainInterfacePanel/FeatureNoticeWin.cs
+++ b/System/MainInterfacePanel/FeatureNoticeWin.cs
@@ -22,8 +22,14 @@
[SerializeField] Text m_TextShowD;//鏄剧ず鍐呭4
[SerializeField] ScrollerController m_ScrollerController;
[SerializeField] Button m_CloseButton;
- List<FunctionForecastConfig> FunctionList = new List<FunctionForecastConfig>();
+ [SerializeField] Text m_TextTurnedOn;//宸插紑鍚�
+ [SerializeField] Text m_TextUnopened;//鏈紑鍚�
+ [SerializeField] Text m_Textschedule;//杩涘害
+ [SerializeField] Button m_ButtonGoto;
+ TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
+ FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
#region Built-in
+ private int ClickFuncID = 0;
protected override void BindController()
{
}
@@ -35,32 +41,70 @@
protected override void OnPreOpen()
{
- AddList();
- m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
+ DefaultSelection();//鑾峰彇榛樿閫夋嫨
+ m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
OnCreateGridLineCell(m_ScrollerController);
+ ContentDisplay();
+ m_ScrollerController.JumpIndex(JumpIndex());
}
protected override void OnAfterOpen()
{
- }
-
+ FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
+ PlayerDatas.Instance.PlayerDataRefreshInfoEvent += OnPlayersUpLV;
+ treasureModel.treasureStateChangeEvent += treasureStateChangeEvent;
+ treasureModel.treasureStageUpEvent += treasureStageUpEvent;
+ }
protected override void OnPreClose()
{
- m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
+ PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnPlayersUpLV;
+ FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
+ m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
+ treasureModel.treasureStateChangeEvent -= treasureStateChangeEvent;
+ treasureModel.treasureStageUpEvent -= treasureStageUpEvent;
+ if (featureNoticeModel.redPointStre1.state == RedPointState.Simple)
+ {
+ featureNoticeModel.redPointStre1.state = RedPointState.None;
+ }
}
+ private void treasureStageUpEvent(int obj)
+ {
+ ContentDisplay();
+ m_ScrollerController.m_Scorller.RefreshActiveCellViews();//鍒锋柊鍙
+ }
+
+ private void treasureStateChangeEvent(int obj)
+ {
+ ContentDisplay();
+ m_ScrollerController.m_Scorller.RefreshActiveCellViews();//鍒锋柊鍙
+ }
+
+ private void OnFuncStateChangeEvent(int obj)
+ {
+ ContentDisplay();
+ m_ScrollerController.m_Scorller.RefreshActiveCellViews();//鍒锋柊鍙
+ }
+ private void OnPlayersUpLV(PlayerDataRefresh obj)
+ {
+ if (obj == PlayerDataRefresh.LV)
+ {
+ ContentDisplay();
+ m_ScrollerController.m_Scorller.RefreshActiveCellViews();//鍒锋柊鍙
+ }
+ }
void OnCreateGridLineCell(ScrollerController gridCtrl)
{
gridCtrl.Refresh();
- for (int i = 0; i < FunctionList.Count; i++)
+ for (int i = 0; i < featureNoticeModel.FunctionList.Count; i++)
{
if (i == 0)
{
- gridCtrl.AddCell(ScrollerDataType.Header, FunctionList[i].FuncId);
+ gridCtrl.AddCell(ScrollerDataType.Header, featureNoticeModel.FunctionList[i].FuncId);
}
else
{
- gridCtrl.AddCell(ScrollerDataType.Normal, FunctionList[i].FuncId);
+ gridCtrl.AddCell(ScrollerDataType.Normal, featureNoticeModel.FunctionList[i].FuncId);
}
}
gridCtrl.Restart();
@@ -72,11 +116,45 @@
{
FeaturesType1 featuresType1 = cell.GetComponent<FeaturesType1>();
featuresType1.GetTheFeatureID(funcId);
+ if (funcId == ClickFuncID)
+ {
+ featuresType1.ImageSelected.SetActive(true);
+ }
+ else
+ {
+ featuresType1.ImageSelected.SetActive(false);
+ }
+ featuresType1.Button.SetListener(()=>
+ {
+ if (funcId != ClickFuncID)
+ {
+ ClickFuncID = funcId;
+ ContentDisplay();
+ m_ScrollerController.m_Scorller.RefreshActiveCellViews();//鍒锋柊鍙
+ }
+ });
}
else if (type == ScrollerDataType.Normal)
{
FeaturesType2 featuresType2 = cell.GetComponent<FeaturesType2>();
featuresType2.GetTheFeatureID(funcId);
+ if (funcId == ClickFuncID)
+ {
+ featuresType2.ImageSelected.SetActive(true);
+ }
+ else
+ {
+ featuresType2.ImageSelected.SetActive(false);
+ }
+ featuresType2.Button.SetListener(() =>
+ {
+ if (funcId != ClickFuncID)
+ {
+ ClickFuncID = funcId;
+ ContentDisplay();
+ m_ScrollerController.m_Scorller.RefreshActiveCellViews();//鍒锋柊鍙
+ }
+ });
}
}
@@ -84,20 +162,146 @@
{
}
#endregion
- private void AddList()
+ private void DefaultSelection()//鑾峰彇榛樿閫夋嫨
{
- if (FunctionList.Count <= 0)
+ var configs = Config.Instance.GetAllValues<FunctionForecastConfig>();
+ foreach (var config in configs)
{
- var configs = Config.Instance.GetAllKeys<FunctionForecastConfig>();
- foreach (var key in configs)
+ int openTag = config.FuncId;
+ if (!FuncOpen.Instance.IsFuncOpen(openTag))
{
- var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(key);
- if (functionForecastConfig != null && functionForecastConfig.Display == 1)
- {
- FunctionList.Add(functionForecastConfig);
- }
+ ClickFuncID = openTag;
+ return;
+ }
+ }
+ if (ClickFuncID == 0)
+ {
+ ClickFuncID = featureNoticeModel.FunctionList[0].FuncId;
+ }
+ }
+
+ private int JumpIndex()//Jump閫変腑
+ {
+ int Index = 0;
+ Index = featureNoticeModel.FunctionList.FindIndex((x)=>
+ {
+ return x.FuncId == ClickFuncID;
+ });
+ return Index;
+ }
+
+ private void ContentDisplay()//鍐呭鏄剧ず
+ {
+ var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(ClickFuncID);
+ if (functionForecastConfig == null)
+ {
+ return;
+ }
+ m_TextAdvanceName.text = functionForecastConfig.FuncName;
+ m_FeaturesImage.SetSprite(functionForecastConfig.Icon);
+ string[] StrList = ConfigParse.GetMultipleStr(functionForecastConfig.Content);
+ if (StrList.Length > 0)
+ {
+ m_Text_ShowA.text = StrList[0];
+ m_TextShowB.text = StrList[1];
+ m_TextShowC.text = StrList[2];
+ m_TextShowD.text = StrList[3];
+ }
+ if (FuncOpen.Instance.IsFuncOpen(ClickFuncID))
+ {
+ m_TextTurnedOn.gameObject.SetActive(true);
+ m_TextUnopened.gameObject.SetActive(false);
+ m_Textschedule.gameObject.SetActive(false);
+ m_ButtonGoto.gameObject.SetActive(false);
+ }
+ else
+ {
+ TrailerClassification(ClickFuncID);
+ }
+
+ }
+
+ void TrailerClassification(int funcID)//棰勫憡鍒嗙被
+ {
+ m_TextTurnedOn.gameObject.SetActive(false);
+ m_TextUnopened.gameObject.SetActive(false);
+ m_Textschedule.gameObject.SetActive(false);
+ m_ButtonGoto.gameObject.SetActive(false);
+ FuncOpenLVConfig funcoPenConfig = Config.Instance.Get<FuncOpenLVConfig>(funcID);
+ if (funcoPenConfig.LimitMagicWeapon != 0 || funcoPenConfig.LimitMissionID != 0)
+ {
+ if (funcoPenConfig.LimitMagicWeapon != 0)//娉曞疂
+ {
+ int faBaoID = funcoPenConfig.LimitMagicWeapon / 100;
+ MagicWeapon(faBaoID);
}
+ else if (funcoPenConfig.LimitMissionID != 0)//浠诲姟
+ {
+ m_TextUnopened.gameObject.SetActive(true);
+ m_TextUnopened.text= string.Format(Language.Get("TaskFuncOpen"), funcoPenConfig.LimitLV);
+ return;
+ }
+ }
+ else//绛夌骇
+ {
+ m_TextUnopened.gameObject.SetActive(true);
+ m_TextUnopened.text= string.Format(Language.Get("FuncLevelOpen"), funcoPenConfig.LimitLV);
+ return;
+ }
+ }
+
+ private void MagicWeapon(int fabaoID)
+ {
+ m_ButtonGoto.gameObject.SetActive(true);
+ Treasure treasure;
+ TreasureConfig _treasure = Config.Instance.Get<TreasureConfig>(fabaoID);
+ m_ButtonGoto.SetListener(()=>
+ {
+ var config = Config.Instance.Get<TreasureConfig>(fabaoID);
+ treasureModel.selectedTreasure = fabaoID;
+ treasureModel.currentCategory = (TreasureCategory)config.Category;
+ WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.TreasureCollectSoul);
+ });
+ if (treasureModel.TryGetTreasure(fabaoID, out treasure)
+ && treasure.state == TreasureState.Collected)
+ {
+ m_Textschedule.gameObject.SetActive(true);
+ var list = treasure.treasureStages;
+ var funcStage = 0;
+ for (int i = 0; i < list.Count; i++)
+ {
+ if (list[i].unlockType == TreasureStageUnlock.Func &&
+ list[i].func == ClickFuncID)
+ {
+ funcStage = i;
+ break;
+ }
+ }
+ if (treasure.stage < funcStage)
+ {
+ if (treasure.stage == funcStage - 1 || funcStage == 0)
+ {
+ if (treasure.exp >= treasure.treasureStages[funcStage].exp)
+ {
+ m_Textschedule.text = "100%";
+ }
+ else
+ {
+ m_Textschedule.text = (float)treasure.exp / treasure.treasureStages[funcStage].exp + "%";
+ }
+
+ }
+ else
+ {
+ m_Textschedule.text = 0+" %";
+ }
+ }
+ }
+ else
+ {
+ m_TextUnopened.gameObject.SetActive(true);
+ m_TextUnopened.text = string.Format(Language.Get("FuncFBOpen"), _treasure.Name);
}
}
}
diff --git a/System/MainInterfacePanel/FeaturesType2.cs b/System/MainInterfacePanel/FeaturesType2.cs
index 67cca2f..efcb32b 100644
--- a/System/MainInterfacePanel/FeaturesType2.cs
+++ b/System/MainInterfacePanel/FeaturesType2.cs
@@ -38,6 +38,14 @@
m_FunctionName.text = functionForecastConfig.FuncName;
m_FunctionalLevel.text = functionForecastConfig.DisplayLevel.ToString();
m_FeaturesTypeIcon.SetSprite(functionForecastConfig.FuncIconKey);
+ if (FuncOpen.Instance.IsFuncOpen(funcId))
+ {
+ m_SelectedBar.SetActive(true);
+ }
+ else
+ {
+ m_SelectedBar.SetActive(false);
+ }
}
diff --git a/System/MainInterfacePanel/FunctionForecastTip.cs b/System/MainInterfacePanel/FunctionForecastTip.cs
index 68fc52d..592c15d 100644
--- a/System/MainInterfacePanel/FunctionForecastTip.cs
+++ b/System/MainInterfacePanel/FunctionForecastTip.cs
@@ -115,7 +115,6 @@
void FunctionIconBtn()//闈㈡澘寮�鍚�
{
- // WindowCenter.Instance.Open<FunctionForecastWin>();
WindowCenter.Instance.Open<FeatureNoticeWin>();
}
}
diff --git a/System/MainInterfacePanel/LowSettingTip.cs b/System/MainInterfacePanel/LowSettingTip.cs
index fdf218b..5ed198c 100644
--- a/System/MainInterfacePanel/LowSettingTip.cs
+++ b/System/MainInterfacePanel/LowSettingTip.cs
@@ -88,8 +88,8 @@
}
private void GodBeastBtn()
{
- SysNotifyMgr.Instance.ShowTip("FuncNextVersion");//淇℃伅鎻愮ず
- return;
+ //SysNotifyMgr.Instance.ShowTip("FuncNextVersion");//淇℃伅鎻愮ず
+ //return;
WindowCenter.Instance.Close<MainInterfaceWin>();
WindowCenter.Instance.Open<DogzWin>();
}
diff --git a/System/MainInterfacePanel/MainInterfaceWin.cs b/System/MainInterfacePanel/MainInterfaceWin.cs
index 4979b55..0bad8d4 100644
--- a/System/MainInterfacePanel/MainInterfaceWin.cs
+++ b/System/MainInterfacePanel/MainInterfaceWin.cs
@@ -136,6 +136,7 @@
DemonJarModel demonJarModel { get { return ModelCenter.Instance.GetModel<DemonJarModel>(); } }
DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
+ FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
#region Built-in
protected override void BindController()
@@ -342,7 +343,7 @@
m_HighSettingTip.AfterOpen();
m_ChatTip.OnAfterOpen();
HandleAchievement();
-
+ featureNoticeModel.WhetherToPlayTheBox();
}
protected override void OnPreClose()
@@ -889,6 +890,10 @@
void Updatefighting(PlayerDataRefresh _tCDBPlayerRefresh)//鏁版嵁鐨勫埛鏂�
{
ArticleExperience();//鍏充簬缁忛獙鏉�
+ if (_tCDBPlayerRefresh == PlayerDataRefresh.LV)
+ {
+ featureNoticeModel.WhetherToPlayTheBox();
+ }
}
void OnCollectBtnClick()
diff --git a/System/MainInterfacePanel/TaskListTip.cs b/System/MainInterfacePanel/TaskListTip.cs
index 4fe6546..90ffe93 100644
--- a/System/MainInterfacePanel/TaskListTip.cs
+++ b/System/MainInterfacePanel/TaskListTip.cs
@@ -448,10 +448,21 @@
int type = 0;
if (jumpTask == 0)//璺冲埌榛樿閫変腑
{
- if (_list.Contains(taskmodel.GetNowTaskID))
+ if (taskmodel.GetNowTaskID != taskmodel.TaskupToDate)//榛樿鐨勫拰鏈�鏂伴�変腑鐨勪笉涓�鑷存椂
{
- type = _list.IndexOf(taskmodel.GetNowTaskID);
+ if (_list.Contains(taskmodel.TaskupToDate))
+ {
+ type = _list.IndexOf(taskmodel.TaskupToDate);
+ }
+ taskmodel.TaskupToDate = taskmodel.GetNowTaskID;
}
+ else
+ {
+ if (_list.Contains(taskmodel.GetNowTaskID))
+ {
+ type = _list.IndexOf(taskmodel.GetNowTaskID);
+ }
+ }
}
else
{
diff --git a/System/Message/RichMoveEvent.cs b/System/Message/RichMoveEvent.cs
index 57fbeff..f959d0a 100644
--- a/System/Message/RichMoveEvent.cs
+++ b/System/Message/RichMoveEvent.cs
@@ -145,7 +145,7 @@
return;
}
- if (mapModel.IsMapUnLocked(_mapId) == false)
+ if (mapModel.IsMapUnlocked(_mapId) == false)
{
SysNotifyMgr.Instance.ShowTip("Map_Delivery");
return;
diff --git a/System/Rune/RuneModel.cs b/System/Rune/RuneModel.cs
index a8f35fa..ca97fe7 100644
--- a/System/Rune/RuneModel.cs
+++ b/System/Rune/RuneModel.cs
@@ -691,10 +691,6 @@
}
}
}
- if (OnRefreshRuneHole != null)
- {
- OnRefreshRuneHole();
- }
for (int i = 0; i < RUNE_HOLE_COUNT; i++)
{
if (!serverInited)
@@ -702,7 +698,7 @@
break;
}
int k = 1 << i;
- var oldOpen = (holeState & k) == k;
+ var oldOpen = (oldHoleState & k) == k;
if (!oldOpen && IsRuneHoleOpen(i))
{
if (openNewHoleEvent != null)
@@ -711,6 +707,10 @@
}
}
}
+ if (OnRefreshRuneHole != null)
+ {
+ OnRefreshRuneHole();
+ }
UpdateRedpoint();
UpdateBreakRedpoint();
UpdateSpecialHoleRedpoint();
diff --git a/System/Rune/RuneMosaicWin.cs b/System/Rune/RuneMosaicWin.cs
index 66369ec..f49d32c 100644
--- a/System/Rune/RuneMosaicWin.cs
+++ b/System/Rune/RuneMosaicWin.cs
@@ -67,6 +67,8 @@
}
bool m_IsRuneLvUp = false;
+ int m_SpecialHoleUnlocking = -1;
+ Coroutine m_CacheCoroutine;
#region Built-in
protected override void BindController()
{
@@ -102,6 +104,7 @@
m_ContainerSpecial.gameObject.SetActive(false);
OpenOrCloseSelect(false);
model.sltRuneHole = -1;
+ m_SpecialHoleUnlocking = -1;
foreach (var _hole in runeHoleDatas)
{
_hole.SetSelect(false);
@@ -123,6 +126,14 @@
model.OnRefreshRuneHole -= OnRuneHoleRefresh;
model.OnRefreshRuneExp -= OnUpdateRuneHoleInfo;
model.openNewHoleEvent -= OpenNewHoleEvent;
+
+ m_SpecialHoleUnlocking = -1;
+
+ if (m_CacheCoroutine != null)
+ {
+ StopCoroutine(m_CacheCoroutine);
+ m_CacheCoroutine = null;
+ }
}
protected override void OnAfterClose()
@@ -134,8 +145,17 @@
{
if (model.IsSpeicalHole(hole))
{
-
+ m_SpecialHoleUnlocking = hole;
+ EffectMgr.Instance.PlayUIEffect(3068, 2500, runeHoleDatas[hole].Container.parent, false);
+ m_CacheCoroutine = StartCoroutine(Co_RefreshHole());
}
+ }
+
+ IEnumerator Co_RefreshHole()
+ {
+ yield return WaitingForSecondConst.WaitMS800;
+ m_SpecialHoleUnlocking = -1;
+ OnRuneHoleRefresh();
}
private void UnlockSpecialHole()
@@ -227,7 +247,7 @@
void OnRuneHoleClick(int _hole)
{
- if (model.IsRuneHoleOpen(_hole))
+ if (model.IsRuneHoleOpen(_hole) && m_SpecialHoleUnlocking != _hole)
{
for (int i = 0; i < runeHoleDatas.Count; i++)
{
@@ -284,6 +304,10 @@
model.runeLevelUpRedpoint.state = RedPointState.None;
model.runeReplaceRedpoint.state = RedPointState.None;
if (model.sltRuneHole == -1 || !model.IsRuneHoleOpen(model.sltRuneHole))
+ {
+ return;
+ }
+ if (model.sltRuneHole == m_SpecialHoleUnlocking)
{
return;
}
@@ -403,7 +427,7 @@
for (int i = 0; i < runeHoleDatas.Count; i++)
{
RuneData data = model.GetHoleRune(i);
- runeHoleDatas[i].SetRuneHole(!model.IsRuneHoleOpen(i));
+ runeHoleDatas[i].SetRuneHole(!model.IsRuneHoleOpen(i) || m_SpecialHoleUnlocking == i);
if (data == null || !model.IsRuneHoleOpen(i))
{
runeHoleDatas[i].Display(0, 0);
diff --git a/System/Store/StoreModel.cs b/System/Store/StoreModel.cs
index f07b9ac..d40b37c 100644
--- a/System/Store/StoreModel.cs
+++ b/System/Store/StoreModel.cs
@@ -31,6 +31,7 @@
{
public int[] normalBuyCoinsTypes { get; private set; }
public string UNIONSTORESAVE_KEY { get; private set; }
+ public string MUSTBUYSAVE_KEY { get; private set; }
public string StoreEffectRecord_Key { get; private set; }
public List<StoreConfig> shoplist;
@@ -67,8 +68,8 @@
public void OnAfterPlayerDataInitialize()
{
UNIONSTORESAVE_KEY = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, LocalSaveStoreType.UnionStore);
- DebugEx.Log("UNIONSTORESAVE_KEY:" + UNIONSTORESAVE_KEY);
StoreEffectRecord_Key = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "StoreEffectRecord");
+ MUSTBUYSAVE_KEY = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID,"MustBuy");
}
public void OnPlayerLoginOk()
@@ -662,7 +663,7 @@
public bool CheckWeekStoreIsShopBuy(out List<StoreConfig> buylist)
{
buylist = new List<StoreConfig>();
- if (!IsNewDay()) return false;
+ if (!IsNewDay(StoreEffectRecord_Key)) return false;
List<StoreConfig> shoplist = StoreConfig.GetTypeStoreModel((int)StoreFunc.WeekStore);
for(int i = 0; i < shoplist.Count; i++)
@@ -700,16 +701,16 @@
}
}
- private bool IsNewDay()
+ private bool IsNewDay(string recordKey)
{
if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store)) return false;
- if (PlayerPrefs.HasKey(StoreEffectRecord_Key))
+ if (PlayerPrefs.HasKey(recordKey))
{
- int day = LocalSave.GetInt(StoreEffectRecord_Key);
+ int day = LocalSave.GetInt(recordKey);
if(day != TimeUtility.ServerNow.Day)
{
- LocalSave.SetInt(StoreEffectRecord_Key,TimeUtility.ServerNow.Day);
+ LocalSave.SetInt(recordKey, TimeUtility.ServerNow.Day);
return true;
}
else
@@ -719,7 +720,7 @@
}
else
{
- LocalSave.SetInt(StoreEffectRecord_Key, TimeUtility.ServerNow.Day);
+ LocalSave.SetInt(recordKey, TimeUtility.ServerNow.Day);
return true;
}
}
@@ -835,9 +836,45 @@
shopRedDict[storeConfig.ID].state = RedPointState.None;
}
}
+
+ UpdateMustBuyRedpoint(storeConfig);
}
}
+ public void UpdateMustBuyRedpoint(StoreConfig storeConfig)
+ {
+ if (CheckIsMustBuy(storeConfig))
+ {
+ shopRedDict[storeConfig.ID].state = RedPointState.Simple;
+ }
+ else
+ {
+ shopRedDict[storeConfig.ID].state = RedPointState.None;
+ }
+ }
+
+ public void ClearMustBuyRedpoint(StoreConfig storeConfig)
+ {
+ if(mustIdlist.Contains(storeConfig.ItemID))
+ {
+ shopRedDict[storeConfig.ID].state = RedPointState.None;
+ }
+ }
+
+ public List<int> mustIdlist = new List<int>() { 4741};
+ public bool CheckIsMustBuy(StoreConfig config)
+ {
+ if(mustIdlist.Contains(config.ItemID)
+ && CheckShopIsCanBuy(config))
+ {
+ if(IsNewDay(MUSTBUYSAVE_KEY))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
public bool CheckScoreStoreIsCanBuy(StoreConfig storeConfig)
{
List<StoreConfig> list = StoreConfig.GetSellShoplist();
diff --git a/System/Store/StoreWin.cs b/System/Store/StoreWin.cs
index 0e016fd..d6d433b 100644
--- a/System/Store/StoreWin.cs
+++ b/System/Store/StoreWin.cs
@@ -392,36 +392,9 @@
shopId = 0;
shopItemCell.LoadGuidEffectCtrl(shopInfo.ID, shopId);
}
-
- //if(shopItemCell.effect.IsPlaying)
- //{
- // shopItemCell.effect.StopImediatly();
- // if(m_storeModel.shoplist.Contains(shopInfo))
- // {
- // m_storeModel.shoplist.Remove(shopInfo);
- // }
- //}
+ m_storeModel.ClearMustBuyRedpoint(shopInfo);
m_storeModel.OnClickShopCell(shopInfo);
});
-
- //if(m_storeModel.storeFuncType == StoreFunc.WeekStore)
- //{
- // if(m_storeModel.shoplist.Contains(shopInfo))
- // {
- // if(!shopItemCell.effect.IsPlaying)
- // {
- // shopItemCell.effect.Play();
- // }
- // }
- // else
- // {
- // if (shopItemCell.effect.IsPlaying)
- // {
- // shopItemCell.effect.StopImediatly();
- // }
- // }
-
- //}
}
else
{
diff --git a/System/SystemSetting/ChatSetting.cs b/System/SystemSetting/ChatSetting.cs
index bf719c3..301af13 100644
--- a/System/SystemSetting/ChatSetting.cs
+++ b/System/SystemSetting/ChatSetting.cs
@@ -112,58 +112,57 @@
public bool GetAutoPlayVoice(ChatInfoType type, int netState)
{
+ if (netState == 0)
+ {
+ return false;
+ }
switch (type)
{
case ChatInfoType.World:
- if (netState == 1)
+ if (netState == 2)
{
return GetBool(ChatBoolType.WorldVoiceWifi);
}
- else if (netState == 4)
+ else
{
return GetBool(ChatBoolType.WorldVoice4G);
}
- break;
case ChatInfoType.Area:
- if (netState == 1)
+ if (netState == 2)
{
return GetBool(ChatBoolType.AreaVoiceWifi);
}
- else if (netState == 4)
+ else
{
return GetBool(ChatBoolType.AreaVoice4G);
}
- break;
case ChatInfoType.Team:
- if (netState == 1)
+ if (netState == 2)
{
return GetBool(ChatBoolType.TeamVoiceWifi);
}
- else if (netState == 4)
+ else
{
return GetBool(ChatBoolType.TeamVoice4G);
}
- break;
case ChatInfoType.Fairy:
- if (netState == 1)
+ if (netState == 2)
{
return GetBool(ChatBoolType.GradVoiceWifi);
}
- else if (netState == 4)
+ else
{
return GetBool(ChatBoolType.GradVoice4G);
}
- break;
case ChatInfoType.Friend:
- if (netState == 1)
+ if (netState == 2)
{
return GetBool(ChatBoolType.PrivateChatVoiceWifi);
}
- else if (netState == 4)
+ else
{
return GetBool(ChatBoolType.PrivatChatVoice4G);
}
- break;
}
return false;
}
diff --git a/System/Team/MyTeamWin.cs b/System/Team/MyTeamWin.cs
index 0723487..f1199d3 100644
--- a/System/Team/MyTeamWin.cs
+++ b/System/Team/MyTeamWin.cs
@@ -178,7 +178,8 @@
}
else
{
- if (model.myTeam.mission.mapId == TeamModel.NONE_MISSION)
+ var mission = model.myTeam.inTeam ? model.myTeam.mission : model.missionBuf;
+ if (mission.mapId == TeamModel.NONE_MISSION)
{
SysNotifyMgr.Instance.ShowTip("AutoMatchingNoTarget");
}
@@ -288,7 +289,8 @@
Teammate mate;
if (model.myTeam.TryGetMember(i, out mate))
{
- sign.Display(mate.mapId == PlayerDatas.Instance.baseData.MapID ? TeammateNearByBehaviour.LocationState.NearBy : TeammateNearByBehaviour.LocationState.FarAway);
+ var isNearBy = mate.mapId == PlayerDatas.Instance.baseData.MapID;
+ sign.Display(isNearBy ? TeammateNearByBehaviour.LocationState.NearBy : TeammateNearByBehaviour.LocationState.FarAway);
}
else
{
diff --git a/System/Team/TeamData.cs b/System/Team/TeamData.cs
index c4edb2e..78ee637 100644
--- a/System/Team/TeamData.cs
+++ b/System/Team/TeamData.cs
@@ -49,6 +49,11 @@
this.levelMax = _serverInfo.ReqMaxLV;
}
+ public static int Sort(TheirTeam lhs, TheirTeam rhs)
+ {
+ return lhs.memberCount < 4 && lhs.memberCount > rhs.memberCount ? -1 : 1;
+ }
+
}
public class MyTeam
@@ -108,7 +113,7 @@
for (int i = 0; i < members.Count; i++)
{
var member = members[i];
- if (member.id != PlayerDatas.Instance.baseData.PlayerID
+ if (member.id != PlayerDatas.Instance.baseData.PlayerID
&& member.mapId == PlayerDatas.Instance.baseData.MapID)
{
count++;
diff --git a/System/Team/TeamModel.cs b/System/Team/TeamModel.cs
index a0aaba0..962d5d6 100644
--- a/System/Team/TeamModel.cs
+++ b/System/Team/TeamModel.cs
@@ -596,6 +596,16 @@
GameNetSystem.Instance.SendInfo(sendInfo);
}
+ public void RequestAssistAutoMatch()
+ {
+ if (!myTeam.inTeam && !isMatching)
+ {
+ var sendInfo = new CB907_tagCGAutoMatchTeam();
+ sendInfo.TagMapID = 2;
+ GameNetSystem.Instance.SendInfo(sendInfo);
+ }
+ }
+
public void RequestCancelAutoMatchTeam()
{
var sendInfo = new CB908_tagCGCancelMatchTeam();
@@ -683,19 +693,12 @@
public void OnGetTheirTeams(HB904_tagGCSceneTeamRefresh _teamInfo)
{
theirTeams.Clear();
-
for (int i = 0; i < _teamInfo.SceneTeamList.Length; i++)
{
theirTeams.Add(new TheirTeam(_teamInfo.SceneTeamList[i]));
}
- theirTeams.Sort(
- (TheirTeam a, TheirTeam b) =>
- {
- return a.memberCount < 4 && a.memberCount > b.memberCount ? -1 : 1;
- }
- );
-
+ theirTeams.Sort(TheirTeam.Sort);
if (theirTeamListRefreshEvent != null)
{
theirTeamListRefreshEvent();
@@ -705,19 +708,16 @@
public void OnGetTheirTeams(HB909_tagGCTagMapTeamList _teamInfo)
{
theirTeams.Clear();
-
for (int i = 0; i < _teamInfo.TeamList.Length; i++)
{
- theirTeams.Add(new TheirTeam((int)_teamInfo.TagMapID, _teamInfo.IsTagEx == 1 ? _teamInfo.TagMapEx : -1, _teamInfo.MatchState == 1, _teamInfo.TeamList[i]));
+ var mapId = (int)_teamInfo.TagMapID;
+ var isTagEx = _teamInfo.IsTagEx == 1 ? _teamInfo.TagMapEx : -1;
+ var matchState = _teamInfo.MatchState == 1;
+
+ theirTeams.Add(new TheirTeam(mapId, isTagEx, matchState, _teamInfo.TeamList[i]));
}
- theirTeams.Sort(
- (TheirTeam a, TheirTeam b) =>
- {
- return a.memberCount < 4 && a.memberCount > b.memberCount ? -1 : 1;
- }
- );
-
+ theirTeams.Sort(TheirTeam.Sort);
if (theirTeamListRefreshEvent != null)
{
theirTeamListRefreshEvent();
@@ -987,7 +987,7 @@
public void OnUpdateDungeonPrepareState(HB911_tagGCTeamEnterFBPrepare _serverInfo)
{
- if (!AssetSource.sceneFromEditor && VersionConfig.Get().assetAccess != InstalledAsset.IngoreDownLoad && !AssetVersionUtility.unPriorAssetDownLoadDone)
+ if (!AssetSource.sceneFromEditor && !AssetVersionUtility.IsUnpriorAssetDownLoadOk())
{
RequestPrepareEnterDungeon(false);
return;
diff --git a/System/WindowBase/ModelCenter.cs b/System/WindowBase/ModelCenter.cs
index f9268e0..d9750f7 100644
--- a/System/WindowBase/ModelCenter.cs
+++ b/System/WindowBase/ModelCenter.cs
@@ -192,6 +192,8 @@
RegisterModel<TreasureSoulModel>();
RegisterModel<FairyGrabBossModel>();
RegisterModel<GodBeastModel>();
+ RegisterModel<PrayForDurgModel>();
+ RegisterModel<FeatureNoticeModel>();
inited = true;
}
diff --git a/System/WorldMap/LocalMapEventPointToggle.cs b/System/WorldMap/LocalMapEventPointToggle.cs
index 0ce74c1..9ff088e 100644
--- a/System/WorldMap/LocalMapEventPointToggle.cs
+++ b/System/WorldMap/LocalMapEventPointToggle.cs
@@ -38,14 +38,14 @@
m_LayoutLeft.gameObject.SetActive(mapConfig.MapFBType == (int)MapType.OpenCountry);
DrawEventInfo();
- OnSelected(model.selectedLocalMapEventPoint);
- model.selectLocalMapEventPointEvent += OnSelected;
+ OnSelected(model.selectedMapEventPoint);
+ model.selectMapEventPointEvent += OnSelected;
}
public override void Dispose()
{
base.Dispose();
- model.selectLocalMapEventPointEvent -= OnSelected;
+ model.selectMapEventPointEvent -= OnSelected;
}
private void Awake()
@@ -89,8 +89,8 @@
private void MoveToNpc()
{
- var mapNPCConfig = Config.Instance.Get<MapEventPointConfig>(m_EventId);
- MapTransferUtility.Instance.MissionFlyTo(PlayerDatas.Instance.baseData.MapID, mapNPCConfig.NPCID);
+ var config = Config.Instance.Get<MapEventPointConfig>(m_EventId);
+ MapTransferUtility.Instance.MissionFlyTo(PlayerDatas.Instance.baseData.MapID, config.NPCID);
WindowCenter.Instance.Close<WorldMapWin>();
WindowCenter.Instance.Close<LocalMapWin>();
@@ -99,7 +99,7 @@
private void SelectEventPoint()
{
- model.selectedLocalMapEventPoint = m_EventId;
+ model.selectedMapEventPoint = m_EventId;
}
private void OnSelected(int _event)
diff --git a/System/WorldMap/LocalMapFindPath.cs b/System/WorldMap/LocalMapFindPath.cs
index 277943e..983b798 100644
--- a/System/WorldMap/LocalMapFindPath.cs
+++ b/System/WorldMap/LocalMapFindPath.cs
@@ -64,11 +64,11 @@
DrawFunctionNPCs();
DrawEventPoints();
m_HeroHead.transform.SetAsLastSibling();
- FoucsEventPoint(model.selectedLocalMapEventPoint);
+ FoucsEventPoint(model.selectedMapEventPoint);
m_BoundDrag.onBeginDrag.RemoveAllListeners();
m_BoundDrag.onBeginDrag.AddListener(OnBeginDrag);
- model.selectLocalMapEventPointEvent += FoucsEventPoint;
+ model.selectMapEventPointEvent += FoucsEventPoint;
var hero = PlayerDatas.Instance.hero;
if (hero != null)
@@ -95,7 +95,7 @@
hero.OnPathFindStop -= OnHeroStopMove;
}
- model.selectLocalMapEventPointEvent -= FoucsEventPoint;
+ model.selectMapEventPointEvent -= FoucsEventPoint;
m_BoundDrag.onBeginDrag.RemoveAllListeners();
for (int i = 0; i < tagBehaviours.Count; i++)
@@ -138,7 +138,7 @@
if (RectTransformUtility.RectangleContainsScreenPoint((RectTransform)this.transform, Input.mousePosition, CameraManager.uiCamera)
&& !RectTransformUtility.RectangleContainsScreenPoint(m_EventPointInstroduce.containerDetails, Input.mousePosition, CameraManager.uiCamera))
{
- model.selectedLocalMapEventPoint = -1;
+ model.selectedMapEventPoint = -1;
}
}
@@ -384,7 +384,7 @@
private void FoucsEventPoint(int _eventPoint)
{
- if (model.selectedLocalMapEventPoint != -1)
+ if (model.selectedMapEventPoint != -1)
{
var config = Config.Instance.Get<MapEventPointConfig>(_eventPoint);
var monsterRefreshConfig = Config.Instance.Get<MonsterRefreshPointConfig>(config.NPCID);
@@ -403,7 +403,7 @@
}
m_EventPointInstroduce.gameObject.SetActive(true);
- m_EventPointInstroduce.Display(model.selectedLocalMapEventPoint, m_SelecteEventPointSign);
+ m_EventPointInstroduce.Display(model.selectedMapEventPoint, m_SelecteEventPointSign);
}
else
{
@@ -447,7 +447,7 @@
private void OnBeginDrag()
{
- model.selectedLocalMapEventPoint = -1;
+ model.selectedMapEventPoint = -1;
}
public struct LocalMap
diff --git a/System/WorldMap/LocalMapTag.cs b/System/WorldMap/LocalMapTag.cs
index 8b419f4..b54ed73 100644
--- a/System/WorldMap/LocalMapTag.cs
+++ b/System/WorldMap/LocalMapTag.cs
@@ -150,7 +150,7 @@
WindowCenter.Instance.Close<LocalMapWin>();
WindowCenter.Instance.Open<MainInterfaceWin>();
MapTransferUtility.Instance.MoveToNPC(npcId);
- model.selectedLocalMapEventPoint = -1;
+ model.selectedMapEventPoint = -1;
}
break;
}
diff --git a/System/WorldMap/LocalMapWin.cs b/System/WorldMap/LocalMapWin.cs
index d29c1ff..e9f4d19 100644
--- a/System/WorldMap/LocalMapWin.cs
+++ b/System/WorldMap/LocalMapWin.cs
@@ -143,12 +143,12 @@
var recommendHangPoint = model.GetRecommendHangPoint(mapId);
if (recommendHangPoint == 0)
{
- model.selectedLocalMapEventPoint = -1;
+ model.selectedMapEventPoint = -1;
}
else
{
- model.selectedLocalMapEventPoint = recommendHangPoint;
- m_EventPointToggleGroup.MoveToCenter(visableEventPoints.IndexOf(model.selectedLocalMapEventPoint));
+ model.selectedMapEventPoint = recommendHangPoint;
+ m_EventPointToggleGroup.MoveToCenter(visableEventPoints.IndexOf(model.selectedMapEventPoint));
}
}
@@ -176,16 +176,16 @@
private void GotoHangUp()
{
- if (model.selectedLocalMapEventPoint != -1)
+ if (model.selectedMapEventPoint != -1)
{
- var config = Config.Instance.Get<MapEventPointConfig>(this.model.selectedLocalMapEventPoint);
+ var config = Config.Instance.Get<MapEventPointConfig>(this.model.selectedMapEventPoint);
WindowCenter.Instance.Close<WorldMapWin>();
WindowCenter.Instance.Close<LocalMapWin>();
WindowCenter.Instance.Open<MainInterfaceWin>();
MapTransferUtility.Instance.MoveToNPC(config.NPCID);
}
- model.selectedLocalMapEventPoint = -1;
+ model.selectedMapEventPoint = -1;
}
private void GotoWorldMap()
@@ -210,7 +210,7 @@
private void UnSelectedEventPoint()
{
- model.selectedLocalMapEventPoint = -1;
+ model.selectedMapEventPoint = -1;
}
private void DisplayLines(List<MapLine> _mapLines)
diff --git a/System/WorldMap/MapModel.cs b/System/WorldMap/MapModel.cs
index 4b5fd2d..4b5d004 100644
--- a/System/WorldMap/MapModel.cs
+++ b/System/WorldMap/MapModel.cs
@@ -13,50 +13,49 @@
public class MapModel : Model, IBeforePlayerDataInitialize, IAfterPlayerDataInitialize, IPlayerLoginOk, IMapInitOk
{
- int m_SelectedLocalMapEventPoint;
- public int selectedLocalMapEventPoint {
- get { return this.m_SelectedLocalMapEventPoint; }
- set {
- if (m_SelectedLocalMapEventPoint != value)
- {
- m_SelectedLocalMapEventPoint = value;
- if (selectLocalMapEventPointEvent != null)
- {
- selectLocalMapEventPointEvent(this.m_SelectedLocalMapEventPoint);
- }
- }
- }
- }
-
Dictionary<int, WorldMapArea> worldMapAreas = new Dictionary<int, WorldMapArea>();
Dictionary<int, bool> worldMapUnLockStates = new Dictionary<int, bool>();
Dictionary<int, List<int>> localMapEventPoints = new Dictionary<int, List<int>>();
Dictionary<int, List<string>> mapFunctionNPCsToRefreshID = new Dictionary<int, List<string>>();
Dictionary<int, List<string>> mapCollectNPCsToRefreshID = new Dictionary<int, List<string>>();
- Dictionary<int, List<MapLine>> mapLines = new Dictionary<int, List<MapLine>>();
+ Dictionary<int, List<MapLine>> allMapLines = new Dictionary<int, List<MapLine>>();
List<int> sortedMapEventPoints = new List<int>();
List<int> sortedHangUpPoints = new List<int>();
List<int> sortedMaps = new List<int>();
- List<MapLine> sortedMapLines = new List<MapLine>();
- int m_NewUnLockedMap = 0;
- public int newUnLockedMap {
- get { return m_NewUnLockedMap; }
- set { m_NewUnLockedMap = value; }
+ PlayerTaskDatas taskModel { get { return ModelCenter.Instance.GetModel<PlayerTaskDatas>(); } }
+ FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
+
+ int m_NewUnlockedMap = 0;
+ public int newUnlockedMap {
+ get { return m_NewUnlockedMap; }
+ set { m_NewUnlockedMap = value; }
}
- public int newUnLockMapsTip {
+ public int newUnlockMapTip {
get { return LocalSave.GetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "NewUnLockMapsTip")); }
set { LocalSave.SetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "NewUnLockMapsTip"), value); }
+ }
+
+ int m_SelectedMapEventPoint;
+ public int selectedMapEventPoint {
+ get { return this.m_SelectedMapEventPoint; }
+ set {
+ if (m_SelectedMapEventPoint != value)
+ {
+ m_SelectedMapEventPoint = value;
+ if (selectMapEventPointEvent != null)
+ {
+ selectMapEventPointEvent(this.m_SelectedMapEventPoint);
+ }
+ }
+ }
}
public int wannaLookLocalMap { get; set; }
int mapUnLockIndex = 0;
- PlayerTaskDatas taskModel { get { return ModelCenter.Instance.GetModel<PlayerTaskDatas>(); } }
- FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
-
- public event Action<int> selectLocalMapEventPointEvent;
+ public event Action<int> selectMapEventPointEvent;
public event Action<int> mapLinesUpdateEvent;
public override void Init()
@@ -77,7 +76,7 @@
public void OnBeforePlayerDataInitialize()
{
mapUnLockIndex = 0;
- newUnLockedMap = 0;
+ newUnlockedMap = 0;
}
public void OnAfterPlayerDataInitialize()
@@ -86,15 +85,15 @@
public void OnPlayerLoginOk()
{
- UpdateMapsUnLockedState();
- newUnLockedMap = 0;
+ UpdateMapsUnlockedState();
+ newUnlockedMap = 0;
}
public void OnMapInitOk()
{
- if (newUnLockMapsTip == PlayerDatas.Instance.baseData.MapID)
+ if (newUnlockMapTip == PlayerDatas.Instance.baseData.MapID)
{
- newUnLockMapsTip = 0;
+ newUnlockMapTip = 0;
}
}
@@ -113,17 +112,14 @@
return;
}
- if (worldMapUnLockStates.ContainsKey(_mapId))
+ if (!worldMapUnLockStates.ContainsKey(_mapId))
{
- if (!worldMapUnLockStates[_mapId])
- {
- SysNotifyMgr.Instance.ShowTip("Map_Delivery");
- return;
- }
+ return;
}
- else
+
+ if (!worldMapUnLockStates[_mapId])
{
- //鏈煡鐨勫湴鍥�
+ SysNotifyMgr.Instance.ShowTip("Map_Delivery");
return;
}
@@ -132,26 +128,13 @@
MapTransferUtility.Send_WorldTransfer(_mapId, position, MapTransferType.WorldTransport, (byte)_lineId, 0);
}
- public void RequestFlyToEventPoint(int _eventPoint)
- {
- GA_Hero _hero = PlayerDatas.Instance.hero;
- if (_hero != null)
- {
- _hero.Behaviour.StopHandupAI();
- _hero.Behaviour.StopKillUntilDieAI();
- }
-
- var mapNPCConfig = Config.Instance.Get<MapEventPointConfig>(_eventPoint);
- MapTransferUtility.Instance.MissionFlyTo(wannaLookLocalMap, mapNPCConfig.NPCID);
- }
-
public void RequestSelectedLine(int _lineId)
{
- GA_Hero _hero = PlayerDatas.Instance.hero;
- if (_hero != null)
+ var hero = PlayerDatas.Instance.hero;
+ if (hero != null)
{
- _hero.Behaviour.StopHandupAI();
- _hero.Behaviour.StopKillUntilDieAI();
+ hero.Behaviour.StopHandupAI();
+ hero.Behaviour.StopKillUntilDieAI();
}
if (PlayerDatas.Instance.baseData.FBID != _lineId)
@@ -186,13 +169,13 @@
public List<MapLine> GetMapLines(int _mapId)
{
- sortedMapLines.Clear();
- if (mapLines.ContainsKey(_mapId))
+ var mapLines = new List<MapLine>();
+ if (allMapLines.ContainsKey(_mapId))
{
- sortedMapLines.AddRange(mapLines[_mapId]);
- CheckActivityLine(_mapId);
- sortedMapLines.Sort(SortMaplines);
- return sortedMapLines;
+ mapLines.AddRange(allMapLines[_mapId]);
+ CheckActivityLine(_mapId, mapLines);
+ mapLines.Sort(SortMaplines);
+ return mapLines;
}
else
{
@@ -200,27 +183,32 @@
}
}
- void CheckActivityLine(int _mapId)
+ void CheckActivityLine(int _mapId, List<MapLine> mapLines)
{
var activityLine = 0;
fairyGrabBossModel.TryGetFairyGrabBossLine(out activityLine);
if (activityLine != 0)
{
- var index = sortedMapLines.FindIndex((x) =>
+ var index = mapLines.FindIndex((x) =>
{
return activityLine + 1 == x.lineIndex;
});
- if (fairyGrabBossModel.InActivityTime ||
- PlayerDatas.Instance.baseData.FBID == activityLine)
+
+ bool needDisplayActivityLine = fairyGrabBossModel.InActivityTime ||
+ PlayerDatas.Instance.baseData.FBID == activityLine;
+ if (index == -1)
{
- if (index == -1)
+ if (needDisplayActivityLine)
{
- sortedMapLines.Add(new MapLine(_mapId, activityLine + 1, 0, 0));
+ mapLines.Add(new MapLine(_mapId, activityLine + 1, 0, 0));
}
}
- else if (index != -1)
+ else
{
- sortedMapLines.RemoveAt(index);
+ if (!needDisplayActivityLine)
+ {
+ mapLines.RemoveAt(index);
+ }
}
}
}
@@ -231,10 +219,12 @@
{
var mapState = _serverInfo.MapStateList[i];
var mapId = (int)mapState.MapID;
- var lines = mapLines[mapId] = new List<MapLine>();
+ var lines = allMapLines[mapId] = new List<MapLine>();
for (int j = 0; j < mapState.LineCnt; j++)
{
- lines.Add(new MapLine(mapId, j + 1, (int)mapState.LineCurPlayerCntList[j], (int)mapState.LineMaxPlayerCntList[j]));
+ var playerCount = (int)mapState.LineCurPlayerCntList[j];
+ var playerMaxCount = (int)mapState.LineMaxPlayerCntList[j];
+ lines.Add(new MapLine(mapId, j + 1, playerCount, playerMaxCount));
}
if (mapLinesUpdateEvent != null)
@@ -247,7 +237,7 @@
public void UpdateDungeonMapLines(HA007_tagGCFBLinePlayerCnt _serverInfo)
{
var mapId = (int)_serverInfo.MapID;
- var lines = mapLines[mapId] = new List<MapLine>();
+ var lines = allMapLines[mapId] = new List<MapLine>();
for (int i = 0; i < _serverInfo.Count; i++)
{
@@ -301,35 +291,6 @@
}
return null;
- }
-
- public int GetNextMap(int _mapId)
- {
- for (int i = sortedMaps.Count - 1; i >= 0; i--)
- {
- int mapId = sortedMaps[i];
- if (_mapId == mapId)
- {
- var nextMap = sortedMaps[Mathf.Clamp(i - 1, 0, sortedMaps.Count - 1)];
- return nextMap;
- }
- }
-
- return -1;
- }
-
- public int GetLatestUnLockHangUpMap()
- {
- for (int i = 0; i < sortedMaps.Count; i++)
- {
- int mapId = sortedMaps[i];
- if (GeneralConfig.Instance.autoOnHookMap.Contains(mapId) && IsMapUnLocked(mapId))
- {
- return mapId;
- }
- }
-
- return GeneralConfig.Instance.autoOnHookMap[GeneralConfig.Instance.autoOnHookMap.Count - 1];
}
public int GetRecommendHangPoint(int _mapId)
@@ -414,7 +375,7 @@
for (int i = 0; i < sortedHangUpPoints.Count; i++)
{
var config = Config.Instance.Get<MapEventPointConfig>(sortedHangUpPoints[i]);
- if (IsMapUnLocked(config.MapID))
+ if (IsMapUnlocked(config.MapID))
{
unLockedHangeUpPoints.Add(sortedHangUpPoints[i]);
}
@@ -476,11 +437,7 @@
return recommendPoint;
}
- public void ConfirmNewMap(int _mapId)
- {
- }
-
- public bool IsMapUnLocked(int _mapId)
+ public bool IsMapUnlocked(int _mapId)
{
if (worldMapUnLockStates.ContainsKey(_mapId))
{
@@ -492,27 +449,29 @@
}
}
- private void UpdateMapsUnLockedState()
+ private void UpdateMapsUnlockedState()
{
foreach (var mapId in worldMapAreas.Keys)
{
- var unLocked = CheckMapUnLocked(mapId);
- if (worldMapUnLockStates.ContainsKey(mapId) && !worldMapUnLockStates[mapId] && unLocked && mapId != 10010)
+ var canUnlock = CanMapUnlock(mapId);
+ if (worldMapUnLockStates.ContainsKey(mapId)
+ && !worldMapUnLockStates[mapId]
+ && canUnlock && mapId != 10010)
{
- newUnLockedMap = mapId;
- newUnLockMapsTip = mapId;
+ newUnlockedMap = mapId;
+ newUnlockMapTip = mapId;
}
- worldMapUnLockStates[mapId] = unLocked;
+ worldMapUnLockStates[mapId] = canUnlock;
}
}
- private bool CheckMapUnLocked(int _mapId)
+ private bool CanMapUnlock(int _mapId)
{
var config = Config.Instance.Get<MapConfig>(_mapId);
- var playerLevel = PlayerDatas.Instance.baseData.LV;
+ var level = PlayerDatas.Instance.baseData.LV;
- if (playerLevel >= config.LV)
+ if (level >= config.LV)
{
if (config.MainTaskID > 0)
{
@@ -534,7 +493,7 @@
switch (refreshType)
{
case PlayerDataRefresh.LV:
- UpdateMapsUnLockedState();
+ UpdateMapsUnlockedState();
break;
}
}
@@ -552,7 +511,7 @@
mapUnLockIndex = 0;
}
- UpdateMapsUnLockedState();
+ UpdateMapsUnlockedState();
}
}
@@ -563,7 +522,7 @@
{
if (mapConfig.MapFBType == 0)
{
- worldMapAreas.Add(mapConfig.MapID, new WorldMapArea(mapConfig.MapID, true, WorldMapCamp.Neutral));
+ worldMapAreas.Add(mapConfig.MapID, new WorldMapArea(mapConfig.MapID, true));
sortedMaps.Add(mapConfig.MapID);
}
}
@@ -661,11 +620,12 @@
{
var activityline = 0;
fairyGrabBossModel.TryGetFairyGrabBossLine(out activityline);
- bool _isActivityLinex = activityline != 0 && x.lineIndex == activityline + 1;
- bool _isActivityLiney = activityline != 0 && y.lineIndex == activityline + 1;
- if (_isActivityLinex != _isActivityLiney)
+ var isActivityLinex = activityline != 0 && x.lineIndex == activityline + 1;
+ var isActivityLiney = activityline != 0 && y.lineIndex == activityline + 1;
+
+ if (isActivityLinex != isActivityLiney)
{
- return -_isActivityLinex.CompareTo(_isActivityLiney);
+ return -isActivityLinex.CompareTo(isActivityLiney);
}
return x.lineIndex.CompareTo(y.lineIndex);
}
@@ -675,13 +635,11 @@
{
public int id;
public bool unLocked;
- public WorldMapCamp camp;
- public WorldMapArea(int _id, bool _unLocked, WorldMapCamp _camp)
+ public WorldMapArea(int _id, bool _unLocked)
{
this.id = _id;
this.unLocked = _unLocked;
- this.camp = _camp;
}
}
diff --git a/System/WorldMap/WorldMapAreaBehaviour.cs b/System/WorldMap/WorldMapAreaBehaviour.cs
index d1a1f82..fa1ed83 100644
--- a/System/WorldMap/WorldMapAreaBehaviour.cs
+++ b/System/WorldMap/WorldMapAreaBehaviour.cs
@@ -61,11 +61,11 @@
m_MapArea = _area;
m_ScaleTween.SetStartState();
DrawArea();
- m_PressTip.enabled = !model.IsMapUnLocked(m_MapArea.id);
+ m_PressTip.enabled = !model.IsMapUnlocked(m_MapArea.id);
if (m_NewUnLockTip != null)
{
- m_NewUnLockTip.gameObject.SetActive(m_MapArea.id != model.newUnLockedMap && model.newUnLockMapsTip == m_MapArea.id);
+ m_NewUnLockTip.gameObject.SetActive(m_MapArea.id != model.newUnlockedMap && model.newUnlockMapTip == m_MapArea.id);
}
CheckAchievementGuide();
@@ -85,7 +85,7 @@
{
try
{
- var unLocked = model.IsMapUnLocked(m_MapArea.id);
+ var unLocked = model.IsMapUnlocked(m_MapArea.id);
var mapConfig = Config.Instance.Get<MapConfig>(m_MapArea.id);
m_AreaName.text = mapConfig.Name;
m_AreaLevel.text = mapConfig.LV.ToString();
@@ -108,7 +108,7 @@
m_ScaleTween.Play(false);
downTime = Time.time;
var mapId = m_MapArea.id;
- if (!model.IsMapUnLocked(mapId))
+ if (!model.IsMapUnlocked(mapId))
{
m_UnLockTip.Display(mapId);
}
@@ -121,7 +121,7 @@
private void OnPointerClick()
{
- var isUnLocked = model.IsMapUnLocked(m_MapArea.id);
+ var isUnLocked = model.IsMapUnlocked(m_MapArea.id);
if (isUnLocked || Time.time - downTime < 0.3f)
{
if (isUnLocked)
@@ -139,7 +139,6 @@
MapTransferUtility.Instance.Clear();
model.RequestMapTransport(m_MapArea.id);
- model.ConfirmNewMap(m_MapArea.id);
}
}
}
diff --git a/System/WorldMap/WorldMapWin.cs b/System/WorldMap/WorldMapWin.cs
index 9fb904e..4906a0a 100644
--- a/System/WorldMap/WorldMapWin.cs
+++ b/System/WorldMap/WorldMapWin.cs
@@ -115,11 +115,11 @@
}
}
- if (model.newUnLockedMap != 0)
+ if (model.newUnlockedMap != 0)
{
StopCoroutine("Co_MapUnLockShow");
- StartCoroutine("Co_MapUnLockShow", model.newUnLockedMap);
- model.newUnLockedMap = 0;
+ StartCoroutine("Co_MapUnLockShow", model.newUnlockedMap);
+ model.newUnlockedMap = 0;
}
else
{
diff --git a/Utility/ComponentExtersion.cs b/Utility/ComponentExtersion.cs
index 618ef80..5877884 100644
--- a/Utility/ComponentExtersion.cs
+++ b/Utility/ComponentExtersion.cs
@@ -75,6 +75,17 @@
_button.onClick.RemoveAllListeners();
}
+ public static void SetListener(this Button button, UnityAction action)
+ {
+ if (button == null)
+ {
+ return;
+ }
+
+ button.onClick.RemoveAllListeners();
+ button.AddListener(action);
+ }
+
public static void AddListener(this Toggle _toggle, UnityAction<bool> _action)
{
if (_toggle == null)
@@ -82,6 +93,17 @@
return;
}
_toggle.onValueChanged.AddListener(_action);
+ }
+
+ public static void SetListener(this Toggle toggle, UnityAction<bool> action)
+ {
+ if (toggle == null)
+ {
+ return;
+ }
+
+ toggle.onValueChanged.RemoveAllListeners();
+ toggle.onValueChanged.AddListener(action);
}
public static void RemoveAllListeners(this Toggle _toggle)
@@ -102,6 +124,17 @@
_slider.onValueChanged.AddListener(_action);
}
+ public static void SetListener(this Slider slider, UnityAction<float> action)
+ {
+ if (slider == null)
+ {
+ return;
+ }
+
+ slider.onValueChanged.RemoveAllListeners();
+ slider.onValueChanged.AddListener(action);
+ }
+
public static void RemoveAllListeners(this Slider _slider)
{
if (_slider == null)
@@ -120,6 +153,17 @@
_inputField.onValueChanged.AddListener(_action);
}
+ public static void SetListener(this InputField inputField, UnityAction<string> action)
+ {
+ if (inputField == null)
+ {
+ return;
+ }
+
+ inputField.onValueChanged.RemoveAllListeners();
+ inputField.onValueChanged.AddListener(action);
+ }
+
public static void RemoveAllListeners(this InputField _inputField)
{
if (_inputField == null)
--
Gitblit v1.8.0