From c5a1b1eb5f845f72b0b3e48fc8c7ccf75cee5831 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 09 十月 2018 10:30:32 +0800
Subject: [PATCH] Merge branch 'master' into 3687天赋功能
---
Core/GameEngine/Model/ConfigManager.cs | 8
System/BlastFurnace/GetEquipPathTips.cs | 10
System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs | 6
System/FriendSystem/MailPanel.cs | 31
System/Dungeon/DungeonNuwaVictoryWin.cs | 5
System/Role/RolePanel.cs | 3
System/MainWin/AttackButton.cs | 2
System/KnapSack/New/BatchBuyWin.cs | 178 ++
Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC09_tagGCFairyCeremonyInfo.cs | 3
System/KnapSack/Logic/EquipDevourWin.cs | 3
System/Strengthening/GodBeastEntry.cs | 9
System/Vip/LimitedTimePackageWin.cs | 5
System/Strengthening/GodBeastSlidingList.cs | 40
System/Strengthening/GodBeastReinforcementWin.cs | 46
System/Team/MyTeamWin.cs | 2
Core/GameEngine/Model/Config/DemonJarConfig.cs | 5
System/MainInterfacePanel/HoistingWin.cs | 15
UI/HUD/HeadUpName.cs | 26
System/Tip/ItemConfirmWin.cs | 16
Core/GameEngine/Model/Config/LoginSeverListConfig.cs.meta | 4
System/FindPrecious/DemonJarBossRebornCoolDown.cs | 6
Fight/MapTransferUtility.cs | 17
System/Strengthening/GodBeastAttributes.cs | 31
System/Vip/LimitedTimePackageModel.cs | 30
System/Login/ServerListCenter.cs | 67
Core/GameEngine/Model/Config/LoginSeverListConfig.cs | 50
System/FairylandCeremony/CeremonyCoolTime.cs.meta | 4
System/FairylandCeremony/ToHiTaskCell.cs | 1
System/OpenServerActivity/InSevenDayWin.cs | 32
Utility/EnumHelper.cs | 6
Core/GameEngine/Login/LoginStage.cs | 7
System/Store/Logic/BuyEquipTip.cs | 30
System/Dogz/DogzPackCell.cs | 71
System/KnapSack/Logic/PlayerPackModels.cs | 5
System/FairylandCeremony/CeremonyFirepartyWin.cs | 15
System/KnapSack/New/BatchBuyWin.cs.meta | 4
System/OpenServerActivity/FlashSaleCoolDown.cs | 2
Fight/GameActor/GA_Player.cs | 4
System/FindPrecious/DemonJarWin.cs | 7
Fight/Stage/StageManager.cs | 18
System/Message/BattleHint.cs | 46
System/Welfare/OperationBase.cs | 4
System/Store/StoreWin.cs | 7
Fight/Stage/CreateRoleStage.cs | 2
System/Role/RoleRenameWin.cs | 3
System/KnapSack/New/BatchUseModel.cs | 81
Utility/RuntimeLogUtility.cs | 4
System/BlastFurnace/BlastFurnaceModel.cs | 93 +
System/FairylandCeremony/FairylandCeremonyWin.cs | 13
System/FairylandCeremony/CeremonyCoolTime.cs | 35
System/Treasure/TreasurePotentialPanel.cs | 29
System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs | 6
Fight/PreFightMission.cs | 10
System/KnapSack/Logic/PackSendQuestMgr.cs | 8
System/FairylandCeremony/FairylandCeremonyModel.cs | 6
System/Dungeon/DungeonBossBriefInfoBehaviour.cs | 4
System/FindPrecious/FindPreciousModel.cs | 6
System/Message/SysNotifyMgr.cs | 2
System/RolePromote/RolePromoteWin.cs | 10
System/MainInterfacePanel/SideMission.cs | 11
System/Dogz/DogzModel.cs | 60
Core/NetworkPackage/ServerPack/HAC_Activity/HAC09_tagGCFairyCeremonyInfo.cs | 2
System/Mount/PlayerMountDatas.cs | 44
System/MainInterfacePanel/HighSettingFadeInFadeOut.cs | 60
System/AssetVersion/AssetVersionUtility.cs | 58
Core/GameEngine/SnxxzGame.cs | 38
System/Dungeon/TrialExchangeBehaviour.cs | 3
Fight/BossFakeLineUtility.cs | 28
System/KnapSack/Logic/BoxGetItemWin.cs | 57
System/KnapSack/New/KnapSackWin.cs | 6
System/Welfare/OperationTimeHepler.cs | 1
Core/GameEngine/Model/Config/DemonJarConfig.cs.meta | 2
System/Login/ServerData.cs | 17
System/FriendSystem/MailAllModel.cs | 20
System/WorldMap/MapModel.cs | 15
Core/NetworkPackage/DebugPkgCache.cs | 31
System/Strengthening/EquipWashModel.cs | 122 +
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0439_tagPlayerChangeDienstgrad.cs | 4
System/Rune/RunePackCell.cs | 67
System/KnapSack/New/RoleEquipWin.cs | 1
System/Dungeon/DungeonAncientTargetWin.cs | 112
System/Treasure/TreasureLevelUpWin.cs | 15
System/Store/StoreModel.cs | 19
System/Treasure/TreasureData.cs | 19
System/Strengthening/WashTips.cs | 8
Fight/Stage/SelectRoleStage.cs | 2
System/KnapSack/Logic/EquipTip.cs | 112 +
System/Dogz/DogzPackWin.cs | 40
System/Pet/PlayerPetDatas.cs | 60
System/Login/LoginModel.cs | 2
Core/GameEngine/Login/Launch.cs | 92
System/AssetVersion/DownLoadAndDiscompressTask.cs | 2
UI/Common/TimerBehaviour.cs | 10
System/MainInterfacePanel/TopRightTip.cs | 6
System/Dungeon/TrialDungeonModel.cs | 42
Fight/GameActor/GA_Hero.cs | 9
System/Treasure/TreasureModel.cs | 145 +
Fight/GameActor/GActorPlayerBase.cs | 32
System/TreasureFindHost/TreasureFindHostModel.cs | 2
System/KnapSack/Logic/ItemTipsModel.cs | 10
Core/NetworkPackage/DebugPkgCache.cs.meta | 6
System/Dungeon/DungeonInspireWin.cs | 43
System/Dungeon/DungeonModel.cs | 5
System/Strengthening/GodBeastModel.cs | 147 ++
/dev/null | 35
System/OpenServerActivity/FeaturesType.cs | 12
System/ClientVersion/VersionConfig.cs | 43
System/WindowJump/WindowJumpMgr.cs | 582 ++++----
Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs | 1
System/FindPrecious/FindPreciousTimer.cs | 4
System/MainInterfacePanel/TaskListTip.cs | 119 +
System/Vip/LimitedTimePackageTime.cs | 8
System/Dungeon/DungeonFightWin.cs | 14
System/ClientVersion/VersionUtility.cs | 49
System/Login/GameNotice.cs | 56
System/DogzDungeon/DogzDungeonModel.cs | 4
System/Rune/RuneModel.cs | 34
117 files changed, 2,636 insertions(+), 1,105 deletions(-)
diff --git a/Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs b/Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs
index a36968c..532f6f4 100644
--- a/Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs
+++ b/Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs
@@ -398,6 +398,7 @@
EditorGUILayout.Space();
+ ClientPackage.auditOutTime = EditorGUILayout.TextField("AppStore Review OutTime",ClientPackage.auditOutTime, GUILayout.Height(20));
publishers = EditorGUILayout.TextField("Publishers", publishers, GUILayout.Height(50));
EditorGUILayout.Space();
diff --git a/Core/GameEngine/Login/Launch.cs b/Core/GameEngine/Login/Launch.cs
index 08a4a36..eb9030e 100644
--- a/Core/GameEngine/Login/Launch.cs
+++ b/Core/GameEngine/Login/Launch.cs
@@ -119,6 +119,9 @@
break;
}
+#endif
+
+#if UNITY_ANDROID
m_CurrentStage = LaunchStage.ClientVersion;
if (!Application.isEditor || InGameDownTestUtility.enable)
{
@@ -136,23 +139,29 @@
}
#endif
-#if UNITY_IOS && !UNITY_EDITOR
-
- m_CurrentStage = LaunchStage.ClientVersion;
- if (!Application.isEditor || InGameDownTestUtility.enable)
+#if UNITY_IOS
+ if (!VersionUtility.Instance.InIosAuditTime())
{
- VersionUtility.Instance.RequestVersionCheck();
- progressBuf = progress;
- timer = 0f;
- duration = 1f;
-
- while (!VersionUtility.Instance.completed)
+ m_CurrentStage = LaunchStage.ClientVersion;
+ if (!Application.isEditor || InGameDownTestUtility.enable)
{
- timer += Time.deltaTime;
- progress = Mathf.Clamp(progressBuf + timer / duration * 0.1f, progressBuf, progressBuf + 0.1f);
- yield return null;
+ VersionUtility.Instance.RequestVersionCheck();
+ progressBuf = progress;
+ timer = 0f;
+ duration = 1f;
+
+ while (!VersionUtility.Instance.completed)
+ {
+ timer += Time.deltaTime;
+ progress = Mathf.Clamp(progressBuf + timer / duration * 0.1f, progressBuf, progressBuf + 0.1f);
+ yield return null;
+ }
}
}
+
+#endif
+
+#if UNITY_IOS && !UNITY_EDITOR
if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 1)
{
@@ -219,47 +228,40 @@
OperationLogCollect.Instance.RecordLauchEvent(2);
OperationLogCollect.Instance.RecordEvent(2);
- if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 1)
+ if (VersionUtility.Instance.NeedDownAsset())
{
m_CurrentStage = LaunchStage.DownLoad;
- switch (VersionConfig.Get().assetAccess)
+ progressBuf = progress;
+ timer = 0f;
+ duration = 1.5f;
+
+ AssetVersionUtility.GetAssetVersionFile();
+ while (!AssetVersionUtility.checkAssetCompleted)
{
- case InstalledAsset.IngoreDownLoad:
- break;
- case InstalledAsset.NullAsset:
- case InstalledAsset.HalfAsset:
- case InstalledAsset.FullAsset:
- AssetVersionUtility.GetAssetVersionFile();
+ timer += Time.deltaTime;
+ progress = Mathf.Clamp(progressBuf + timer / duration * 0.3f, progressBuf, progressBuf + 0.3f);
+ yield return null;
+ }
- progressBuf = progress;
- timer = 0f;
- duration = 1.5f;
- while (!AssetVersionUtility.checkAssetCompleted)
- {
- timer += Time.deltaTime;
- progress = Mathf.Clamp(progressBuf + timer / duration * 0.3f, progressBuf, progressBuf + 0.3f);
- yield return null;
- }
+ if (!AssetVersionUtility.priorAssetDownLoadDone)
+ {
+ AssetVersionUtility.BeginDownLoadTask(true);
+ while (!AssetVersionUtility.priorAssetDownLoadDone)
+ {
+ yield return null;
+ }
- if (!AssetVersionUtility.priorAssetDownLoadDone)
- {
- AssetVersionUtility.BeginDownLoadTask(true);
- while (!AssetVersionUtility.priorAssetDownLoadDone)
- {
- yield return null;
- }
+ yield return WaitingForSecondConst.WaitMS200;
+ }
- yield return WaitingForSecondConst.WaitMS200;
- }
-
- if (!AssetVersionUtility.unPriorAssetDownLoadDone)
- {
- AssetVersionUtility.BeginDownLoadTask(false);
- }
- break;
+ if (!AssetVersionUtility.unPriorAssetDownLoadDone)
+ {
+ AssetVersionUtility.BeginDownLoadTask(false);
}
}
+ GameNotice.OpenGameNotice();
+
if (!AssetSource.allFromEditor)
{
StartCoroutine(AssetBundleUtility.Instance.Initialize());
diff --git a/Core/GameEngine/Login/LoginStage.cs b/Core/GameEngine/Login/LoginStage.cs
index fa5c067..a0218f3 100644
--- a/Core/GameEngine/Login/LoginStage.cs
+++ b/Core/GameEngine/Login/LoginStage.cs
@@ -18,6 +18,11 @@
backGroundWin.ShowLoginEffect();
}
+ if (VersionUtility.Instance.InIosAuditTime())
+ {
+ ServerListCenter.Instance.ParseServerLocalServerList();
+ }
+
if (VersionConfig.Get().isBanShu)
{
WindowCenter.Instance.Open<BanShuLoginWin>(true);
@@ -47,7 +52,7 @@
SoundPlayer.Instance.PlayLoginMusic();
- if (!AssetVersionUtility.hasDownLoadFullAsset)
+ if (VersionUtility.Instance.NeedDownAsset() && !AssetVersionUtility.hasDownLoadFullAsset)
{
InGameDownLoad.Instance.inGameDownLoadAllow = true;
InGameDownLoad.Instance.TryDownLoad(InGameDownLoad.Dominant.None);
diff --git a/Core/GameEngine/Model/Config/DemonJarConfig.cs b/Core/GameEngine/Model/Config/DemonJarConfig.cs
index d0cbc53..c870ae0 100644
--- a/Core/GameEngine/Model/Config/DemonJarConfig.cs
+++ b/Core/GameEngine/Model/Config/DemonJarConfig.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: 绗簩涓栫晫
-// [ Date ]: Tuesday, August 28, 2018
+// [ Date ]: Friday, September 28, 2018
//--------------------------------------------------------
using UnityEngine;
@@ -26,6 +26,7 @@
public int[] Job3;
public int KillHurtMin { get ; private set ; }
public int KillHurtMax { get ; private set ; }
+ public string RewardDescription { get ; private set; }
public override string getKey()
{
@@ -84,6 +85,8 @@
KillHurtMin=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0;
KillHurtMax=IsNumeric(rawContents[14]) ? int.Parse(rawContents[14]):0;
+
+ RewardDescription = rawContents[15].Trim();
}
catch (Exception ex)
{
diff --git a/Core/GameEngine/Model/Config/DemonJarConfig.cs.meta b/Core/GameEngine/Model/Config/DemonJarConfig.cs.meta
index 1cbe5ff..5277fdc 100644
--- a/Core/GameEngine/Model/Config/DemonJarConfig.cs.meta
+++ b/Core/GameEngine/Model/Config/DemonJarConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 7e442059ea96745478dd5787f9e84ef5
-timeCreated: 1535448421
+timeCreated: 1538136681
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/Core/GameEngine/Model/Config/LoginSeverListConfig.cs b/Core/GameEngine/Model/Config/LoginSeverListConfig.cs
new file mode 100644
index 0000000..9d2eaa7
--- /dev/null
+++ b/Core/GameEngine/Model/Config/LoginSeverListConfig.cs
@@ -0,0 +1,50 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Saturday, September 29, 2018
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+
+ public partial class LoginSeverListConfig : ConfigBase {
+
+ public int ID { get ; private set ; }
+ public string ip { get ; private set; }
+ public string pagePort { get ; private set; }
+ public int gatePort { get ; private set ; }
+ public string serverName { get ; private set; }
+
+ public override string getKey()
+ {
+ return ID.ToString();
+ }
+
+ public override void Parse() {
+ try
+ {
+ ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
+
+ ip = rawContents[1].Trim();
+
+ pagePort = rawContents[2].Trim();
+
+ gatePort=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0;
+
+ serverName = rawContents[4].Trim();
+ }
+ catch (Exception ex)
+ {
+ DebugEx.Log(ex);
+ }
+ }
+
+ }
+
+}
+
+
+
+
diff --git a/Fight/Stage/PaintMapLine.cs.meta b/Core/GameEngine/Model/Config/LoginSeverListConfig.cs.meta
similarity index 75%
copy from Fight/Stage/PaintMapLine.cs.meta
copy to Core/GameEngine/Model/Config/LoginSeverListConfig.cs.meta
index 28bbf6d..0841cbc 100644
--- a/Fight/Stage/PaintMapLine.cs.meta
+++ b/Core/GameEngine/Model/Config/LoginSeverListConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 9202015b1077a91488a691347bdeafae
-timeCreated: 1508832157
+guid: 26aef6c81733c0440a426102e8c58da7
+timeCreated: 1538225014
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/Core/GameEngine/Model/ConfigManager.cs b/Core/GameEngine/Model/ConfigManager.cs
index 6b9a043..f237163 100644
--- a/Core/GameEngine/Model/ConfigManager.cs
+++ b/Core/GameEngine/Model/ConfigManager.cs
@@ -27,10 +27,16 @@
SnxxzGame.Instance.AddApplicationOutAction(OnApplicationOut);
}
+ public void LoadPriorBundleConfig()
+ {
+ StartSyncTask<PriorBundleConfig>(AssetPath.Resource);
+ }
+
public void PreLoadConfigs()
{
StartSyncTask<PriorBundleConfig>(AssetPath.Resource);
StartSyncTask<PriorLanguageConfig>(AssetPath.Resource);
+ StartSyncTask<LoginSeverListConfig>(AssetSource.refdataFromEditor ? AssetPath.ResourceOut : AssetPath.External);
}
List<ConfigTask> configTasks = new List<ConfigTask>();
@@ -204,7 +210,7 @@
}
}
- var allowTaskCount = completedCount <= 7 ? GetMinWorkingTaskCount() : GetMaxWorkingTaskCount();
+ var allowTaskCount = completedCount <= 8 ? GetMinWorkingTaskCount() : GetMaxWorkingTaskCount();
var workingCount = 0;
for (int i = 0; i < configTasks.Count; i++)
{
diff --git a/Core/GameEngine/SnxxzGame.cs b/Core/GameEngine/SnxxzGame.cs
index 7ceee95..315f3ea 100644
--- a/Core/GameEngine/SnxxzGame.cs
+++ b/Core/GameEngine/SnxxzGame.cs
@@ -43,13 +43,51 @@
}
}
+#if UNITY_EDITOR
private void OnDrawGizmos()
{
if (m_OnDrawGizmosActions != null)
{
m_OnDrawGizmosActions();
}
+
+ Gizmos.color = Color.black;
+
+ if (RuntimeLogUtility.s_ShowMapLine)
+ {
+ GA_Hero _hero = PlayerDatas.Instance.hero;
+
+ int row = 50;
+ int column = 50;
+ float size = 0.5f;
+
+ float _startX = (int)_hero.Pos.x - 12.5f;
+ float _startZ = (int)_hero.Pos.z - 12.5f;
+
+ if (_hero != null)
+ {
+ Vector3 _start;
+ Vector3 _end;
+
+ for (int i = 0; i < row + 1; ++i)
+ {
+ _start = new Vector3(_startX, _hero.Pos.y + 0.1f, _startZ + i * size);
+ _end = new Vector3(_startX + column * .5f, _hero.Pos.y + 0.1f, _startZ + i * size);
+
+ Gizmos.DrawLine(_start, _end);
+ }
+
+ for (int i = 0; i < column + 1; ++i)
+ {
+ _start = new Vector3(_startX + i * size, _hero.Pos.y + 0.1f, _startZ);
+ _end = new Vector3(_startX + i * size, _hero.Pos.y + 0.1f, _startZ + row* .5f);
+
+ Gizmos.DrawLine(_start, _end);
+ }
+ }
+ }
}
+#endif
protected sealed override void OnDestroy()
{
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0439_tagPlayerChangeDienstgrad.cs b/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0439_tagPlayerChangeDienstgrad.cs
index 73bc008..9d9afaa 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0439_tagPlayerChangeDienstgrad.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0439_tagPlayerChangeDienstgrad.cs
@@ -30,8 +30,8 @@
GActorPlayerBase _player = GAMgr.Instance.GetBySID(vNetData.PlayerID) as GActorPlayerBase;
if (_player != null)
{
- var titleId = PlayerDatas.Instance.baseData.MapID == 31160 ? 0 : vNetData.GradID;//上古战场不显示称号
- _player.SwitchTitle(titleId);
+ //var titleId = PlayerDatas.Instance.baseData.MapID == 31160 ? 0 : vNetData.GradID;//上古战场不显示称号
+ _player.SwitchTitle(vNetData.GradID);
}
}
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC09_tagGCFairyCeremonyInfo.cs b/Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC09_tagGCFairyCeremonyInfo.cs
index 9170e9b..f24ca2a 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC09_tagGCFairyCeremonyInfo.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC09_tagGCFairyCeremonyInfo.cs
@@ -6,7 +6,8 @@
-public class DTCAC09_tagGCFairyCeremonyInfo : DtcBasic {
+public class DTCAC09_tagGCFairyCeremonyInfo : DtcBasic
+{
FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } }
diff --git a/Core/NetworkPackage/DebugPkgCache.cs b/Core/NetworkPackage/DebugPkgCache.cs
new file mode 100644
index 0000000..c20213b
--- /dev/null
+++ b/Core/NetworkPackage/DebugPkgCache.cs
@@ -0,0 +1,31 @@
+using System.Collections.Generic;
+
+public class DebugPkgCache
+{
+ private string dataTime;
+ private int code;
+
+ private static List<DebugPkgCache> m_List = new List<DebugPkgCache>();
+
+ public static void Push(GameNetPackBasic package)
+ {
+ if (m_List.Count != 0)
+ {
+ if (m_List[m_List.Count - 1].code == 258)
+ {
+ return;
+ }
+ }
+
+ DebugPkgCache _p = new DebugPkgCache();
+ _p.dataTime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
+ _p.code = package.cmd;
+
+ m_List.Add(_p);
+ }
+
+ public static void UpLoad()
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/Fight/Stage/PaintMapLine.cs.meta b/Core/NetworkPackage/DebugPkgCache.cs.meta
similarity index 68%
copy from Fight/Stage/PaintMapLine.cs.meta
copy to Core/NetworkPackage/DebugPkgCache.cs.meta
index 28bbf6d..dad9db4 100644
--- a/Fight/Stage/PaintMapLine.cs.meta
+++ b/Core/NetworkPackage/DebugPkgCache.cs.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: 9202015b1077a91488a691347bdeafae
-timeCreated: 1508832157
-licenseType: Pro
+guid: 90b1b61b46516f047a22f3e5920983cd
+timeCreated: 1538230240
+licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
diff --git a/Core/NetworkPackage/ServerPack/HAC_Activity/HAC09_tagGCFairyCeremonyInfo.cs b/Core/NetworkPackage/ServerPack/HAC_Activity/HAC09_tagGCFairyCeremonyInfo.cs
index dcbb66b..87f1af3 100644
--- a/Core/NetworkPackage/ServerPack/HAC_Activity/HAC09_tagGCFairyCeremonyInfo.cs
+++ b/Core/NetworkPackage/ServerPack/HAC_Activity/HAC09_tagGCFairyCeremonyInfo.cs
@@ -8,6 +8,7 @@
public string EndtDate; // 结束日期 y-m-d
public ushort WorldLV; // 世界等级
public ushort LimitLV; // 限制等级
+ public byte ResetType; // 重置类型 0-0点重置 1-5点重置
public HAC09_tagGCFairyCeremonyInfo () {
_cmd = (ushort)0xAC09;
@@ -18,6 +19,7 @@
TransBytes (out EndtDate, vBytes, NetDataType.Chars, 10);
TransBytes (out WorldLV, vBytes, NetDataType.WORD);
TransBytes (out LimitLV, vBytes, NetDataType.WORD);
+ TransBytes (out ResetType, vBytes, NetDataType.BYTE);
}
}
diff --git a/Fight/BossFakeLineUtility.cs b/Fight/BossFakeLineUtility.cs
index 6d67480..357cae1 100644
--- a/Fight/BossFakeLineUtility.cs
+++ b/Fight/BossFakeLineUtility.cs
@@ -15,8 +15,18 @@
bool m_ShowFakeLine = false;
public bool showFakeLine {
- get { return m_ShowFakeLine; }
- set { m_ShowFakeLine = value; }
+ get {
+ if (TimeUtility.OpenDay < GeneralConfig.Instance.bossShuntDays
+ && GeneralConfig.Instance.neutralMaps.Contains(PlayerDatas.Instance.baseData.MapID))
+ {
+ return true;
+ }
+
+ return m_ShowFakeLine;
+ }
+ set {
+ m_ShowFakeLine = value;
+ }
}
public BossFakeLineUtility()
@@ -70,6 +80,15 @@
public void RecordSawStone(int npcId, int lineId)
{
+ var bossInfo = BossInfoConfig.GetBossInfoByStoneId(npcId);
+ if (bossInfo != null)
+ {
+ if (HasSawLineBossRecently(bossInfo.NPCID, lineId))
+ {
+ bossSawRecorder.Clear();
+ }
+ }
+
stoneSawRecorder.Record(npcId, lineId, Time.realtimeSinceStartup);
}
@@ -93,6 +112,11 @@
public void RecordSawBoss(int bossId, int lineId)
{
+ if (HasSawLineStoneRecently(bossId, lineId))
+ {
+ stoneSawRecorder.Clear();
+ }
+
bossSawRecorder.Record(bossId, lineId, Time.realtimeSinceStartup);
}
diff --git a/Fight/GameActor/GA_Hero.cs b/Fight/GameActor/GA_Hero.cs
index 3ddfea2..1ba8773 100644
--- a/Fight/GameActor/GA_Hero.cs
+++ b/Fight/GameActor/GA_Hero.cs
@@ -210,10 +210,9 @@
if (Time.realtimeSinceStartup - m_ChkOpenAutoEscapeTime > 2f)
{
int _dgDataID = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
- var dungeonOpen = Config.Instance.Get<DungeonOpenTimeConfig>(_dgDataID);
-
- if (dungeonOpen != null)
+ if (Config.Instance.ContainKey<DungeonOpenTimeConfig>(_dgDataID))
{
+ var dungeonOpen = Config.Instance.Get<DungeonOpenTimeConfig>(_dgDataID);
if (dungeonOpen.DoFight == 1)
{
forceAutoFight = true;
@@ -419,8 +418,7 @@
var titleModel = ModelCenter.Instance.GetModel<TitleModel>();
var _title = titleModel.GetTitleEquip();
uint _titleID = 0;
- if (_title != null && titleModel.IsTitleGain(_title.id)
- && PlayerDatas.Instance.baseData.MapID != 31160)//涓婂彜鎴樺満涓嶆樉绀虹О鍙�
+ if (_title != null && titleModel.IsTitleGain(_title.id))//涓婂彜鎴樺満涓嶆樉绀虹О鍙�
{
_titleID = (uint)_title.id;
}
@@ -440,7 +438,6 @@
}
base.SetFairyLeagueHeadUp(PlayerDatas.Instance.baseData.MapID == FairyLeagueModel.FAIRY_LEAGUE_DUNGEON);
- CheckAncientHeadUp();
}
public sealed override void SwitchRedName(bool on)
diff --git a/Fight/GameActor/GA_Player.cs b/Fight/GameActor/GA_Player.cs
index 9ac2e84..68cdd51 100644
--- a/Fight/GameActor/GA_Player.cs
+++ b/Fight/GameActor/GA_Player.cs
@@ -352,8 +352,7 @@
m_HeadUpName = HeadUpName.RequireHeadUpName(HeadUpName.Pattern.Player, MP_Name, 0, CameraController.Instance.CameraObject);
}
- var titleId = PlayerDatas.Instance.baseData.MapID == 31160 ? 0 : ActorInfo.titleID;
- m_HeadUpName.SetPlayerInfo((int)ActorInfo.realm, titleId, ActorInfo.PlayerName, ActorInfo.familyName, m_H0434.State == 1);
+ m_HeadUpName.SetPlayerInfo((int)ActorInfo.realm, ActorInfo.titleID, ActorInfo.PlayerName, ActorInfo.familyName, m_H0434.State == 1);
if (StatusMgr.Instance.IsExist(ServerInstID, StatusMgr.Instance.bossBelongBuffID))
{
@@ -361,7 +360,6 @@
}
base.SetFairyLeagueHeadUp(PlayerDatas.Instance.baseData.MapID == FairyLeagueModel.FAIRY_LEAGUE_DUNGEON);
- CheckAncientHeadUp();
}
public sealed override void SwitchRedName(bool on)
diff --git a/Fight/GameActor/GActorPlayerBase.cs b/Fight/GameActor/GActorPlayerBase.cs
index df65ffa..b58924b 100644
--- a/Fight/GameActor/GActorPlayerBase.cs
+++ b/Fight/GameActor/GActorPlayerBase.cs
@@ -43,8 +43,6 @@
public JobSetupConfig JobSetup { get; protected set; }
- DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
-
public override int NextAction
{
get
@@ -218,7 +216,6 @@
MovingState = E_MovingState.Normal;
SystemSetting.Instance.qualityLevelChangeEvent += OnGameQualityChange;
- dungeonModel.updateMissionEvent += CheckAncientHeadUp;
base.OnInit(package);
}
@@ -340,7 +337,6 @@
JobSetup = null;
SystemSetting.Instance.qualityLevelChangeEvent -= OnGameQualityChange;
- dungeonModel.updateMissionEvent -= CheckAncientHeadUp;
base.OnUnit();
}
@@ -352,20 +348,20 @@
UpdateRush();
}
- public void CheckAncientHeadUp()
- {
- if (PlayerDatas.Instance.baseData.MapID == 31160)
- {
- var help = dungeonModel.mission;
- SwitchAncientKing(help.topPlayerID == ServerInstID);
- SwitchAncientEnemy(help.enemyID == ServerInstID && ServerInstID != PlayerDatas.Instance.baseData.PlayerID);
- }
- else
- {
- SwitchAncientKing(false);
- SwitchAncientEnemy(false);
- }
- }
+ //public void CheckAncientHeadUp()
+ //{
+ // if (PlayerDatas.Instance.baseData.MapID == 31160)
+ // {
+ // var help = dungeonModel.mission;
+ // SwitchAncientKing(help.topPlayerID == ServerInstID);
+ // SwitchAncientEnemy(help.enemyID == ServerInstID && ServerInstID != PlayerDatas.Instance.baseData.PlayerID);
+ // }
+ // else
+ // {
+ // SwitchAncientKing(false);
+ // SwitchAncientEnemy(false);
+ // }
+ //}
#region 瑁呭绌挎埓鐩稿叧
diff --git a/Fight/MapTransferUtility.cs b/Fight/MapTransferUtility.cs
index b7f4b80..c5f2b0b 100644
--- a/Fight/MapTransferUtility.cs
+++ b/Fight/MapTransferUtility.cs
@@ -180,8 +180,15 @@
}
}
+ public bool forceMove = false;
+
public void MoveToNPC(int npcID, int sid = 0)
{
+ if (npcID != NpcID)
+ {
+ forceMove = false;
+ }
+
if (sid != 0)
{
GActor _actor = GAMgr.Instance.GetBySID((uint)sid);
@@ -352,6 +359,8 @@
var mapId = _npcLocation.mapId;
var position = new Vector3(_mapConfig.BornPoints[0].x, 0, _mapConfig.BornPoints[0].y);
Send_WorldTransfer(mapId, position, MapTransferType.WorldTransport, (byte)_lineID, npcID);
+
+ forceMove = true;
if (BossFakeLineUtility.Instance.IsShuntBoss(npcID))
{
@@ -376,14 +385,17 @@
if (((lastMoveToWorldBossNpcID == npcID
&& Time.realtimeSinceStartup - lastMoveToWorldBossTime < 60)
&& PlayerDatas.Instance.baseData.FBID == 0)
- || BossFakeLineUtility.Instance.showFakeLine
+ || (BossFakeLineUtility.Instance.showFakeLine && ModelCenter.Instance.GetModel<FindPreciousModel>().IsBossAlive(npcID))
|| (_fairyBossModel.bosses != null
- && _fairyBossModel.bosses.Contains(npcID)))
+ && _fairyBossModel.bosses.Contains(npcID))
+ || forceMove)
{
//Debug.LogFormat(" |-- 闈炴兂鍘荤殑boss涓�60绉掑唴琛屼负浜х敓涓斾负鍚屼竴鍙猙oss, {0}, {1}", BossFakeLineUtility.Instance.showFakeLine,
//PlayerDatas.Instance.baseData.FBID);
Vector3 _destPos = new Vector3(_npcLocation.position.x, _hero.Pos.y, _npcLocation.position.y);
_hero.MoveToPosition(_destPos, _npcLocation.scope);
+
+ forceMove = false;
}
else
{
@@ -398,6 +410,7 @@
//Debug.LogFormat(" |-- 闈炴兂鍘荤殑boss璁板綍,鎴栧垯瑙佸埌boss鏃跺樊瓒呰繃60绉�");
Send_WorldTransfer(_npcLocation.mapId, new Vector3(_hero.Pos.x * 2, 0, _hero.Pos.z * 2), MapTransferType.WorldTransport, 0, npcID);
+ forceMove = true;
}
else
{
diff --git a/Fight/PreFightMission.cs b/Fight/PreFightMission.cs
index 6cf73c3..cf89836 100644
--- a/Fight/PreFightMission.cs
+++ b/Fight/PreFightMission.cs
@@ -1395,7 +1395,11 @@
m_FabaoEffect = SFXPlayUtility.Instance.PlayWithEulerAngle(1051, new Vector3(129.98f, 51.548f, 33.13f), new Vector3(0, -90.81f, 0));
- PlayerDatas.Instance.hero.MoveToPosition(m_SecondTransferStartPos);
+ if (PlayerDatas.Instance.hero!=null)
+ {
+ PlayerDatas.Instance.hero.MoveToPosition(m_SecondTransferStartPos);
+ }
+
DebugEx.Log("绗洓涓璇濈粨鏉�...");
}
@@ -1556,6 +1560,8 @@
{
yield break;
}
+
+ WindowCenter.Instance.Close<MainInterfaceWin>();
CameraController.Instance.MaskCamera.gameObject.SetActive(false);
@@ -1746,9 +1752,11 @@
// }
AssetBundleUtility.Instance.UnloadAssetBundle("maps/map000_xsdt", true, false);
}
+
}
private bool mDestroy = false;
+
public void Destroy()
{
SnxxzGame.Instance.StartCoroutine(Co_Destroy());
diff --git a/Fight/Stage/CreateRoleStage.cs b/Fight/Stage/CreateRoleStage.cs
index 5794f68..e99be57 100644
--- a/Fight/Stage/CreateRoleStage.cs
+++ b/Fight/Stage/CreateRoleStage.cs
@@ -22,7 +22,7 @@
SystemSetting.Instance.SetQualityLevel(SystemSetting.Instance.GetCurrentQualityLevel());
SoundPlayer.Instance.PlayLoginMusic();
- if (!AssetVersionUtility.hasDownLoadFullAsset)
+ if (VersionUtility.Instance.NeedDownAsset() && !AssetVersionUtility.hasDownLoadFullAsset)
{
InGameDownLoad.Instance.TryDownLoad(InGameDownLoad.Dominant.None);
}
diff --git a/Fight/Stage/PaintMapLine.cs b/Fight/Stage/PaintMapLine.cs
deleted file mode 100644
index b547f8e..0000000
--- a/Fight/Stage/PaintMapLine.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-锘縰sing UnityEngine;
-using System.Collections;
-
-public class PaintMapLine : MonoBehaviour
-{
- public int row = 100;
- public int column = 100;
- public float size = .5f;
- public float y = 0;
-
- // Update is called once per frame
- void Update()
- {
- Vector3 _start;
- Vector3 _end;
-
- for (int i = 0; i < row + 1; ++i)
- {
- _start = new Vector3(0, y, i * size);
- _end = new Vector3(column, y, i * size);
-
- Debug.DrawLine(_start, _end, Color.black);
- }
-
- for (int i = 0; i < column + 1; ++i)
- {
-
- _start = new Vector3(i * size, y, 0);
- _end = new Vector3(i * size, y, row);
-
- Debug.DrawLine(_start, _end, Color.black);
- }
-
- }
-}
diff --git a/Fight/Stage/SelectRoleStage.cs b/Fight/Stage/SelectRoleStage.cs
index 34e15a9..a178287 100644
--- a/Fight/Stage/SelectRoleStage.cs
+++ b/Fight/Stage/SelectRoleStage.cs
@@ -20,7 +20,7 @@
SystemSetting.Instance.SetQualityLevel(SystemSetting.Instance.GetCurrentQualityLevel());
SoundPlayer.Instance.PlayLoginMusic();
- if (!AssetVersionUtility.hasDownLoadFullAsset)
+ if (VersionUtility.Instance.NeedDownAsset() && !AssetVersionUtility.hasDownLoadFullAsset)
{
InGameDownLoad.Instance.TryDownLoad(InGameDownLoad.Dominant.None);
}
diff --git a/Fight/Stage/StageManager.cs b/Fight/Stage/StageManager.cs
index 70376a6..0e9510e 100644
--- a/Fight/Stage/StageManager.cs
+++ b/Fight/Stage/StageManager.cs
@@ -559,15 +559,15 @@
_hero.IdleImmediate();
_hero.SetFairyLeagueHeadUp(PlayerDatas.Instance.baseData.MapID == FairyLeagueModel.FAIRY_LEAGUE_DUNGEON);
- _hero.CheckAncientHeadUp();
- var titleId = 0;
- if (PlayerDatas.Instance.baseData.MapID != 31160)
- {
- var titelModel = ModelCenter.Instance.GetModel<TitleModel>();
- var title = titelModel.GetTitleEquip();
- titleId = title != null && titelModel.IsTitleGain(title.id) ? title.id : 0;
- }
- _hero.SwitchTitle((uint)titleId);
+ //_hero.CheckAncientHeadUp();
+ //var titleId = 0;
+ //if (PlayerDatas.Instance.baseData.MapID != 31160)
+ //{
+ // var titelModel = ModelCenter.Instance.GetModel<TitleModel>();
+ // var title = titelModel.GetTitleEquip();
+ // titleId = title != null && titelModel.IsTitleGain(title.id) ? title.id : 0;
+ //}
+ //_hero.SwitchTitle((uint)titleId);
// 鍒ゆ柇buff
if (StatusMgr.Instance.IsExist(PlayerDatas.Instance.PlayerId, StatusMgr.Instance.redNameBuffID))
diff --git a/System/AssetVersion/AssetVersionUtility.cs b/System/AssetVersion/AssetVersionUtility.cs
index dae6980..839617e 100644
--- a/System/AssetVersion/AssetVersionUtility.cs
+++ b/System/AssetVersion/AssetVersionUtility.cs
@@ -18,23 +18,13 @@
static bool m_PriorAssetDownLoadDone = false;
public static bool priorAssetDownLoadDone {
get {
- if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 0)
+ if (VersionUtility.Instance.NeedDownAsset())
+ {
+ return m_PriorAssetDownLoadDone;
+ }
+ else
{
return true;
- }
- else
- {
- switch (VersionConfig.Get().assetAccess)
- {
- case InstalledAsset.NullAsset:
- case InstalledAsset.HalfAsset:
- case InstalledAsset.FullAsset:
- return m_PriorAssetDownLoadDone;
- case InstalledAsset.IngoreDownLoad:
- return true;
- default:
- return true;
- }
}
}
}
@@ -42,23 +32,13 @@
static bool m_UnPriorAssetDownLoadDone = false;
public static bool unPriorAssetDownLoadDone {
get {
- if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 0)
+ if (VersionUtility.Instance.NeedDownAsset())
+ {
+ return m_UnPriorAssetDownLoadDone;
+ }
+ else
{
return true;
- }
- else
- {
- switch (VersionConfig.Get().assetAccess)
- {
- case InstalledAsset.NullAsset:
- case InstalledAsset.HalfAsset:
- case InstalledAsset.FullAsset:
- return m_UnPriorAssetDownLoadDone;
- case InstalledAsset.IngoreDownLoad:
- return true;
- default:
- return true;
- }
}
}
}
@@ -193,7 +173,14 @@
}
else
{
- path = StringUtility.Contact(ResourcesPath.Instance.StreamingAssetPath, _assetKey);
+ if (Application.platform == RuntimePlatform.Android)
+ {
+ path = StringUtility.Contact(ResourcesPath.Instance.ExternalStorePath, _assetKey);
+ }
+ else
+ {
+ path = StringUtility.Contact(ResourcesPath.Instance.StreamingAssetPath, _assetKey);
+ }
}
return path;
@@ -201,17 +188,14 @@
public static bool IsUnpriorAssetDownLoadOk()
{
- if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 0)
+ if (VersionUtility.Instance.NeedDownAsset())
{
- return true;
+ return unPriorAssetDownLoadDone;
}
-
- if (VersionConfig.Get().assetAccess == InstalledAsset.IngoreDownLoad)
+ else
{
return true;
}
-
- return unPriorAssetDownLoadDone;
}
diff --git a/System/AssetVersion/DownLoadAndDiscompressTask.cs b/System/AssetVersion/DownLoadAndDiscompressTask.cs
index 92ecb87..5674971 100644
--- a/System/AssetVersion/DownLoadAndDiscompressTask.cs
+++ b/System/AssetVersion/DownLoadAndDiscompressTask.cs
@@ -78,6 +78,8 @@
{
step = Step.DownLoad;
SnxxzGame.Instance.StartCoroutine(Co_StartDownLoad());
+
+ GameNotice.OpenGameNotice();
}
IEnumerator Co_StartDownLoad()
diff --git a/System/BlastFurnace/BlastFurnaceModel.cs b/System/BlastFurnace/BlastFurnaceModel.cs
index 02a890a..29b70cc 100644
--- a/System/BlastFurnace/BlastFurnaceModel.cs
+++ b/System/BlastFurnace/BlastFurnaceModel.cs
@@ -40,6 +40,9 @@
{
get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
}
+ ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
+ PlayerPetDatas petModel { get { return ModelCenter.Instance.GetModel<PlayerPetDatas>(); } }
+ PlayerMountDatas mountModel { get { return ModelCenter.Instance.GetModel<PlayerMountDatas>(); } }
public override void Init()
{
@@ -91,8 +94,11 @@
playerPack.RefreshItemSumUseCntAct -= RefreshItemUsce;
WindowCenter.Instance.windowAfterCloseEvent -= StoveUpgradAfterClose;
PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= RefreshRealm;
+ PlayerPetDatas.Event_H0704Add -= AddPetEvent;
+ PlayerMountDatas.Event_MountHA301A -= AddMountEvent;
}
+
public void OnAfterPlayerDataInitialize()
{
@@ -106,6 +112,17 @@
CheckRecycleStoreRed();
}
+ private void AddMountEvent(int _HorseID)
+ {
+ CheckMakerDandrugCondition();
+ }
+
+ private void AddPetEvent()
+ {
+ CheckMakerDandrugCondition();
+ }
+
+
public void OnPlayerLoginOk()
{
CheckMakerDandrugCondition();
@@ -117,6 +134,9 @@
WindowCenter.Instance.windowAfterCloseEvent += StoveUpgradAfterClose;
playerPack.ItemCntReduceAct += RefreshDanReduce;
PlayerDatas.Instance.PlayerDataRefreshInfoEvent += RefreshRealm;
+ PlayerPetDatas.Event_H0704Add += AddPetEvent;
+ PlayerMountDatas.Event_MountHA301A += AddMountEvent;
+
}
public void RefreshAddSpecMat(AlchemySpecConfig alchemySpecModel)
@@ -828,6 +848,20 @@
if (alchemyModellist == null || !FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace)) return;
+
+ for (int i = alchemyModellist.Count - 1; i > -1; i--)
+ {
+ if (StoveLV >= alchemyModellist[i].BlastFurnaceLV)
+ {
+ if (IsSpecMatEnough(alchemyModellist[i]) && IsNormalMatEnough(alchemyModellist[i])
+ && !CheckIsHavePetOrMount(alchemyModellist[i]))
+ {
+ danDrugRedPointlist[i].state = RedPointState.Simple;
+ return;
+ }
+ }
+ }
+
for (int i = alchemyModellist.Count - 1; i > -1; i--)
{
if (StoveLV >= alchemyModellist[i].BlastFurnaceLV)
@@ -857,6 +891,43 @@
}
+ private bool CheckIsHavePetOrMount(AlchemyConfig alchemyConfig)
+ {
+ if (alchemyConfig == null) return true;
+
+ Dictionary<int, List<int>> specDrugDict = null;
+ IsSpecMatEnough(alchemyConfig,out specDrugDict);
+
+ foreach(var key in specDrugDict.Keys)
+ {
+ List<int> idlist = specDrugDict[key];
+ for (int i = 0; i < idlist.Count; i++)
+ {
+ if (tipsModel.unlockPetDict.ContainsKey(idlist[i]))
+ {
+ PetInfoConfig petInfo = tipsModel.unlockPetDict[idlist[i]];
+ var petmodel = ModelCenter.Instance.GetModel<PlayerPetDatas>();
+ if (!petmodel._DicPetBack.ContainsKey(petInfo.ID))
+ {
+ return false;
+ }
+ }
+
+ if (tipsModel.unlockMountDict.ContainsKey(idlist[i]))
+ {
+ HorseConfig horseConfig = tipsModel.unlockMountDict[idlist[i]];
+ var mountModel = ModelCenter.Instance.GetModel<PlayerMountDatas>();
+ if (!mountModel._DicHorse.ContainsKey(horseConfig.HorseID))
+ {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+ }
+
public bool IsSpecMatEnough(AlchemyConfig alchemyConfig)
{
if (alchemyConfig == null) return false;
@@ -876,6 +947,28 @@
return isEnough;
}
+ public bool IsSpecMatEnough(AlchemyConfig alchemyConfig,out Dictionary<int,List<int>> specDurgDict)
+ {
+ specDurgDict = new Dictionary<int, List<int>>();
+ if (alchemyConfig == null) return false;
+
+ if (alchemyConfig.SpecialItem == null || alchemyConfig.SpecialItem.Length < 1) return false;
+
+ bool isEnough = false;
+ for (int i = 0; i < alchemyConfig.SpecialItem.Length; i++)
+ {
+ AlchemySpecConfig specConfig = Config.Instance.Get<AlchemySpecConfig>(alchemyConfig.SpecialItem[i]);
+ int haveCnt = playerPack.GetItemCountByID(PackType.rptItem, specConfig.SpecialMaterialD);
+ if (haveCnt >= specConfig.SpecialMateriaNUM)
+ {
+ isEnough = true;
+ List<int> specIdlist = GetPreviewSpecMakeDruglist(specConfig).Keys.ToList();
+ specDurgDict.Add(specConfig.SpecialMaterialD,specIdlist);
+ }
+ }
+ return isEnough;
+ }
+
public bool IsNormalMatEnough(AlchemyConfig alchemyConfig)
{
if (alchemyConfig == null) return false;
diff --git a/System/BlastFurnace/GetEquipPathTips.cs b/System/BlastFurnace/GetEquipPathTips.cs
index ceecc64..c32ae00 100644
--- a/System/BlastFurnace/GetEquipPathTips.cs
+++ b/System/BlastFurnace/GetEquipPathTips.cs
@@ -492,6 +492,16 @@
gemAttr.SetActive(false);
return;
}
+ switch (itemAttrData.itemConfig.EquipPlace)
+ {
+ case 101:
+ case 102:
+ case 103:
+ case 104:
+ case 105:
+ gemAttr.SetActive(false);
+ return;
+ }
curAttrTypeNum += 1;
gemAttr.SetActive(true);
gemTitleText.text = Language.Get("EquipWin_GemPropObj_Text_1");
diff --git a/System/ClientVersion/VersionConfig.cs b/System/ClientVersion/VersionConfig.cs
index 9b45803..f0b6c7b 100644
--- a/System/ClientVersion/VersionConfig.cs
+++ b/System/ClientVersion/VersionConfig.cs
@@ -98,24 +98,31 @@
public void Read(string _data)
{
var dataStrings = _data.Split('\t');
- m_AppId = dataStrings[2];
- m_VersionAuthority = (VersionAuthority)int.Parse(dataStrings[3]);
- m_Version = dataStrings[4];
- m_ClientPackageFlag = dataStrings[5];
- m_Branch = int.Parse(dataStrings[6]);
- m_AssetAccess = (InstalledAsset)int.Parse(dataStrings[7]);
- m_PartAssetPackage = int.Parse(dataStrings[8]) == 1;
- m_ProductName = dataStrings[9];
- m_BundleIdentifier = dataStrings[10];
- m_KeystoreFileName = dataStrings[11];
- m_KeystorePassword = dataStrings[12];
- m_KeystoreAlias = dataStrings[13];
- m_KeystoreAliasPassword = dataStrings[14];
- m_AppleDeveloperTeamID = dataStrings[15];
- m_DebugVersion = int.Parse(dataStrings[16]) == 1;
- m_IsBanShu = int.Parse(dataStrings[17]) == 1;
- m_LogoPosition = dataStrings[18].Vector3Parse();
- m_BanHao = dataStrings[19];
+ try
+ {
+ m_AppId = dataStrings[2];
+ m_VersionAuthority = (VersionAuthority)int.Parse(dataStrings[3]);
+ m_Version = dataStrings[4];
+ m_ClientPackageFlag = dataStrings[5];
+ m_Branch = int.Parse(dataStrings[6]);
+ m_AssetAccess = (InstalledAsset)int.Parse(dataStrings[7]);
+ m_PartAssetPackage = int.Parse(dataStrings[8]) == 1;
+ m_ProductName = dataStrings[9];
+ m_BundleIdentifier = dataStrings[10];
+ m_KeystoreFileName = dataStrings[11];
+ m_KeystorePassword = dataStrings[12];
+ m_KeystoreAlias = dataStrings[13];
+ m_KeystoreAliasPassword = dataStrings[14];
+ m_AppleDeveloperTeamID = dataStrings[15];
+ m_DebugVersion = int.Parse(dataStrings[16]) == 1;
+ m_IsBanShu = int.Parse(dataStrings[17]) == 1;
+ m_LogoPosition = dataStrings[18].Vector3Parse();
+ m_BanHao = dataStrings[19];
+ }
+ catch (System.Exception ex)
+ {
+ DebugEx.Log(ex);
+ }
}
#if UNITY_EDITOR
diff --git a/System/ClientVersion/VersionUtility.cs b/System/ClientVersion/VersionUtility.cs
index 575586d..594af3e 100644
--- a/System/ClientVersion/VersionUtility.cs
+++ b/System/ClientVersion/VersionUtility.cs
@@ -115,7 +115,7 @@
{
if (IsMaoErGame())
{
- return versionInfo.downAsset == 0 && versionInfo.VersionCount > 0;
+ return versionInfo != null && versionInfo.downAsset == 0 && versionInfo.VersionCount > 0;
}
else
{
@@ -125,7 +125,7 @@
public bool NeedNormalUpdate()
{
- return versionInfo.downAsset == 1 && versionInfo.VersionCount > 0;
+ return versionInfo != null && versionInfo.downAsset == 1 && versionInfo.VersionCount > 0;
}
public string GetApkLocalUrl()
@@ -249,8 +249,6 @@
private void OnMaoErVersionCheckResult(bool ok, string result)
{
- Debug.LogFormat("鐚�冲己鏇磋姹傝繑鍥炵粨鏋� result锛歿0}锛歿1}", ok, result);
-
if (ok)
{
try
@@ -281,6 +279,49 @@
}
}
+ public bool InIosAuditTime()
+ {
+ DateTime dateTime;
+
+ try
+ {
+ var textAsset = Resources.Load<UnityEngine.TextAsset>("Config/AuditTime");
+ var content = string.Empty;
+ if (textAsset != null)
+ {
+ content = textAsset.text;
+ if (DateTime.TryParse(content, out dateTime))
+ {
+ return DateTime.Now < dateTime;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+ catch (System.Exception ex)
+ {
+ return false;
+ }
+ }
+
+ public bool NeedDownAsset()
+ {
+ if (versionInfo != null && versionInfo.downAsset == 1 && VersionConfig.Get().assetAccess != InstalledAsset.IngoreDownLoad)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
public class VersionInfo
{
public int ForceCount;
diff --git a/System/Dogz/DogzModel.cs b/System/Dogz/DogzModel.cs
index 450a830..7d9c3b0 100644
--- a/System/Dogz/DogzModel.cs
+++ b/System/Dogz/DogzModel.cs
@@ -229,6 +229,22 @@
}
}
+ public void MakeUseAddAssistNum()
+ {
+ if (IsAddMaxAssist())
+ {
+ SysNotifyMgr.Instance.ShowTip("DogzNumLimit");
+ return;
+ }
+
+ var _itemConfig = Config.Instance.Get<ItemConfig>(AddAssistItem);
+ ConfirmCancel.ShowItemConfirm(Language.Get("DogzFunc102", _itemConfig.ItemName,GetAssistItemCnt()),
+ AddAssistItem, GetAssistItemCnt(), () =>
+ {
+ SendBuyAssistCnt();
+ });
+ }
+
public bool IsAddMaxAssist()
{
if (curSumAssistNum < DogzAssistMaxCnt)
@@ -271,6 +287,21 @@
return false;
}
+ public bool CheckIsPutOn(int id)
+ {
+ ItemConfig config = Config.Instance.Get<ItemConfig>(id);
+ if (config == null) return false;
+
+ int index = config.EquipPlace % 100 - 1;
+ int color = GetDogzEquipLimitByIndex(presentSelectDogz, index);
+ if (config.ItemColor >= color)
+ {
+ return true;
+ }
+ SysNotifyMgr.Instance.ShowTip("DogzQualityAsk", GetDogzPartNameByIndex(index), GetItemColorName(color));
+ return false;
+ }
+
#region 鍗忚
public int addAssistCnt { get; private set; } //棰濆璐拱鐨勫姪鎴樻暟
@@ -285,6 +316,7 @@
}
UpdateDogzAssistRed();
UpdateDogzEquipPlaceRed();
+ UpdateAssistNumRed();
}
public event Action UpdateAssistDogzEvent;
@@ -575,6 +607,11 @@
private void SendPutOffEquip(int equipPlace)
{
+ if(playerPack.GetReaminGridCount(PackType.rptDogzItem) < 1)
+ {
+ SysNotifyMgr.Instance.ShowTip("DogzBagFull");
+ return;
+ }
GetDogzEquipPlaceStates(presentSelectDogz);
CA5C1_tagCMDogzUnEquipItem dogzPutOff = new CA5C1_tagCMDogzUnEquipItem();
dogzPutOff.DogzID = (byte)presentSelectDogz;
@@ -639,6 +676,23 @@
}
dogzItemList.Sort(CompareByDogzItemPack);
return dogzItemList;
+ }
+
+ public int GetDogzPackMatNum()
+ {
+ SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptDogzItem);
+ if (singlePack == null) return 0;
+
+ int num = 0;
+ Dictionary<int, ItemModel> pairs = singlePack.GetPackModelIndexDict();
+ foreach (var value in pairs.Values)
+ {
+ if(value.chinItemModel.EquipPlace == 0)
+ {
+ num += 1;
+ }
+ }
+ return num;
}
public bool IsReachSelectCondi(int itemId)
@@ -708,6 +762,12 @@
y = end.equipScore;
if (x.CompareTo(y) != 0) return -x.CompareTo(y);
+ List<int> strenglist = start.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
+ x = strenglist != null ? strenglist[0] : 0;
+ strenglist = end.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
+ y = strenglist != null ? strenglist[0] : 0;
+ if (x.CompareTo(y) != 0) return -x.CompareTo(y);
+
return 0;
}
#endregion
diff --git a/System/Dogz/DogzPackCell.cs b/System/Dogz/DogzPackCell.cs
index e942d72..01b6a55 100644
--- a/System/Dogz/DogzPackCell.cs
+++ b/System/Dogz/DogzPackCell.cs
@@ -1,30 +1,41 @@
-锘縰sing Snxxz.UI;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.UI;
-namespace EnhancedUI.EnhancedScroller
-{
- public class DogzPackCell : ScrollerUI
- {
- [SerializeField] List<DogzItemCell> dogzItemlist;
- DogzPackModel m_Model;
- DogzPackModel model
- {
- get
- {
- return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DogzPackModel>());
- }
- }
- public override void Refresh(CellView cell)
- {
- var _line = cell.index;
- for (int i = 0; i < 4; i++)
- {
- var _index = _line * 4 + i;
- dogzItemlist[i].Display(_index);
- }
- }
- }
-}
-
+锘縰sing Snxxz.UI;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+namespace EnhancedUI.EnhancedScroller
+{
+ public class DogzPackCell : ScrollerUI
+ {
+ [SerializeField] List<DogzItemCell> dogzItemlist;
+ DogzModel m_Model;
+ DogzModel model
+ {
+ get
+ {
+ return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DogzModel>());
+ }
+ }
+ public override void Refresh(CellView cell)
+ {
+ var _line = cell.index;
+ for (int i = 0; i < 4; i++)
+ {
+ var _index = _line * 4 + i;
+ dogzItemlist[i].gameObject.SetActive(true);
+ if (model.SelectDogzItemQuality == 0
+ && model.SelectDogzItemStart == 0)
+ {
+ int hideIndex = model.DogzPackGridCnt - model.GetDogzPackMatNum();
+ if (_index >= hideIndex)
+ {
+ dogzItemlist[i].gameObject.SetActive(false);
+ }
+ }
+
+ dogzItemlist[i].Display(_index);
+ }
+ }
+ }
+}
+
diff --git a/System/Dogz/DogzPackWin.cs b/System/Dogz/DogzPackWin.cs
index c0d3400..5e08485 100644
--- a/System/Dogz/DogzPackWin.cs
+++ b/System/Dogz/DogzPackWin.cs
@@ -208,14 +208,7 @@
}
else
{
- ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("DogzFunc101"), (bool isOk)=>
- {
- if(isOk)
- {
-
- }
- return;
- });
+ ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("DogzFunc101"));
}
}
@@ -274,12 +267,28 @@
}
else
{
+ int putStrenLv = 0;
+ if (itemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus) != null)
+ {
+ putStrenLv = itemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus)[0];
+ }
+
+ int selectStrenLv = 0;
+ if (selectModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus) != null)
+ {
+ selectStrenLv = selectModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus)[0];
+ }
+
if (itemModel.chinItemModel.ItemColor < selectModel.chinItemModel.ItemColor
|| (itemModel.chinItemModel.StarLevel < selectModel.chinItemModel.StarLevel
&& itemModel.chinItemModel.ItemColor == selectModel.chinItemModel.ItemColor)
|| (itemModel.equipScore < selectModel.equipScore
&& itemModel.chinItemModel.ItemColor == selectModel.chinItemModel.ItemColor
- && itemModel.chinItemModel.StarLevel == selectModel.chinItemModel.StarLevel))
+ && itemModel.chinItemModel.StarLevel == selectModel.chinItemModel.StarLevel)
+ ||(itemModel.equipScore == selectModel.equipScore
+ && itemModel.chinItemModel.ItemColor == selectModel.chinItemModel.ItemColor
+ && itemModel.chinItemModel.StarLevel == selectModel.chinItemModel.StarLevel
+ && putStrenLv < selectStrenLv))
{
indexlist.Add(dogzModel.selectEquipPlacelist[0].itemInfo.ItemPlace);
}
@@ -290,6 +299,19 @@
{
dogzModel.SendPutOnEquip(indexlist);
}
+ else
+ {
+ if(dogzModel.GetDogzEquips(dogzModel.presentSelectDogz) != null
+ && dogzModel.GetDogzEquips(dogzModel.presentSelectDogz).Count == 5)
+ {
+ SysNotifyMgr.Instance.ShowTip("DogzOneKeyBest");
+ }
+ else
+ {
+ SysNotifyMgr.Instance.ShowTip("DogzOneKeyNone");
+ }
+
+ }
}
private void ClickStarSelect()
diff --git a/System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs b/System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs
index aabec27..e90959c 100644
--- a/System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs
+++ b/System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs
@@ -116,7 +116,7 @@
if (_isUnLocked)
{
var config = Config.Instance.Get<DogzDungeonConfig>(bossId);
- var refreshTime = DateTime.Now;
+ var refreshTime = TimeUtility.ServerNow;
switch (config.MonsterType)
{
case 1:
@@ -135,9 +135,9 @@
break;
}
- if (refreshTime > DateTime.Now)
+ if (refreshTime > TimeUtility.ServerNow)
{
- m_CoolDown.Begin(refreshTime, OnBossCoolDownCompleted);
+ m_CoolDown.Begin((int)(refreshTime - TimeUtility.ServerNow).TotalSeconds, OnBossCoolDownCompleted);
}
else
{
diff --git a/System/DogzDungeon/DogzDungeonModel.cs b/System/DogzDungeon/DogzDungeonModel.cs
index bf03d63..3aaddb9 100644
--- a/System/DogzDungeon/DogzDungeonModel.cs
+++ b/System/DogzDungeon/DogzDungeonModel.cs
@@ -396,7 +396,7 @@
public void UpdateBoxRefreshTime(int _seconds)
{
- refreshTime = DateTime.Now + new TimeSpan(_seconds * TimeSpan.TicksPerSecond);
+ refreshTime = TimeUtility.ServerNow + new TimeSpan(_seconds * TimeSpan.TicksPerSecond);
if (refreshTimeEvent != null)
{
refreshTimeEvent();
@@ -428,7 +428,7 @@
public void UpdateEliteRefreshTime(int _seconds)
{
- refreshTime = DateTime.Now + new TimeSpan(_seconds * TimeSpan.TicksPerSecond);
+ refreshTime = TimeUtility.ServerNow + new TimeSpan(_seconds * TimeSpan.TicksPerSecond);
if (refreshTimeEvent != null)
{
refreshTimeEvent();
diff --git a/System/Dungeon/DungeonAncientTargetWin.cs b/System/Dungeon/DungeonAncientTargetWin.cs
index 98be4e3..73d9205 100644
--- a/System/Dungeon/DungeonAncientTargetWin.cs
+++ b/System/Dungeon/DungeonAncientTargetWin.cs
@@ -1,57 +1,55 @@
-锘縰sing System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.UI;
-
-namespace Snxxz.UI
-{
- public class DungeonAncientTargetWin : Window
- {
- [SerializeField] Text m_DungeonName;
- [SerializeField] DungeonTargetBehaviour m_DungeonTargetBehaviour;
-
- DungeonModel m_Model;
- DungeonModel model
- {
- get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DungeonModel>()); }
- }
-
- protected override void AddListeners()
- {
- }
-
- protected override void BindController()
- {
- }
-
- protected override void OnAfterClose()
- {
- }
-
- protected override void OnAfterOpen()
- {
- }
-
- protected override void OnPreClose()
- {
- //model.updateMissionEvent -= UpdateTargets;
- }
-
- protected override void OnPreOpen()
- {
- //model.updateMissionEvent += UpdateTargets;
- var line = PlayerDatas.Instance.baseData.FBID + 1;
- m_DungeonName.text = StringUtility.Contact(Language.Get("AncientBattle"), "锛�", Language.Get("FBLine", line), "锛�");
- m_DungeonTargetBehaviour.Init(31160);
- //UpdateTargets();
- }
-
- private void UpdateTargets()
- {
- //var _help = model.mission;
- //m_DungeonTargets[0].text = _help.topName;
- //m_DungeonTargets[1].text = UIHelper.ReplaceLargeNum(_help.topScore);
- }
- }
-}
-
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI
+{
+ public class DungeonAncientTargetWin : Window
+ {
+ [SerializeField] List<Text> m_DungeonTargets;
+ [SerializeField] DungeonTargetBehaviour m_DungeonTargetBehaviour;
+
+ DungeonModel m_Model;
+ DungeonModel model
+ {
+ get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DungeonModel>()); }
+ }
+
+ protected override void AddListeners()
+ {
+ }
+
+ protected override void BindController()
+ {
+ }
+
+ protected override void OnAfterClose()
+ {
+ }
+
+ protected override void OnAfterOpen()
+ {
+ }
+
+ protected override void OnPreClose()
+ {
+ model.updateMissionEvent -= UpdateTargets;
+ }
+
+ protected override void OnPreOpen()
+ {
+ model.updateMissionEvent += UpdateTargets;
+ m_DungeonTargetBehaviour.Init(31160);
+ UpdateTargets();
+ }
+
+ private void UpdateTargets()
+ {
+ var _help = model.mission;
+ m_DungeonTargets[0].text = _help.topName;
+ m_DungeonTargets[1].text = UIHelper.ReplaceLargeNum(_help.topScore);
+ }
+ }
+}
+
diff --git a/System/Dungeon/DungeonBossBriefInfoBehaviour.cs b/System/Dungeon/DungeonBossBriefInfoBehaviour.cs
index cc035e4..be3a296 100644
--- a/System/Dungeon/DungeonBossBriefInfoBehaviour.cs
+++ b/System/Dungeon/DungeonBossBriefInfoBehaviour.cs
@@ -57,7 +57,7 @@
{
if (!bossInfo.IsBossAlive())
{
- m_RebornTime.Begin(bossInfo.refreshTime);
+ m_RebornTime.Begin((int)(bossInfo.refreshTime - TimeUtility.ServerNow).TotalSeconds);
}
else
{
@@ -92,7 +92,7 @@
}
}
- var rebornAtOnce = bossInfo.refreshTime < DateTime.Now && !isAlive;
+ var rebornAtOnce = bossInfo.refreshTime < TimeUtility.ServerNow && !isAlive;
if (rebornAtOnce)
{
diff --git a/System/Dungeon/DungeonFightWin.cs b/System/Dungeon/DungeonFightWin.cs
index 909441b..e4aded4 100644
--- a/System/Dungeon/DungeonFightWin.cs
+++ b/System/Dungeon/DungeonFightWin.cs
@@ -27,7 +27,6 @@
[SerializeField] RectTransform m_ContainerResPoint;
[SerializeField] RectTransform m_ContainerAncient;
[SerializeField] Button m_AncientBtn;
- [SerializeField] Button m_AncientKing;
[SerializeField] DungeonItemCollect m_ItemCollect;
[SerializeField] DungeonGuardSkyBehaviour m_GuardSky;
[SerializeField] DungeonBossBriefInfoContainer m_BossInfosContainer;
@@ -56,7 +55,6 @@
{
m_ExitDungeon.AddListener(ExitDungeon);
m_AncientBtn.onClick.AddListener(OnAncientBtn);
- m_AncientKing.onClick.AddListener(AncientKing);
}
protected override void OnPreOpen()
@@ -319,18 +317,6 @@
else
{
WindowCenter.Instance.Open<DungeonAncientAchieveWin>();
- }
- }
-
- private void AncientKing()
- {
- if (WindowCenter.Instance.IsOpen<DungeonAncientKingWin>())
- {
- WindowCenter.Instance.CloseImmediately<DungeonAncientKingWin>();
- }
- else
- {
- WindowCenter.Instance.Open<DungeonAncientKingWin>();
}
}
diff --git a/System/Dungeon/DungeonInspireWin.cs b/System/Dungeon/DungeonInspireWin.cs
index dac466b..aef7747 100644
--- a/System/Dungeon/DungeonInspireWin.cs
+++ b/System/Dungeon/DungeonInspireWin.cs
@@ -170,17 +170,35 @@
money = PlayerDatas.Instance.baseData.GoldPaper + PlayerDatas.Instance.baseData.Gold;
break;
}
- if (money < model.GetDungeonInspireCost(fairyInspireConfig)
- && !InGuiding())
+ var cost = model.GetDungeonInspireCost(fairyInspireConfig);
+ if (money < cost && !InGuiding())
{
WindowCenter.Instance.Open<RechargeTipWin>();
}
else
{
- CA508_tagCMDoFBAction pak = new CA508_tagCMDoFBAction();
- pak.ActionType = 0;
- pak.ActionInfo = (uint)fairyInspireConfig.InspireType;
- GameNetSystem.Instance.SendInfo(pak);
+ bool mix = fairyInspireConfig.InspireType == 5 && PlayerDatas.Instance.baseData.GoldPaper < cost
+ && PlayerDatas.Instance.baseData.GoldPaper > 0;
+ var fairyCost = fairyInspireConfig.InspireType == 5 ? cost - PlayerDatas.Instance.baseData.GoldPaper : cost;
+ if (fairyCost > 0 && (!model.inspireRemindEffective || !model.inspireNoRemind))
+ {
+ ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"),
+ mix ? Language.Get("InspireRemind1", fairyCost, PlayerDatas.Instance.baseData.GoldPaper)
+ : Language.Get("InspireRemind2", fairyCost),
+ Language.Get("InspireNoMention"), (bool isOk, bool toggle) =>
+ {
+ if (isOk)
+ {
+ SendInspire(fairyInspireConfig.InspireType);
+ }
+ model.inspireNoRemind = toggle;
+ model.inspireRemindEffective = isOk;
+ }, model.inspireNoRemind);
+ }
+ else
+ {
+ SendInspire(fairyInspireConfig.InspireType);
+ }
}
}
else if (coinInspire)
@@ -192,14 +210,19 @@
}
else
{
- CA508_tagCMDoFBAction pak = new CA508_tagCMDoFBAction();
- pak.ActionType = 0;
- pak.ActionInfo = (uint)coinInspireConfig.InspireType;
- GameNetSystem.Instance.SendInfo(pak);
+ SendInspire(coinInspireConfig.InspireType);
}
}
}
+ void SendInspire(int inspireType)
+ {
+ CA508_tagCMDoFBAction pak = new CA508_tagCMDoFBAction();
+ pak.ActionType = 0;
+ pak.ActionInfo = (uint)inspireType;
+ GameNetSystem.Instance.SendInfo(pak);
+ }
+
private void Cancel()
{
CloseImmediately();
diff --git a/System/Dungeon/DungeonModel.cs b/System/Dungeon/DungeonModel.cs
index d9e518b..7bea571 100644
--- a/System/Dungeon/DungeonModel.cs
+++ b/System/Dungeon/DungeonModel.cs
@@ -97,6 +97,9 @@
public int[] guardSkyBuffIds { get; private set; }
public int[] guardSkyGuardNpcs { get; private set; }
+ public bool inspireNoRemind { get; set; }
+ public bool inspireRemindEffective { get; set; }
+
public int cacheGradeMap = 0;
public bool gradeTween = true;
@@ -595,6 +598,8 @@
dungeonCoolDowns.Clear();
m_Mission = default(DungeonMissionData);
dungeonInspireCounts.Clear();
+ inspireRemindEffective = false;
+ inspireNoRemind = false;
}
public void UpdateRecords(HA320_tagMCPlayerFBInfoData.tagMCFBInfo[] _serverInfos)
diff --git a/System/Dungeon/DungeonNuwaVictoryWin.cs b/System/Dungeon/DungeonNuwaVictoryWin.cs
index 3d75273..a90d1c6 100644
--- a/System/Dungeon/DungeonNuwaVictoryWin.cs
+++ b/System/Dungeon/DungeonNuwaVictoryWin.cs
@@ -153,7 +153,10 @@
Serveritem.Clear();
var merged = false;
var serveritems = dungeonModel.dungeonResult.itemInfo;
-
+ if (serveritems== null)
+ {
+ return;
+ }
for (int i = 0; i < serveritems.Length; i++)
{
Serveritem.Add(serveritems[i]);
diff --git a/System/Dungeon/TrialDungeonModel.cs b/System/Dungeon/TrialDungeonModel.cs
index 46b97dc..4ed9cd6 100644
--- a/System/Dungeon/TrialDungeonModel.cs
+++ b/System/Dungeon/TrialDungeonModel.cs
@@ -22,12 +22,19 @@
bool serverInited = false;
public const int TRIALEXCHANGE_GUIDE = 91;
+
+ int m_TrialExchangeRemindLevel = 250;
+ public int trialExchangeRemindLevel
+ {
+ get { return m_TrialExchangeRemindLevel; }
+ }
public override void Init()
{
ParseConfig();
packModel.RefreshItemCountAct += RefreshItemCountAct;
FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
dungeonModel.dungeonRecordChangeEvent += DungeonRecordChangeEvent;
+ PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
}
private void DungeonRecordChangeEvent(int _dungeonId)
@@ -105,10 +112,27 @@
dict.Add(trialRewards[i].grade, items);
}
}
+
+ funcConfig = Config.Instance.Get<FuncConfigConfig>("MunekadoRedPoint");
+ if (funcConfig != null)
+ {
+ m_TrialExchangeRemindLevel = int.Parse(funcConfig.Numerical1);
+ }
}
public override void UnInit()
{
+ PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= PlayerDataRefreshInfoEvent;
+ }
+
+ private void PlayerDataRefreshInfoEvent(PlayerDataRefresh refreshType)
+ {
+ if (refreshType == PlayerDataRefresh.LV ||
+ refreshType == PlayerDataRefresh.LV2 ||
+ refreshType == PlayerDataRefresh.LVEx)
+ {
+ UpdateRedpoint();
+ }
}
private void RefreshItemCountAct(PackType packType, int arg2, int itemId)
@@ -277,6 +301,7 @@
var dict = singlepack.GetPackModelIndexDict();
if (dict != null)
{
+ var badCompare = 1;
foreach (var itemModel in dict.Values)
{
if (itemModel.chinItemModel.EquipPlace == config.EquipPlace
@@ -285,11 +310,19 @@
&& !ModelCenter.Instance.GetModel<PackModelInterface>().IsOverdue(itemModel.itemInfo.ItemGUID, itemModel.itemId, itemModel.useDataDict))
{
var compare = EquipCompare(itemModel, config);
- if (compare == -1 || compare == 0)
+ if (compare == 0)
+ {
+ badCompare = compare;
+ }
+ if (compare == -1)
{
return compare;
}
}
+ }
+ if (badCompare == 0)
+ {
+ return badCompare;
}
}
}
@@ -350,7 +383,8 @@
void UpdateRedpoint()
{
dailyQuestModel.trialExchangeRedpoint.state = RedPointState.None;
- if (!FuncOpen.Instance.IsFuncOpen(88))
+ if (!FuncOpen.Instance.IsFuncOpen(88) ||
+ PlayerDatas.Instance.baseData.LV >= trialExchangeRemindLevel)
{
return;
}
@@ -435,6 +469,10 @@
public bool IsAnySatisfyExchangeBetter(int _itemId)
{
+ if (PlayerDatas.Instance.baseData.LV >= trialExchangeRemindLevel)
+ {
+ return false;
+ }
if (!trialTokens.Contains(_itemId))
{
return false;
diff --git a/System/Dungeon/TrialExchangeBehaviour.cs b/System/Dungeon/TrialExchangeBehaviour.cs
index 46ead02..834612d 100644
--- a/System/Dungeon/TrialExchangeBehaviour.cs
+++ b/System/Dungeon/TrialExchangeBehaviour.cs
@@ -120,7 +120,8 @@
m_Down.gameObject.SetActive(equipCompare == -1);
var exchangeItemConfig = Config.Instance.Get<ItemConfig>(model.GetExchangeItemByJob(config));
- m_Redpoint.gameObject.SetActive(count >= config.tokenCount && (equipBetter || exchangeItemConfig.EquipPlace == 0));
+ m_Redpoint.gameObject.SetActive(count >= config.tokenCount && (equipBetter || exchangeItemConfig.EquipPlace == 0)
+ && PlayerDatas.Instance.baseData.LV < model.trialExchangeRemindLevel);
}
}
}
diff --git a/System/FairylandCeremony/CeremonyCoolTime.cs b/System/FairylandCeremony/CeremonyCoolTime.cs
new file mode 100644
index 0000000..6ce7bd0
--- /dev/null
+++ b/System/FairylandCeremony/CeremonyCoolTime.cs
@@ -0,0 +1,35 @@
+锘縰sing UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI
+{
+
+ public class CeremonyCoolTime : MonoBehaviour
+ {
+ [SerializeField] Text m_Time;
+
+ private void OnEnable()
+ {
+ GlobalTimeEvent.Instance.secondEvent += RefreshSecond;
+ RefreshSecond();
+ }
+
+ private void OnDisable()
+ {
+ GlobalTimeEvent.Instance.secondEvent -= RefreshSecond;
+ }
+
+ private void RefreshSecond()
+ {
+ int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.FairyCeremony);
+ if (seconds > 0)
+ {
+ m_Time.text = StringUtility.Contact("<color=#8DDC11FF>", TimeUtility.SecondsToHMS(seconds), "</color>");
+ }
+ else
+ {
+ m_Time.text = UIHelper.GetTextColorByItemColor(TextColType.Red, Language.Get("XMZZ110"));
+ }
+ }
+ }
+}
diff --git a/Fight/Stage/PaintMapLine.cs.meta b/System/FairylandCeremony/CeremonyCoolTime.cs.meta
similarity index 75%
rename from Fight/Stage/PaintMapLine.cs.meta
rename to System/FairylandCeremony/CeremonyCoolTime.cs.meta
index 28bbf6d..13db25f 100644
--- a/Fight/Stage/PaintMapLine.cs.meta
+++ b/System/FairylandCeremony/CeremonyCoolTime.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 9202015b1077a91488a691347bdeafae
-timeCreated: 1508832157
+guid: b611da4d8aa2ca943b69485ca6f3d2a6
+timeCreated: 1538223260
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/System/FairylandCeremony/CeremonyFirepartyWin.cs b/System/FairylandCeremony/CeremonyFirepartyWin.cs
index b4c65d0..4963482 100644
--- a/System/FairylandCeremony/CeremonyFirepartyWin.cs
+++ b/System/FairylandCeremony/CeremonyFirepartyWin.cs
@@ -9,6 +9,7 @@
public class CeremonyFirepartyWin : Window
{
[SerializeField] Button buyBtn;
+ [SerializeField] Text buyPriceText;
[SerializeField] Text remainTimeText;
[SerializeField] CommonItemBaisc fireItem;
[SerializeField] List<CommonItemBaisc> itemBaiscs = new List<CommonItemBaisc>();
@@ -17,6 +18,8 @@
ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } }
PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
+ StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
+
StoreConfig storeConfig;
protected override void BindController()
{
@@ -54,6 +57,7 @@
storeConfig = ceremonyModel.GetFireIdByLv();
if (storeConfig == null) return;
+ buyPriceText.text = storeConfig.MoneyNumber.ToString();
ItemCellModel fireModel = new ItemCellModel(storeConfig.ItemID,true,(ulong)storeConfig.ItemCnt,storeConfig.IsBind);
fireItem.Init(fireModel);
fireItem.cellBtn.AddListener(() =>
@@ -108,15 +112,8 @@
SysNotifyMgr.Instance.ShowTip("BagFull");
return;
}
-
- if(ceremonyModel.CheckIsBuyFireCondi())
- {
- ModelCenter.Instance.GetModel<StoreModel>().SendBuyShopItem(storeConfig,1);
- }
- else
- {
- WindowCenter.Instance.Open<RechargeTipWin>();
- }
+ storeModel.OnClickShopCell(storeConfig);
}
+
}
}
diff --git a/System/FairylandCeremony/FairylandCeremonyModel.cs b/System/FairylandCeremony/FairylandCeremonyModel.cs
index 0abda25..7d5dee6 100644
--- a/System/FairylandCeremony/FairylandCeremonyModel.cs
+++ b/System/FairylandCeremony/FairylandCeremonyModel.cs
@@ -326,10 +326,10 @@
return null;
}
- public bool CheckIsBuyFireCondi(int buyNum = 1)
+ public bool CheckIsBuyFireCondi(StoreConfig storeConfig,int buyNum = 1)
{
- ulong price =(ulong)(80 * buyNum);
- if(UIHelper.GetMoneyCnt(1) >= price)
+ ulong price =(ulong)(storeConfig.MoneyNumber * buyNum);
+ if(UIHelper.GetMoneyCnt(storeConfig.MoneyType) >= price)
{
return true;
}
diff --git a/System/FairylandCeremony/FairylandCeremonyWin.cs b/System/FairylandCeremony/FairylandCeremonyWin.cs
index 1ec7a7f..f785c41 100644
--- a/System/FairylandCeremony/FairylandCeremonyWin.cs
+++ b/System/FairylandCeremony/FairylandCeremonyWin.cs
@@ -15,6 +15,8 @@
[SerializeField] Button rightBtn;
[SerializeField] Button closeBtn;
+ FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } }
+
protected override void BindController()
{
@@ -38,6 +40,17 @@
protected override void OnActived()
{
base.OnActived();
+ if(!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0)
+ {
+ if(ceremonyModel.rechargeRedp.state == RedPointState.Simple)
+ {
+ functionOrder = rechargeFunc.order;
+ }
+ else if(ceremonyModel.peopleRedp.state == RedPointState.Simple)
+ {
+ functionOrder = peopleToHiFunc.order;
+ }
+ }
funcBtnGroup.TriggerByOrder(functionOrder);
}
diff --git a/System/FairylandCeremony/ToHiTaskCell.cs b/System/FairylandCeremony/ToHiTaskCell.cs
index 091b04c..1fb1bf4 100644
--- a/System/FairylandCeremony/ToHiTaskCell.cs
+++ b/System/FairylandCeremony/ToHiTaskCell.cs
@@ -29,6 +29,7 @@
public void Init(AllPeoplePartyConfig taskConfig)
{
+ activeNameText.gameObject.SetActive(false);
this.taskConfig = taskConfig;
activeIcon.SetSprite(taskConfig.IconKey);
SetTaskState(ceremonyModel.GetPeopleTaskTimesById(taskConfig.ID),taskConfig.TotalTimes);
diff --git a/System/FindPrecious/DemonJarBossRebornCoolDown.cs b/System/FindPrecious/DemonJarBossRebornCoolDown.cs
index 984600e..64b8250 100644
--- a/System/FindPrecious/DemonJarBossRebornCoolDown.cs
+++ b/System/FindPrecious/DemonJarBossRebornCoolDown.cs
@@ -48,8 +48,8 @@
if (!bossInfo.IsBossAlive())
{
- m_Timer.Begin(bossInfo.refreshTime);
- m_Timer.timeShow.color = demonJarModel.GetSurplusTimes() > 0 ? UIHelper.GetUIColor(TextColType.Green) : UIHelper.GetUIColor(TextColType.Red);
+ m_Timer.Begin((int)(bossInfo.refreshTime - TimeUtility.ServerNow).TotalSeconds);
+ m_Timer.timeShow.color = UIHelper.GetUIColor(demonJarModel.GetSurplusTimes() > 0 ? TextColType.Green : TextColType.Red);
}
}
else
@@ -60,7 +60,7 @@
private void OnDungeonRecodChange(int _dataMapId)
{
- m_Timer.timeShow.color = demonJarModel.GetSurplusTimes() > 0 ? UIHelper.GetUIColor(TextColType.Green) : UIHelper.GetUIColor(TextColType.Red);
+ m_Timer.timeShow.color = UIHelper.GetUIColor(demonJarModel.GetSurplusTimes() > 0 ? TextColType.Green : TextColType.Red);
}
}
diff --git a/System/FindPrecious/DemonJarWin.cs b/System/FindPrecious/DemonJarWin.cs
index d6186d2..3f26a7f 100644
--- a/System/FindPrecious/DemonJarWin.cs
+++ b/System/FindPrecious/DemonJarWin.cs
@@ -310,7 +310,7 @@
if (dungeonModel.TryGetCountRemainTime(DemonJarModel.DEMONJAR_MAPID, out endTime))
{
m_CountRemainTime.gameObject.SetActive(true);
- m_CountRemainTime.Begin(endTime);
+ m_CountRemainTime.Begin((int)(endTime - TimeUtility.ServerNow).TotalSeconds);
}
else
{
@@ -383,15 +383,14 @@
m_BossIntroduce.Display(_bossId, false);
m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(_bossId);
- var npcConfig = Config.Instance.Get<NPCConfig>(_bossId);
- m_RewardDescription.text = Language.Get(npcConfig.NPCLV >= GeneralConfig.Instance.demonJarLevelLimit ? "FindPrecious_13" : "FindPrecious_18");
-
DemonJarBossData bossData;
model.TryGetBossData(_bossId, out bossData);
var npcDropConfig = Config.Instance.Get<NPCDropItemConfig>(bossData.id);
m_SurpassLevel.gameObject.SetActive(npcDropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > npcDropConfig.MaxLV);
var demonJarConfig = Config.Instance.Get<DemonJarConfig>(model.selectedBoss);
+ m_RewardDescription.text = Language.Get(demonJarConfig.RewardDescription);
+
var doubleShowable = demonJarConfig.CanEnterTimes == 0;
m_ContainerDouble.gameObject.SetActive(doubleShowable);
if (doubleShowable)
diff --git a/System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs b/System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs
index 3fc5010..3decfaa 100644
--- a/System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs
+++ b/System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs
@@ -51,7 +51,7 @@
FindPreciousModel.BossInfo bossInfo = null;
if (findPreciousModel.TryGetBossInfo(bossId, out bossInfo))
{
- return !findPreciousModel.IsBossAlive(bossId) && DateTime.Now > bossInfo.refreshTime;
+ return !findPreciousModel.IsBossAlive(bossId) && TimeUtility.ServerNow > bossInfo.refreshTime;
}
else
{
@@ -142,13 +142,13 @@
FindPreciousModel.BossInfo bossInfo;
if (findPreciousModel.TryGetBossInfo(bossId, out bossInfo) && !bossInfo.IsBossAlive())
{
- if (DateTime.Now > bossInfo.refreshTime)
+ if (TimeUtility.ServerNow > bossInfo.refreshTime)
{
m_CoolDown.gameObject.SetActive(false);
}
else
{
- m_CoolDown.Begin(bossInfo.refreshTime, OnBossCoolDownCompleted);
+ m_CoolDown.Begin((int)(bossInfo.refreshTime - TimeUtility.ServerNow).TotalSeconds, OnBossCoolDownCompleted);
}
}
else
diff --git a/System/FindPrecious/FindPreciousModel.cs b/System/FindPrecious/FindPreciousModel.cs
index ffd808d..90944a6 100644
--- a/System/FindPrecious/FindPreciousModel.cs
+++ b/System/FindPrecious/FindPreciousModel.cs
@@ -189,7 +189,7 @@
}
else
{
- if ((bossInfos[bossId].refreshTime - DateTime.Now).TotalSeconds < PREPOSE_SECONDS)
+ if ((bossInfos[bossId].refreshTime - TimeUtility.ServerNow).TotalSeconds < PREPOSE_SECONDS)
{
AddOneBossRebornNotify(bossId);
}
@@ -484,7 +484,7 @@
}
else
{
- if (IsBossAlive(bossId) || (bossInfos[bossId].refreshTime - DateTime.Now).TotalSeconds < PREPOSE_SECONDS)
+ if (IsBossAlive(bossId) || (bossInfos[bossId].refreshTime - TimeUtility.ServerNow).TotalSeconds < PREPOSE_SECONDS)
{
AddOneBossRebornNotify(bossId);
}
@@ -526,7 +526,7 @@
}
}
- refreshTime = DateTime.Now + new TimeSpan(_bossInfo.RefreshSecond * TimeSpan.TicksPerSecond);
+ refreshTime = TimeUtility.ServerNow + new TimeSpan(_bossInfo.RefreshSecond * TimeSpan.TicksPerSecond);
}
public bool IsBossAlive()
diff --git a/System/FindPrecious/FindPreciousTimer.cs b/System/FindPrecious/FindPreciousTimer.cs
index 8626479..b08d548 100644
--- a/System/FindPrecious/FindPreciousTimer.cs
+++ b/System/FindPrecious/FindPreciousTimer.cs
@@ -51,7 +51,7 @@
for (int i = bossIds.Count - 1; i >= 0; i--)
{
var clock = clocks[bossIds[i]];
- if ((clock.rebornTime - DateTime.Now).TotalSeconds < FindPreciousModel.PREPOSE_SECONDS)
+ if ((clock.rebornTime - TimeUtility.ServerNow).TotalSeconds < FindPreciousModel.PREPOSE_SECONDS)
{
clocks.Remove(bossIds[i]);
bossIds.RemoveAt(i);
@@ -68,7 +68,7 @@
private bool IsValidClockSetting(DateTime _rebornTime)
{
- return (_rebornTime - DateTime.Now).TotalSeconds >= FindPreciousModel.PREPOSE_SECONDS;
+ return (_rebornTime - TimeUtility.ServerNow).TotalSeconds >= FindPreciousModel.PREPOSE_SECONDS;
}
public class BossRebornClock
diff --git a/System/FriendSystem/MailAllModel.cs b/System/FriendSystem/MailAllModel.cs
index 61414ad..afee47a 100644
--- a/System/FriendSystem/MailAllModel.cs
+++ b/System/FriendSystem/MailAllModel.cs
@@ -63,20 +63,28 @@
}
AwardExchangeModel exchangeModel { get { return ModelCenter.Instance.GetModel<AwardExchangeModel>(); } }
-
+ bool isLogin = true;
public MailAllModel()
{
DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += BeforePlayerDataInit;
+ DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOk;
}
private void BeforePlayerDataInit()
{
+ isLogin = true;
funcType = MailFuncType.Mail;
mailModelDict.Clear();
timeOrderMailInfo.Clear();
mailTitleStr = "";
mailContentstr = "";
mailSendPersonStr = "";
+ }
+
+
+ private void OnPlayerLoginOk()
+ {
+ isLogin = false;
}
public MailFuncType funcType = MailFuncType.Mail;
@@ -171,6 +179,16 @@
{
exchangeModel.SetAwardExchangeModel(info.Items);
}
+
+ if(!isLogin)
+ {
+ if (info.Count > 0 || info.Gold > 0 || info.GoldPaper > 0
+ || info.Silver > 0)
+ {
+ SoundPlayer.Instance.PlayUIAudio(740);
+ }
+ }
+
}
}
addMailCnt = mailModelDict.Count - preMailCnt;
diff --git a/System/FriendSystem/MailPanel.cs b/System/FriendSystem/MailPanel.cs
index 6f3529d..b0ba6ed 100644
--- a/System/FriendSystem/MailPanel.cs
+++ b/System/FriendSystem/MailPanel.cs
@@ -94,6 +94,8 @@
get { return _modelInterface ?? (_modelInterface = ModelCenter.Instance.GetModel<PackModelInterface>()); }
}
+ DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
+
private void Awake()
{
Init();
@@ -327,6 +329,7 @@
ItemCell itemCell = _reciveItemParent[giftCount].transform.Find("ItemCell").GetComponent<ItemCell>();
if (info.Count > 0 || info.Gold > 0 || info.GoldPaper > 0 || info.Silver > 0)
{
+ _deleteBtn.interactable = false;
_reciveItemParent[giftCount].SetActive(true);
_goldBox.SetActive(true);
_drillBox.SetActive(true);
@@ -625,19 +628,30 @@
int i = 0;
int getBagItemCount = 0;
int getRuneCount = 0;
+ int getDogzCount = 0;
ItemConfig tagChinItem = null;
for (i = 0; i < mailInfo.Count; i++)
{
tagChinItem = Config.Instance.Get<ItemConfig>((int)mailInfo.Items[i].ItemID);
if (tagChinItem != null)
{
- if (tagChinItem.Type == RuneModel.RUNE_TYPE || tagChinItem.Type == RuneModel.RUNE_CREAMTYPE)
+ switch(tagChinItem.Type)
{
- getRuneCount += 1;
- }
- else
- {
- getBagItemCount += 1;
+ case RuneModel.RUNE_TYPE:
+ case RuneModel.RUNE_CREAMTYPE:
+ getRuneCount += 1;
+ break;
+ case (int)ItemType.DogzStrengthMat:
+ case (int)ItemType.DogzEquipType1:
+ case (int)ItemType.DogzEquipType2:
+ case (int)ItemType.DogzEquipType3:
+ case (int)ItemType.DogzEquipType4:
+ case (int)ItemType.DogzEquipType5:
+ getDogzCount += 1;
+ break;
+ default:
+ getBagItemCount += 1;
+ break;
}
}
}
@@ -653,6 +667,11 @@
SysNotifyMgr.Instance.ShowTip("RuneBagFull");
return;
}
+ else if(getDogzCount > playerPack.GetReaminGridCount(PackType.rptDogzItem))
+ {
+ SysNotifyMgr.Instance.ShowTip("DogzBagFull");
+ return;
+ }
CA53B_tagCMRequestCompensation askRecive = new CA53B_tagCMRequestCompensation();
askRecive.GUID = id;
diff --git a/System/KnapSack/Logic/BoxGetItemWin.cs b/System/KnapSack/Logic/BoxGetItemWin.cs
index e2b10ed..8c4ed70 100644
--- a/System/KnapSack/Logic/BoxGetItemWin.cs
+++ b/System/KnapSack/Logic/BoxGetItemWin.cs
@@ -45,7 +45,7 @@
FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } }
[SerializeField] float scaleTime = 0.3f;
-
+ Vector3 startPos = Vector3.zero;
protected override void BindController()
{
@@ -58,12 +58,18 @@
protected override void OnPreOpen()
{
+ startPos = getItemParent.anchoredPosition3D;
WindowCenter.Instance.CloseImmediately<NewItemGetWin>();
//playerPack.ItemCntReduceAct += RefreshUI;
getItem.SetActive(false);
BoxModel.RefreshGetItemAct += RefreshGetIem;
backBtn.AddListener(ClickBackBtn);
ShowUICtrl();
+ }
+
+ protected override void OnActived()
+ {
+ UpdateFireEffect();
}
protected override void OnAfterOpen()
@@ -91,6 +97,33 @@
private void RefreshGetIem(int useId, int useCnt, BoxGetItemInfo[] info)
{
ShowUICtrl();
+ }
+
+ private void UpdateFireEffect()
+ {
+ if (BoxModel.getItems == null) return;
+
+ bool isFireBox = false;
+ foreach (var key in ceremonyModel.fireDict.Keys)
+ {
+ StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(ceremonyModel.fireDict[key]);
+ if (storeConfig != null)
+ {
+ if (storeConfig.ItemID == BoxModel.itemId)
+ {
+ isFireBox = true;
+ if (!fireEffect.IsPlaying)
+ {
+ fireEffect.Play();
+ return;
+ }
+ }
+ }
+ }
+ if(!isFireBox)
+ {
+ fireEffect.Stop();
+ }
}
private void ShowUICtrl()
@@ -126,27 +159,6 @@
{
getCoinsText.gameObject.SetActive(false);
}
-
- foreach(var key in ceremonyModel.fireDict.Keys)
- {
- StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(ceremonyModel.fireDict[key]);
- if(storeConfig != null)
- {
- if(storeConfig.ItemID == BoxModel.itemId)
- {
- if (!fireEffect.IsPlaying)
- {
- fireEffect.Play();
- return;
- }
- }
- }
- }
-
- if (fireEffect.IsPlaying)
- {
- fireEffect.Stop();
- }
}
private void RefreshUI(PackType type, int index, int id)
@@ -160,6 +172,7 @@
private void CreateGetItem()
{
+ getItemParent.anchoredPosition3D = startPos;
DestroyGetItemlist();
GetItemlist.Clear();
getItemBasiclist.Clear();
diff --git a/System/KnapSack/Logic/EquipDevourWin.cs b/System/KnapSack/Logic/EquipDevourWin.cs
index 0319510..dbc6b37 100644
--- a/System/KnapSack/Logic/EquipDevourWin.cs
+++ b/System/KnapSack/Logic/EquipDevourWin.cs
@@ -50,6 +50,7 @@
PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
+ PackModelInterface modelInterface { get { return ModelCenter.Instance.GetModel<PackModelInterface>(); } }
List<ItemModel> devourModellist;
bool isOpen = true;
@@ -587,6 +588,8 @@
public void SendEquipdevourQuest()
{
+ if (!modelInterface.isPackResetOk) return;
+
playerPack.isAutoDecompose = false;
CA32C_tagCMEquipDecompose _petEat = new CA32C_tagCMEquipDecompose();
diff --git a/System/KnapSack/Logic/EquipTip.cs b/System/KnapSack/Logic/EquipTip.cs
index af66ee9..a9868d4 100644
--- a/System/KnapSack/Logic/EquipTip.cs
+++ b/System/KnapSack/Logic/EquipTip.cs
@@ -576,6 +576,18 @@
washAttr.SetActive(false);
return;
}
+
+ switch (itemAttrData.itemConfig.EquipPlace)
+ {
+ case 101:
+ case 102:
+ case 103:
+ case 104:
+ case 105:
+ washAttr.SetActive(false);
+ return;
+ }
+
curAttrTypeNum = 4;
washAttr.SetActive(true);
washTitleText.text = Language.Get("EquipWin_WashPropObj_Text_1");
@@ -584,12 +596,21 @@
private void SetGemAttrUI()
{
- if (itemAttrData.itemConfig.LV < itemTipsModel.gemOpenLvs[0]
- || itemAttrData.packType == PackType.rptDogzEquip
- || itemAttrData.packType == PackType.rptDogzItem)
+ if (itemAttrData.itemConfig.LV < itemTipsModel.gemOpenLvs[0])
{
gemAttr.SetActive(false);
return;
+ }
+
+ switch (itemAttrData.itemConfig.EquipPlace)
+ {
+ case 101:
+ case 102:
+ case 103:
+ case 104:
+ case 105:
+ gemAttr.SetActive(false);
+ return;
}
curAttrTypeNum = 5;
gemAttr.SetActive(true);
@@ -662,6 +683,17 @@
{
suitAttr.SetActive(false);
return;
+ }
+
+ switch (itemAttrData.itemConfig.EquipPlace)
+ {
+ case 101:
+ case 102:
+ case 103:
+ case 104:
+ case 105:
+ suitAttr.SetActive(false);
+ return;
}
curAttrTypeNum = 6;
suitAttr.SetActive(true);
@@ -846,40 +878,54 @@
private void SetBottomUI()
{
- if(itemAttrData.packType != PackType.rptDogzItem && itemAttrData.packType != PackType.rptDogzEquip)
+ switch (itemAttrData.itemConfig.EquipPlace)
{
- if (dogzEquipDesText != null)
- {
- dogzEquipDesText.gameObject.SetActive(false);
- }
- if (itemAttrData.itemConfig.Description == "" || string.IsNullOrEmpty(itemAttrData.itemConfig.Description))
- {
- equipSourceNormal.gameObject.SetActive(true);
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ case 12:
+ if (dogzEquipDesText != null)
+ {
+ dogzEquipDesText.gameObject.SetActive(false);
+ }
+ if (itemAttrData.itemConfig.Description == "" || string.IsNullOrEmpty(itemAttrData.itemConfig.Description))
+ {
+ equipSourceNormal.gameObject.SetActive(true);
+ equipSourceDes.gameObject.SetActive(false);
+ equipSourceText.gameObject.SetActive(false);
+ SetBottomText(equipSourceNormal);
+ }
+ else
+ {
+ equipSourceNormal.gameObject.SetActive(false);
+ equipSourceDes.gameObject.SetActive(true);
+ equipSourceText.gameObject.SetActive(true);
+ SetBottomText(equipSourceDes);
+ equipSourceText.text = itemAttrData.itemConfig.Description;
+ }
+ break;
+ case 101:
+ case 102:
+ case 103:
+ case 104:
+ case 105:
+ equipSourceNormal.gameObject.SetActive(false);
equipSourceDes.gameObject.SetActive(false);
equipSourceText.gameObject.SetActive(false);
- SetBottomText(equipSourceNormal);
- }
- else
- {
- equipSourceNormal.gameObject.SetActive(false);
- equipSourceDes.gameObject.SetActive(true);
- equipSourceText.gameObject.SetActive(true);
- SetBottomText(equipSourceDes);
- equipSourceText.text = itemAttrData.itemConfig.Description;
- }
+ if (dogzEquipDesText != null)
+ {
+ dogzEquipDesText.gameObject.SetActive(true);
+ dogzEquipDesText.text = itemAttrData.itemConfig.Description;
+ }
+ break;
}
- else
- {
- equipSourceNormal.gameObject.SetActive(false);
- equipSourceDes.gameObject.SetActive(false);
- equipSourceText.gameObject.SetActive(false);
- if (dogzEquipDesText != null)
- {
- dogzEquipDesText.gameObject.SetActive(true);
- dogzEquipDesText.text = itemAttrData.itemConfig.Description;
- }
- }
-
}
private void SetBottomText(EquipSource source)
diff --git a/System/KnapSack/Logic/ItemTipsModel.cs b/System/KnapSack/Logic/ItemTipsModel.cs
index fc8e729..ad44350 100644
--- a/System/KnapSack/Logic/ItemTipsModel.cs
+++ b/System/KnapSack/Logic/ItemTipsModel.cs
@@ -815,9 +815,13 @@
{
case ItemWinType.equipWin:
attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => {
- List<int> indexlist = new List<int>();
- indexlist.Add(attrData.index);
- dogzModel.SendPutOnEquip(indexlist);
+ if(dogzModel.CheckIsPutOn(attrData.itemId))
+ {
+ List<int> indexlist = new List<int>();
+ indexlist.Add(attrData.index);
+ dogzModel.SendPutOnEquip(indexlist);
+ }
+
});
break;
}
diff --git a/System/KnapSack/Logic/PackSendQuestMgr.cs b/System/KnapSack/Logic/PackSendQuestMgr.cs
index be949c2..353732b 100644
--- a/System/KnapSack/Logic/PackSendQuestMgr.cs
+++ b/System/KnapSack/Logic/PackSendQuestMgr.cs
@@ -93,6 +93,9 @@
get { return _suitModel ?? (_suitModel = ModelCenter.Instance.GetModel<PlayerSuitModel>()); }
}
+ DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
+
+
#region 鍙戦�佺┛鎴磋澶囩殑璇锋眰
ItemConfig sendItemConfig = null;
public ItemModel sendItemModel = null;
@@ -834,6 +837,11 @@
return;
}
+ if(dogzModel.AddAssistItem == itemModel.itemInfo.ItemID)
+ {
+ dogzModel.MakeUseAddAssistNum();
+ return;
+ }
ulong maxValue = 0;
playerPack.IsReachUseLimit(itemModel.itemInfo.ItemGUID, out maxValue);
diff --git a/System/KnapSack/Logic/PlayerPackModels.cs b/System/KnapSack/Logic/PlayerPackModels.cs
index 3d6bc66..8a42104 100644
--- a/System/KnapSack/Logic/PlayerPackModels.cs
+++ b/System/KnapSack/Logic/PlayerPackModels.cs
@@ -1276,6 +1276,9 @@
{
if (model.chinItemModel.ItemColor >= (int)E_ItemColor.Purple)
{
+ PetEatEquipConfig eatEquipConfig = PetEatEquipConfig.GetEquipColorAndEquipClass(model.chinItemModel.ItemColor,model.chinItemModel.LV);
+ if (eatEquipConfig == null) return false;
+
if (modelInterface.IsFightUp(model.itemId, model.equipScore) != 1)
{
if (model.chinItemModel.ItemColor <= (int)colorType
@@ -1395,7 +1398,7 @@
public void SendEquipdevourQuest()
{
List<ItemModel> itemModels = GetCanDevourModellist();
- if (itemModels == null || itemModels.Count < minDecomposeNum) return;
+ if (itemModels == null || itemModels.Count < minDecomposeNum || !modelInterface.isPackResetOk) return;
isAutoDecompose = true;
recordAutoDecomNum = itemModels.Count;
diff --git a/System/KnapSack/New/BatchBuyWin.cs b/System/KnapSack/New/BatchBuyWin.cs
new file mode 100644
index 0000000..d65c5d5
--- /dev/null
+++ b/System/KnapSack/New/BatchBuyWin.cs
@@ -0,0 +1,178 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Friday, September 08, 2017
+//--------------------------------------------------------
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+using TableConfig;
+
+namespace Snxxz.UI
+{
+
+ public class BatchBuyWin : Window
+ {
+ #region 鎴愬憳鍙橀噺
+ private Text _itemName;
+ private Slider _splitSlider;
+ private Text _number;
+ private Button _addBtn;
+ private Button _reduceBtn;
+ private Button _splitBtn;
+ private Button _closeBtn;
+ private ItemCell _itemCell;
+ #endregion
+
+ ItemTipsModel _itemTipsModel;
+ ItemTipsModel itemTipsModel
+ {
+ get
+ {
+ return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
+ }
+ }
+
+ PlayerPackModel _playerPack;
+ PlayerPackModel playerPack
+ {
+ get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
+ }
+
+ PlayerBuffDatas _buffModel;
+ PlayerBuffDatas Buffmodel
+ {
+ get
+ {
+ return _buffModel ?? (_buffModel = ModelCenter.Instance.GetModel<PlayerBuffDatas>());
+ }
+ }
+
+ StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
+ #region Built-in
+ protected override void BindController()
+ {
+ _itemName = transform.Find("ItemNameText").GetComponent<Text>();
+ _number = transform.Find("SplitSlider/Background/Fill/SplitIcon/NumBG/NumText").GetComponent<Text>();
+ _splitSlider = transform.Find("SplitSlider").GetComponent<Slider>();
+ _addBtn = transform.Find("Addbtn").GetComponent<Button>();
+ _splitBtn = transform.Find("Usebtn").GetComponent<Button>();
+ _reduceBtn = transform.Find("Reducebtn").GetComponent<Button>();
+ _closeBtn = transform.Find("Closebtn").GetComponent<Button>();
+ _itemCell = transform.Find("ItemCell").GetComponent<ItemCell>();
+ }
+
+ protected override void AddListeners()
+ {
+ _splitSlider.onValueChanged.RemoveAllListeners();
+ _addBtn.onClick.RemoveAllListeners();
+ _reduceBtn.onClick.RemoveAllListeners();
+ _splitBtn.onClick.RemoveAllListeners();
+ _closeBtn.onClick.RemoveAllListeners();
+
+ _splitSlider.onValueChanged.AddListener(
+
+ delegate
+ {
+ OnSplitValueChange();
+ }
+
+ );
+
+ _addBtn.onClick.AddListener(OnClickAddBtn);
+ _reduceBtn.onClick.AddListener(OnClickReduceBtn);
+ _splitBtn.onClick.AddListener(OnClickBatchUseBtn);
+ _closeBtn.onClick.AddListener(OnClickCloseBtn);
+ }
+
+ protected override void OnPreOpen()
+ {
+ //OpenBatchWin(itemInfoModel.CurItemModel);
+ OpenBatchWin();
+ }
+
+ protected override void OnAfterOpen()
+ {
+ }
+
+ protected override void OnPreClose()
+ {
+ BatchUseModel.Instance.ClearBatchBuyModel();
+ }
+
+ protected override void OnAfterClose()
+ {
+
+ }
+ #endregion
+
+ private void OpenBatchWin()
+ {
+ if (BatchUseModel.Instance.storeConfig == null)
+ return;
+ InitPanel();
+ }
+
+ public void InitPanel()
+ {
+ ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(BatchUseModel.Instance.storeConfig.ItemID);
+ if (itemConfig == null) return;
+
+ ItemCellModel cellModel = new ItemCellModel(itemConfig.ID);
+ _itemCell.Init(cellModel);
+ _itemName.text = itemConfig.ItemName;
+ _splitSlider.minValue = 1;
+ _splitSlider.maxValue = itemConfig.PackCount;
+ OnSplitValueChange();
+ }
+
+ public void OnSplitValueChange()
+ {
+ _number.text = Mathf.Ceil(_splitSlider.value).ToString();
+ }
+
+ public void OnClickAddBtn()
+ {
+ if (_splitSlider.value < _splitSlider.maxValue)
+ {
+ _splitSlider.value++;
+ }
+ }
+
+ public void OnClickReduceBtn()
+ {
+ if (_splitSlider.value > _splitSlider.minValue)
+ {
+ _splitSlider.value--;
+ }
+ }
+
+ public void OnClickBatchUseBtn()
+ {
+ if (BatchUseModel.Instance.storeConfig == null) return;
+
+ if(BatchUseModel.Instance.CheckIsBuy(BatchUseModel.Instance.storeConfig, (int)_splitSlider.value))
+ {
+ storeModel.SendBuyShopItem(BatchUseModel.Instance.storeConfig, (int)_splitSlider.value);
+ OnClickCloseBtn();
+ }
+ else
+ {
+ WindowCenter.Instance.Open<RechargeTipWin>();
+ }
+ }
+
+ public void OnClickCloseBtn()
+ {
+ Close();
+ }
+
+ }
+
+}
+
+
+
+
diff --git a/Fight/Stage/PaintMapLine.cs.meta b/System/KnapSack/New/BatchBuyWin.cs.meta
similarity index 75%
copy from Fight/Stage/PaintMapLine.cs.meta
copy to System/KnapSack/New/BatchBuyWin.cs.meta
index 28bbf6d..df25779 100644
--- a/Fight/Stage/PaintMapLine.cs.meta
+++ b/System/KnapSack/New/BatchBuyWin.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 9202015b1077a91488a691347bdeafae
-timeCreated: 1508832157
+guid: b189f464e250e4545973fbd542fab701
+timeCreated: 1538221287
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/System/KnapSack/New/BatchUseModel.cs b/System/KnapSack/New/BatchUseModel.cs
index b32aaac..aedf4b7 100644
--- a/System/KnapSack/New/BatchUseModel.cs
+++ b/System/KnapSack/New/BatchUseModel.cs
@@ -1,26 +1,55 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Snxxz.UI
-{
- public class BatchUseModel : Singleton<BatchUseModel>
- {
- public string guid{ get; private set; }
- public void SetBatchModel(string guid)
- {
- extraPrams = 0;
- this.maxValue = 0;
- this.guid = guid;
- }
-
- public int extraPrams { get; private set;}
- public int maxValue { get; private set;}
- public void SetExtraInfo(int extraUseInfo,int maxValue)
- {
- this.extraPrams = extraUseInfo;
- this.maxValue = maxValue;
- }
- }
-}
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using TableConfig;
+
+namespace Snxxz.UI
+{
+ public class BatchUseModel : Singleton<BatchUseModel>
+ {
+ #region 鎵归噺浣跨敤鏁版嵁
+ public string guid { get; private set; }
+ public void SetBatchModel(string guid)
+ {
+ extraPrams = 0;
+ this.maxValue = 0;
+ this.guid = guid;
+ }
+
+ public int extraPrams { get; private set; }
+ public int maxValue { get; private set; }
+ public void SetExtraInfo(int extraUseInfo, int maxValue)
+ {
+ this.extraPrams = extraUseInfo;
+ this.maxValue = maxValue;
+ }
+ #endregion
+
+ #region 鎵归噺璐拱鏁版嵁
+ public StoreConfig storeConfig { get; private set; }
+ public void SetBatchBuyModel(StoreConfig _storeConfig)
+ {
+ if (_storeConfig == null) return;
+
+ storeConfig = _storeConfig;
+ WindowCenter.Instance.Open<BatchBuyWin>();
+ }
+
+ public bool CheckIsBuy(StoreConfig storeConfig, int buyNum = 1)
+ {
+ ulong price = (ulong)(storeConfig.MoneyNumber * buyNum);
+ if (UIHelper.GetMoneyCnt(storeConfig.MoneyType) >= price)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ public void ClearBatchBuyModel()
+ {
+ storeConfig = null;
+ }
+ #endregion
+ }
+}
diff --git a/System/KnapSack/New/KnapSackWin.cs b/System/KnapSack/New/KnapSackWin.cs
index eb51ac9..ac17c99 100644
--- a/System/KnapSack/New/KnapSackWin.cs
+++ b/System/KnapSack/New/KnapSackWin.cs
@@ -53,6 +53,7 @@
{
get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
}
+ PackModelInterface modelInterface { get { return ModelCenter.Instance.GetModel<PackModelInterface>(); } }
public static KnapsackFuncTitle titleType = KnapsackFuncTitle.bag;
@@ -85,7 +86,8 @@
base.OnActived();
this.transform.SetAsLastSibling();
_ornamentTitle.state = TitleBtnState.Locked;
- if(!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0)
+ if(!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0
+ && playerPack.lookLineIndex == -1)
{
if(playerPack.redpointEquipDecom.state == RedPointState.Simple)
{
@@ -200,6 +202,8 @@
private void OnClickDevourTitle()
{
+ if (!modelInterface.isPackResetOk) return;
+
CloseSubWindows();
titleType = KnapsackFuncTitle.devour;
diff --git a/System/KnapSack/New/RoleEquipWin.cs b/System/KnapSack/New/RoleEquipWin.cs
index d25b025..56a73ed 100644
--- a/System/KnapSack/New/RoleEquipWin.cs
+++ b/System/KnapSack/New/RoleEquipWin.cs
@@ -353,6 +353,7 @@
private void OnClickOneKeySell()
{
+ if (!modelInterface.isPackResetOk) return;
if (modelInterface.GetSellItemList().Count > 0)
{
diff --git a/System/Login/GameNotice.cs b/System/Login/GameNotice.cs
index 64fe063..6542325 100644
--- a/System/Login/GameNotice.cs
+++ b/System/Login/GameNotice.cs
@@ -9,11 +9,23 @@
public static void OpenGameNotice()
{
#if !UNITY_EDITOR
- var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
- if (!string.IsNullOrEmpty(url) && !noticeShowed)
+ try
{
- SDKUtility.Instance.OpenUrl(url);
- noticeShowed = true;
+ var url = string.Empty;
+ if (VersionUtility.Instance.versionInfo != null)
+ {
+ url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
+ }
+
+ if (!string.IsNullOrEmpty(url) && !noticeShowed)
+ {
+ SDKUtility.Instance.OpenUrl(url);
+ noticeShowed = true;
+ }
+ }
+ catch (System.Exception ex)
+ {
+ noticeShowed = true;
}
#endif
}
@@ -21,8 +33,22 @@
public static bool HasNotice()
{
#if !UNITY_EDITOR
- var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
- return !string.IsNullOrEmpty(url);
+ try
+ {
+ if (VersionUtility.Instance.versionInfo!=null )
+ {
+ var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
+ return !string.IsNullOrEmpty(url);
+ }
+ else
+ {
+ return false;
+ }
+ }
+ catch (System.Exception ex)
+ {
+ return false;
+ }
#else
return false;
#endif
@@ -31,11 +57,23 @@
public static void OpenGameNoticeForce()
{
#if !UNITY_EDITOR
- var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
- if (!string.IsNullOrEmpty(url) )
+ try
{
- SDKUtility.Instance.OpenUrl(url);
+ var url = string.Empty;
+ if (VersionUtility.Instance.versionInfo != null)
+ {
+ url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
+ }
+ if (!string.IsNullOrEmpty(url))
+ {
+ SDKUtility.Instance.OpenUrl(url);
+ }
}
+ catch (System.Exception ex)
+ {
+ Debug.Log(ex);
+ }
+
#endif
}
diff --git a/System/Login/LoginModel.cs b/System/Login/LoginModel.cs
index fb52f64..c1d4feb 100644
--- a/System/Login/LoginModel.cs
+++ b/System/Login/LoginModel.cs
@@ -278,6 +278,8 @@
send.Extra = "";
break;
case VersionAuthority.Release:
+ send.ExtraLen = 0;
+ send.Extra = "";
if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Free)
{
send.IDType = 1;
diff --git a/System/Login/ServerData.cs b/System/Login/ServerData.cs
index cc0049d..cd5702a 100644
--- a/System/Login/ServerData.cs
+++ b/System/Login/ServerData.cs
@@ -86,6 +86,23 @@
public int level;
public DateTime last_login_time;
+ public ServerData(LoginSeverListConfig config)
+ {
+ region_flag = config.ID;
+ name = config.serverName;
+ running_status = 1;
+ statue = 1;
+ is_recommend = 0;
+ region_domain = config.ip;
+ int.TryParse(config.pagePort, out login_port);
+ game_port = config.gatePort;
+ start_date = DateTime.Now;
+ job = string.Empty;
+ roleid = string.Empty;
+ level = 0;
+ last_login_time = DateTime.Now;
+ }
+
public static int Compare(ServerData _lhs, ServerData _rhs)
{
if (_lhs.is_recommend != _rhs.is_recommend)
diff --git a/System/Login/ServerListCenter.cs b/System/Login/ServerListCenter.cs
index 33da4a9..913e890 100644
--- a/System/Login/ServerListCenter.cs
+++ b/System/Login/ServerListCenter.cs
@@ -18,11 +18,9 @@
public ServerInfoCommon serverInfoCommon { get; private set; }
ServerData m_CurrentServer;
- public ServerData currentServer
- {
+ public ServerData currentServer {
get { return m_CurrentServer; }
- set
- {
+ set {
m_CurrentServer = value;
m_SelectedServer = true;
@@ -36,14 +34,11 @@
}
string m_CurrentServerGroup = string.Empty;
- public string currentServerGroup
- {
- get
- {
+ public string currentServerGroup {
+ get {
return m_CurrentServerGroup;
}
- set
- {
+ set {
if (m_CurrentServerGroup != value)
{
m_CurrentServerGroup = value;
@@ -60,8 +55,7 @@
bool serverListPlayerPartGot = false;
bool serverListCommonPartGot = false;
- public bool serverListGot
- {
+ public bool serverListGot {
get { return serverListCommonPartGot; }
}
@@ -72,14 +66,11 @@
public event Action serverSelectEvent;
const string LOGIN_SERVER = "LoginServer";
- public int localSaveServerId
- {
- get
- {
+ public int localSaveServerId {
+ get {
return LocalSave.GetInt(LOGIN_SERVER);
}
- set
- {
+ set {
LocalSave.SetInt(LOGIN_SERVER, value);
}
}
@@ -142,6 +133,11 @@
public void RequestJumpUrl()
{
+ if (VersionUtility.Instance.InIosAuditTime())
+ {
+ return;
+ }
+
var url = StringUtility.Contact(JUMP_URL[jumpUrlIndex % 2], "flag=", VersionConfig.Get().appId, "_", VersionConfig.Get().branch, "_", VersionConfig.Get().version);
jumpUrlIndex++;
HttpRequest.Instance.RequestHttpGet(url, HttpRequest.defaultHttpContentType, 1, OnRequestJumpUrl);
@@ -178,6 +174,11 @@
void RequestServerCommonList()
{
+ if (VersionUtility.Instance.InIosAuditTime())
+ {
+ return;
+ }
+
HttpRequest.Instance.RequestHttpGet(SERVERLIST_URL_COMMON, HttpRequest.defaultHttpContentType, 1, OnGetServerList);
}
@@ -222,6 +223,11 @@
public void RequestServerListPlayer(string _accountName)
{
+ if (VersionUtility.Instance.InIosAuditTime())
+ {
+ return;
+ }
+
accountNameBuf = _accountName;
var url = string.Empty;
var tables = new Dictionary<string, string>();
@@ -293,6 +299,30 @@
return false;
}
+ public void ParseServerLocalServerList()
+ {
+ serverListCommonPartGot = true;
+ var configs = Config.Instance.GetAllValues<LoginSeverListConfig>();
+ var count = configs.Count;
+ serverInfoCommon = new ServerInfoCommon();
+ serverInfoCommon.common = new ServerGroup[1];
+ serverInfoCommon.common[0] = new ServerGroup();
+ serverInfoCommon.common[0].group_title = "1鍖�";
+ serverInfoCommon.common[0].group_list = new ServerData[count];
+ for (var i = 0; i < count; i++)
+ {
+ var config = configs[i];
+ serverInfoCommon.common[0].group_list[i] = new ServerData(config);
+ }
+
+ FiltrateDefaultServerAndServerGroup();
+
+ if (onServerListRefreshEvent != null)
+ {
+ onServerListRefreshEvent();
+ }
+ }
+
public List<string> GetAllServerGroup()
{
var serverGroupTitles = new List<string>();
@@ -319,7 +349,6 @@
return serverGroupTitles;
}
-
private void ProcessRecentServerData()
{
diff --git a/System/MainInterfacePanel/HighSettingFadeInFadeOut.cs b/System/MainInterfacePanel/HighSettingFadeInFadeOut.cs
index 5367881..177fd5c 100644
--- a/System/MainInterfacePanel/HighSettingFadeInFadeOut.cs
+++ b/System/MainInterfacePanel/HighSettingFadeInFadeOut.cs
@@ -538,6 +538,29 @@
int IndexOf = GroupLowIndexList.IndexOf(highBtnRecord.Index);
if (IndexOf == 0)
{
+ if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FairyCeremony))//绮剧伒鐩涘吀
+ {
+ if (AnimationFadeOutDicLow.Count < 6)//------绗簩灞�
+ {
+ SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
+ selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
+ selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
+ selectCaseRequest.Index = highBtnRecord.Index;
+ AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
+ }
+ else//------绗笁灞�
+ {
+ SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
+ selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
+ selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
+ selectCaseRequest.Index = highBtnRecord.Index;
+ AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
+ }
+ }
+
+ }
+ else if (IndexOf == 1)
+ {
var _funcOrder = 0;
if (OpenServerActivityCenter.Instance.IsAnyActivityOpen(out _funcOrder))//绮惧僵娲诲姩
{
@@ -561,11 +584,10 @@
}
}
}
-
-
+
}
- else if (IndexOf == 1)
- {
+ else if (IndexOf == 2)
+ {
if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && limitedTimePackageItemModel.IsExpired())//闄愭椂绀煎寘
{
if (AnimationFadeOutDicLow.Count < 6)//------绗簩灞�
@@ -586,8 +608,9 @@
}
}
+
}
- else if (IndexOf == 2)
+ else if (IndexOf == 3)
{
bool Isopen = OpenServerActivityCenter.Instance.IsActivityOpen(4);
if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//闄愭椂鐗规儬
@@ -609,33 +632,12 @@
AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
}
}
- }
- else if (IndexOf == 3)
- {
- bool Isopen = impactRankModel.IsInImpactRank;
- if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//鍏ㄦ皯鍐叉
- {
- if (AnimationFadeOutDicLow.Count < 6)//------绗簩灞�
- {
- SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
- selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
- selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
- selectCaseRequest.Index = highBtnRecord.Index;
- AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
- }
- else//------绗笁灞�
- {
- SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
- selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
- selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
- selectCaseRequest.Index = highBtnRecord.Index;
- AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
- }
- }
+
}
else if (IndexOf == 4)
{
- if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && OperationTimeHepler.Instance.InOperationTime(Operation.FairyCeremony))//绮剧伒鐩涘吀
+ bool Isopen = impactRankModel.IsInImpactRank;
+ if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//鍏ㄦ皯鍐叉
{
if (AnimationFadeOutDicLow.Count < 6)//------绗簩灞�
{
diff --git a/System/MainInterfacePanel/HoistingWin.cs b/System/MainInterfacePanel/HoistingWin.cs
index 81d1124..831ce4c 100644
--- a/System/MainInterfacePanel/HoistingWin.cs
+++ b/System/MainInterfacePanel/HoistingWin.cs
@@ -21,6 +21,7 @@
[SerializeField] Button PrayerButton;//绁堟効
[SerializeField] Button BountyTaskButton;//璧忛噾
[SerializeField] Button HangUpButton;//鎸傛満
+ [SerializeField] Button FairyTaskButton;//浠欑洘浠诲姟
private int number = 0;
DungeonModel m_DungeonModel;
DungeonModel dungeonModel { get { return m_DungeonModel ?? (m_DungeonModel = ModelCenter.Instance.GetModel<DungeonModel>()); } }
@@ -71,6 +72,11 @@
WorldBossButton.AddListener(() => {
Close();
WindowCenter.Instance.Open<FindPreciousFrameWin>();
+ });
+ FairyTaskButton.AddListener(()=>
+ {
+ Close();
+ WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.UnionTask);
});
}
@@ -150,7 +156,14 @@
{
HangUpButton.gameObject.SetActive(false);
}
-
+ if (FuncOpen.Instance.IsFuncOpen(16) && TaskAllocation.Instance.FairyAuAllNumber()<70)//浠欑洘浠诲姟
+ {
+ FairyTaskButton.gameObject.SetActive(true);
+ }
+ else
+ {
+ FairyTaskButton.gameObject.SetActive(false);
+ }
for (int i = 0; i < Content.childCount; i++)
{
diff --git a/System/MainInterfacePanel/SideMission.cs b/System/MainInterfacePanel/SideMission.cs
index 45d48b1..9be6ada 100644
--- a/System/MainInterfacePanel/SideMission.cs
+++ b/System/MainInterfacePanel/SideMission.cs
@@ -90,11 +90,14 @@
gridCtrl.Refresh();
foreach (var key in taskmodel.SideQuestsDic.Keys)
{
- if (TaskIdNow == 0)
+ if (taskmodel.SideQuestsDic[key].MissionState != 0)
{
- TaskIdNow = key;
- }
- gridCtrl.AddCell(ScrollerDataType.Header, key);
+ if (TaskIdNow == 0)
+ {
+ TaskIdNow = key;
+ }
+ gridCtrl.AddCell(ScrollerDataType.Header, key);
+ }
}
gridCtrl.Restart();
}
diff --git a/System/MainInterfacePanel/TaskListTip.cs b/System/MainInterfacePanel/TaskListTip.cs
index 59a580f..5e25378 100644
--- a/System/MainInterfacePanel/TaskListTip.cs
+++ b/System/MainInterfacePanel/TaskListTip.cs
@@ -141,20 +141,6 @@
{
}
- private void TaskIdUpdate(int taskId)
- {
- int leng = Content.childCount;
- for (int i = 0; i < leng; i++)
- {
- GameObject childObj = Content.GetChild(i).gameObject;
- TaskType childObjTaskType = Content.GetChild(i).gameObject.GetComponent<TaskType>();
- if (childObj.activeSelf && childObjTaskType.TaskID == taskId)
- {
- childObj.GetComponent<FlyingShoesTask>().FlyingShoes_Task(taskId);
- }
- }
- }
-
private void CardLevelChangeEvent(int taskID)//鍗$骇鐘舵�佹敼鍙�
{
if (taskmodel.allMissionDict.ContainsKey(taskID) && taskmodel.allMissionDict[taskID].Type == 3)
@@ -166,9 +152,9 @@
}
private void MainCardLevelChange(int _id)//涓荤嚎浠诲姟鍗$骇鐘舵�佹敼鍙�
{
- TaskScheduling();
- ChangeSort();
- TaskJump(_id);
+ //TaskScheduling();
+ //ChangeSort();
+ //TaskJump(_id);
}
private void SetLength()
@@ -215,35 +201,23 @@
}
void TaskToAdd(int MissionID, int MissionState, int DiscriptionIndex)//娣诲姞浠诲姟
{
- TaskScheduling();
+
var inDungeon = IsDungeon();
+ TaskScheduling();
if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !inDungeon)
{
- TaskAddAndDelete();
+ if (MissionState != 0 && MissionID!=1 && _list.Contains(MissionID))
+ {
+ TaskAddAndDelete(MissionID);
+ TaskJump(MissionID);
+ return;
+ }
+
}
- TaskJump(MissionID);
+
}
- void LodingDelTask(int TaskID)
- {
- int LengChild = Content.childCount;
- for (int i = 0; i < LengChild; i++)
- {
- TaskType taskType = Content.GetChild(i).GetComponent<TaskType>();
- FlyingShoesTask flyingShoesTask = Content.GetChild(i).GetComponent<FlyingShoesTask>();
- if (taskType.TaskID == TaskID && taskType.gameObject.activeSelf)
- {
- taskType.gameObject.SetActive(false);
- if (TaskID != taskmodel.GetNowTaskID && flyingShoesTask.ImgSelected.activeSelf)
- {
- flyingShoesTask.ImgSelected.SetActive(false);
- }
- flyingShoesTask.UIEffect.Play();
- }
- }
- SetLength();
- }
- private void TaskAddAndDelete()
+ private void TaskAddAndDelete(int TaskID)
{
for (int i = 0; i < Content.childCount; i++)
{
@@ -268,8 +242,30 @@
childObj.SetActive(false);
}
}
-
+
}
+ //for (int i = 0; i < Content.childCount; i++)
+ //{
+ // if (i < _list.Count)
+ // {
+ // GameObject obj = Content.GetChild(i).gameObject;
+ // TaskType childObjTaskType = Content.GetChild(i).gameObject.GetComponent<TaskType>();
+ // if (childObjTaskType.TaskID == TaskID)
+ // {
+ // return;
+ // }
+ // if (childObjTaskType.TaskID == 0)
+ // {
+ // obj.SetActive(true);
+ // childObjTaskType.TaskID = TaskID;
+ // childObjTaskType.IsGameObjectName(TaskID);
+ // childObjTaskType.IsMysteriousTask();
+ // obj.GetComponent<FlyingShoesTask>().FlyingShoes_Task(TaskID);
+ // }
+ // }
+
+ //}
+ ChangeSort();//鍏充簬浠诲姟鍙樻洿鎺掑簭
SetLength();
}
@@ -322,22 +318,39 @@
taskType.TaskID = 0;
taskType.ClearTaskName();
obj.SetActive(false);
- obj.transform.SetAsLastSibling();
+ obj.transform.SetAsLastSibling();
+ return;
}
}
}
private void ChangeSort()//鍏充簬浠诲姟鍙樻洿鎺掑簭
{
- for (int i = 0; i < Content.childCount; i++)
+
+ for (int i = 0; i < _list.Count; i++)
{
- GameObject obj = Content.GetChild(i).gameObject;
- TaskType taskType = obj.GetComponent<TaskType>();
- if (taskType.TaskID != 0 && _list.Contains(taskType.TaskID))
+
+ for (int j = 0; j < Content.childCount; j++)
{
- int Inedx = _list.IndexOf(taskType.TaskID);
- obj.transform.SetSiblingIndex(Inedx);
+ GameObject obj = Content.GetChild(j).gameObject;
+ TaskType taskType = obj.GetComponent<TaskType>();
+ if (taskType.TaskID != 0 && taskType.TaskID == _list[i])
+ {
+ int Inedx = _list.IndexOf(taskType.TaskID);
+ obj.transform.SetSiblingIndex(Inedx);
+ }
}
+
}
+ //for (int i = 0; i < Content.childCount; i++)
+ //{
+ // GameObject obj = Content.GetChild(i).gameObject;
+ // TaskType taskType = obj.GetComponent<TaskType>();
+ // if (taskType.TaskID != 0 && _list.Contains(taskType.TaskID))
+ // {
+ // int Inedx = _list.IndexOf(taskType.TaskID);
+ // obj.transform.SetSiblingIndex(Inedx);
+ // }
+ //}
}
@@ -493,7 +506,15 @@
}
else
{
- var _position = (_list.Count - type) * m_SizeHeight + (_list.Count - type - 1) * 2;
+ float _position = 0f;
+ if (_list.Count >= 12)
+ {
+ _position = (12 - type) * m_SizeHeight + (12 - type - 1) * 2;
+ }
+ else
+ {
+ _position = (_list.Count - type) * m_SizeHeight + (_list.Count - type - 1) * 2;
+ }
_position -= 196;
m_ScrollRect.verticalNormalizedPosition = Mathf.Clamp01(_position / ((Content as RectTransform).sizeDelta.y - 196));
}
diff --git a/System/MainInterfacePanel/TopRightTip.cs b/System/MainInterfacePanel/TopRightTip.cs
index 453c3e6..7c8b745 100644
--- a/System/MainInterfacePanel/TopRightTip.cs
+++ b/System/MainInterfacePanel/TopRightTip.cs
@@ -27,10 +27,8 @@
private void OpenMapWin()
{
- var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig();
- var config = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
- if (string.IsNullOrEmpty(mapResConfig.BigMap)
- || PlayerDatas.Instance.baseData.MapID == FairyLeagueModel.FAIRY_LEAGUE_DUNGEON)
+ var canOpen = ModelCenter.Instance.GetModel<MapModel>().CanOpenLocalMapWin(PlayerDatas.Instance.baseData.MapID);
+ if (!canOpen)
{
SysNotifyMgr.Instance.ShowTip("MapInfo1");
}
diff --git a/System/MainWin/AttackButton.cs b/System/MainWin/AttackButton.cs
index a8b49cd..2455036 100644
--- a/System/MainWin/AttackButton.cs
+++ b/System/MainWin/AttackButton.cs
@@ -25,7 +25,7 @@
}
else
{
- return m_IsDown;
+ return Input.GetMouseButton(0) && m_IsDown;
}
}
}
diff --git a/System/Message/BattleHint.cs b/System/Message/BattleHint.cs
index 17183b1..a2c1ac4 100644
--- a/System/Message/BattleHint.cs
+++ b/System/Message/BattleHint.cs
@@ -16,15 +16,15 @@
public void OnStageLoadFinish()
{
Clear();
- var mapId = PlayerDatas.Instance.baseData.MapID;
- if (cacheMapId != 0 && cacheMapId != 31160
- && mapId == 31160)
- {
- SnxxzGame.Instance.StartCoroutine(Co_LoadFinish());
- }
- var help = dungeonModel.mission;
- ancientKing = mapId != 31160 ? 0 : help.topPlayerID;
- cacheMapId = PlayerDatas.Instance.baseData.MapID;
+ //var mapId = PlayerDatas.Instance.baseData.MapID;
+ //if (cacheMapId != 0 && cacheMapId != 31160
+ // && mapId == 31160)
+ //{
+ // SnxxzGame.Instance.StartCoroutine(Co_LoadFinish());
+ //}
+ //var help = dungeonModel.mission;
+ //ancientKing = mapId != 31160 ? 0 : help.topPlayerID;
+ //cacheMapId = PlayerDatas.Instance.baseData.MapID;
}
public event Action battleHintUpdate;
@@ -56,7 +56,7 @@
&& ancientKing != help.topPlayerID)
{
ancientKing = help.topPlayerID;
- Receive(1);
+ //Receive(1);
}
}
ancientKing = help.topPlayerID;
@@ -71,24 +71,24 @@
}
if (msg.Equals("AncientBattlefield_8"))
{
- Receive(2);
+ //Receive(2);
}
}
public void Receive(int ancientType)
{
- battleHints.Enqueue(ancientType);
- if (!WindowCenter.Instance.IsOpen<BattleHintWin>())
- {
- WindowCenter.Instance.Open<BattleHintWin>();
- }
- else
- {
- if (battleHintUpdate != null)
- {
- battleHintUpdate();
- }
- }
+ //battleHints.Enqueue(ancientType);
+ //if (!WindowCenter.Instance.IsOpen<BattleHintWin>())
+ //{
+ // WindowCenter.Instance.Open<BattleHintWin>();
+ //}
+ //else
+ //{
+ // if (battleHintUpdate != null)
+ // {
+ // battleHintUpdate();
+ // }
+ //}
}
public void ReceiveEvenKill(string message, ArrayList list)
diff --git a/System/Message/SysNotifyMgr.cs b/System/Message/SysNotifyMgr.cs
index 7e481bf..5046c40 100644
--- a/System/Message/SysNotifyMgr.cs
+++ b/System/Message/SysNotifyMgr.cs
@@ -220,7 +220,7 @@
}
break;
case SysNotifyType.SysEvenKill:
- BattleHint.Instance.ReceiveEvenKill(msg, tipInfoList);
+ //BattleHint.Instance.ReceiveEvenKill(msg, tipInfoList);
break;
}
}
diff --git a/System/Mount/PlayerMountDatas.cs b/System/Mount/PlayerMountDatas.cs
index c84a6d1..c336549 100644
--- a/System/Mount/PlayerMountDatas.cs
+++ b/System/Mount/PlayerMountDatas.cs
@@ -50,8 +50,8 @@
private List<HorseConfig> SortMount = new List<HorseConfig>();//鐢ㄤ簬绾㈢偣鎺掑簭
public int MountStoneItemId = 0;
public bool IsOk = false;
- public bool IsRedPointSingleFeed = true;
public List<int> ListEffectSkill = new List<int>();
+ private int HorseDanExp = 0;//鍧愰獞涓圭粡楠�
PlayerPackModel _playerPack;
PlayerPackModel playerPack
{
@@ -78,6 +78,8 @@
}
string MountRedDotstr = Config.Instance.Get<FuncConfigConfig>("MountPetRedDot").Numerical1;
DicDefaultMount = ConfigParse.GetDic<int, int>(MountRedDotstr);
+ string HorseUpItem = Config.Instance.Get<FuncConfigConfig>("HorseUpItem").Numerical2;
+ HorseDanExp = int.Parse(HorseUpItem);
}
public override void UnInit()
@@ -96,7 +98,6 @@
_DicHorse.Clear();
HorseRidingBool = false;
Wait = true;
- IsRedPointSingleFeed = true;
}
public void OnPlayerLoginOk()
@@ -250,7 +251,6 @@
private void RedPointMountDan()
{
- IsRedPointSingleFeed = false;
MountDanRed();
}
@@ -281,22 +281,20 @@
int GetMountID = 0;
int GetMountLv = 0;
-
+ int NeedExp = 99999999;
+ int NeedNumber = 0;//鎵�闇�瑕佺殑缁忛獙涓�
for (int i = 0; i < SortMount.Count; i++)
{
int horseID = SortMount[i].HorseID;
- if (_DicHorse.ContainsKey(horseID))
+ if (_DicHorse.ContainsKey(horseID) && _DicHorse[horseID].Lv < Config.Instance.Get<HorseConfig>(horseID).MaxLV)
{
- var key = horseID;
- if (GetMountID == 0 && _DicHorse[key].Lv < GetMountSkillMaxLV(key))
+ int _NeedExp = HorseUpConfig.GetHorseIDAndLV(horseID, (_DicHorse[horseID].Lv)).NeedExp;
+ if (_NeedExp - _DicHorse[horseID].Exp < NeedExp)
{
- GetMountID = key;
- GetMountLv = _DicHorse[key].Lv;
- }
- if (_DicHorse[key].Lv < GetMountLv && _DicHorse[key].Lv < GetMountSkillMaxLV(key))
- {
- GetMountID = key;
- GetMountLv = _DicHorse[key].Lv;
+ NeedExp = _NeedExp - _DicHorse[horseID].Exp;
+ GetMountID = horseID;
+ GetMountLv = _DicHorse[horseID].Lv;
+ NeedNumber = Mathf.CeilToInt((float)NeedExp / HorseDanExp);
}
}
}
@@ -312,23 +310,11 @@
ASingleFeedRedPoint[key].state = RedPointState.Simple;
return;
}
-
}
- if (ASingleFeedRedPoint.ContainsKey(GetMountID) && number > 0 && GetMountLv < horsecon.MaxLV)
+ if (ASingleFeedRedPoint.ContainsKey(GetMountID) && number >= NeedNumber && GetMountLv < horsecon.MaxLV)
{
- if (PlayerDatas.Instance.baseData.LV >= 1500)
- {
- if (IsRedPointSingleFeed)
- {
- ASingleFeedRedPoint[GetMountID].state = RedPointState.Simple;
- return;
- }
- }
- else
- {
- ASingleFeedRedPoint[GetMountID].state = RedPointState.Simple;
- return;
- }
+ ASingleFeedRedPoint[GetMountID].state = RedPointState.Simple;
+ return;
}
}
diff --git a/System/OpenServerActivity/FeaturesType.cs b/System/OpenServerActivity/FeaturesType.cs
index 48eec67..538d982 100644
--- a/System/OpenServerActivity/FeaturesType.cs
+++ b/System/OpenServerActivity/FeaturesType.cs
@@ -15,7 +15,9 @@
[SerializeField] Text m_IconName;//鍚嶅瓧
[SerializeField] Image m_Icon;
[SerializeField] Button m_Button;
-
+ [SerializeField] UIEffect m_UIeffect;
+ InSevenDayModel m_InSevenDayModel;
+ InSevenDayModel inSevenDay { get { return m_InSevenDayModel ?? (m_InSevenDayModel = ModelCenter.Instance.GetModel<InSevenDayModel>()); } }
public GameObject ImageSelected
{
get { return m_ImageSelected; }
@@ -34,6 +36,14 @@
{
return;
}
+ if (inSevenDay.RewardForDic.ContainsKey(day) && inSevenDay.RewardForDic[day] == 0)
+ {
+ m_UIeffect.Play();
+ }
+ else
+ {
+ m_UIeffect.Stop();
+ }
DayText(day);
m_Icon.SetSprite(InsevenConfig.ICON);
m_IconName.text = InsevenConfig.RewardName;
diff --git a/System/OpenServerActivity/FlashSaleCoolDown.cs b/System/OpenServerActivity/FlashSaleCoolDown.cs
index 6f81624..f52cfce 100644
--- a/System/OpenServerActivity/FlashSaleCoolDown.cs
+++ b/System/OpenServerActivity/FlashSaleCoolDown.cs
@@ -84,7 +84,7 @@
void DisplayTime(int seconds)
{
m_Time.timeShow.color = seconds > 3600 ? UIHelper.GetUIColor(TextColType.Green) : UIHelper.GetUIColor(TextColType.Red);
- m_Time.Begin(DateTime.Now.AddTicks(seconds * TimeSpan.TicksPerSecond));
+ m_Time.Begin(seconds);
}
void DisplayAdvance(int seconds)
diff --git a/System/OpenServerActivity/InSevenDayWin.cs b/System/OpenServerActivity/InSevenDayWin.cs
index 57152ab..06ca216 100644
--- a/System/OpenServerActivity/InSevenDayWin.cs
+++ b/System/OpenServerActivity/InSevenDayWin.cs
@@ -25,6 +25,9 @@
[SerializeField] Text m_TextName;
[SerializeField] Image m_ImageShow;
[SerializeField] Image m_ImageShowCH;
+ [SerializeField] UIEffect m_UIEffect1;
+ [SerializeField] UIEffect m_UIEffect2;
+ [SerializeField] UIEffect m_UIEffect3;
[SerializeField] Image m_ImageDay;
[SerializeField] Image m_ImageTex1;
[SerializeField] Image m_ImageTex2;
@@ -118,11 +121,12 @@
{
return;
}
+ SetUIEffect();
m_rewardInformation.GetIsDays(SelectedDay);
m_TextName.text = InsevenConfig.RewardName;
if (InsevenConfig.IsTitle == 1)
{
- m_ImageShow.gameObject.SetActive(false);
+ m_ImageShow.gameObject.SetActive(false);
m_ImageShowCH.gameObject.SetActive(true);
m_ImageShowCH.SetSprite(InsevenConfig.Image);
m_ImageShowCH.SetNativeSize();
@@ -142,7 +146,31 @@
m_ImageTex2.SetSprite(InsevenConfig.ImgTxt2);
m_ImageTex2.SetNativeSize();
}
-
+ private void SetUIEffect()
+ {
+ switch (SelectedDay)
+ {
+ case 1:
+ case 4:
+ case 6:
+ m_UIEffect1.gameObject.SetActive(true);
+ m_UIEffect2.gameObject.SetActive(false);
+ m_UIEffect3.gameObject.SetActive(false);
+ break;
+ case 2:
+ case 3:
+ m_UIEffect1.gameObject.SetActive(false);
+ m_UIEffect2.gameObject.SetActive(true);
+ m_UIEffect3.gameObject.SetActive(false);
+ break;
+ case 5:
+ case 7:
+ m_UIEffect1.gameObject.SetActive(false);
+ m_UIEffect2.gameObject.SetActive(false);
+ m_UIEffect3.gameObject.SetActive(true);
+ break;
+ }
+ }
#endregion
}
diff --git a/System/Pet/PlayerPetDatas.cs b/System/Pet/PlayerPetDatas.cs
index ef0090d..5fb219c 100644
--- a/System/Pet/PlayerPetDatas.cs
+++ b/System/Pet/PlayerPetDatas.cs
@@ -47,8 +47,7 @@
public int PetStoneItemId = 0;//鐢ㄦ潵璁板綍鍧愰獞榄傜煶鐨処D
public bool IsOk = false;
- public bool RedPointMaxLv = true;//鐢ㄦ潵鏍囪鐏靛疇鏈�澶ч檺鍒剁瓑绾�
-
+ private int PetDanExp = 0;//鐏靛疇涓圭粡楠�
public List<int> ListEffectSkill = new List<int>();
PlayerPackModel _playerPack;
PlayerPackModel playerPack
@@ -98,6 +97,7 @@
}
string PetRedDotstr = Config.Instance.Get<FuncConfigConfig>("MountPetRedDot").Numerical2;
DicDefaultPet = ConfigParse.GetDic<int, int>(PetRedDotstr);
+ PetDanExp = int.Parse(Config.Instance.Get<FuncConfigConfig>("PetUpItem").Numerical2);
}
public override void UnInit()
@@ -112,7 +112,6 @@
public void OnBeforePlayerDataInitialize()
{
Wait = true;
- RedPointMaxLv = true;
IsOk = false;
_TagPetItem.Clear();
_DicPetBack.Clear();
@@ -234,11 +233,6 @@
return;
}
}
- //Lcj 鏄惁鍙悶鍣澶�
- public bool CanDevour
- {
- get { return false; }
- }
private void PetNumberPreservation()//鐢ㄦ潵瀵圭伒瀹犱釜鏁拌繘琛屼繚瀛�
{
if (PetRedpoint.Count != 0)
@@ -266,7 +260,6 @@
CultivateRedPoint.Add(petID, redPointMountStare2);
}
}
-
}
private void PetActivateRedPoint()//鐏靛疇婵�娲荤孩鐐�
@@ -291,19 +284,8 @@
}
}
}
- //鐏靛疇杩涢樁鍜岀伒瀹犲垎瑙g孩鐐�
- public bool CanDecom
- {
- get { return false; }
- }
-
- public bool CanEssence
- {
- get; private set;
- }
private void IsRedPointCultivate()
{
- RedPointMaxLv = false;
GetCultivateRedPoint();
}
private void ToAddSorting()
@@ -336,22 +318,20 @@
}
int GetPetId = 0;
int petLv = 0;
-
+ int NeedExp = 99999999;
+ int NeedNumber = 0;//鎵�闇�瑕佺殑缁忛獙涓�
for (int i = 0; i < Sortpet.Count; i++)
{
int petID = Sortpet[i].ID;
- if (_DicPetBack.ContainsKey(petID))
+ if (_DicPetBack.ContainsKey(petID) && _DicPetBack[petID].PetClass < Config.Instance.Get<PetInfoConfig>(petID).MaxRank)
{
- var key = petID;
- if (petLv == 0 && _DicPetBack[key].PetClass < GetPetSkillMaxLv(key))
+ int _NeedExp = PetClassCostConfig.GetPetIdAndRank(petID, _DicPetBack[petID].PetClass).UpNeedExp;
+ if (_NeedExp - _DicPetBack[petID].petExp < NeedExp)
{
- petLv = _DicPetBack[key].PetClass;
- GetPetId = key;
- }
- if (_DicPetBack[key].PetClass < petLv && _DicPetBack[key].PetClass < GetPetSkillMaxLv(key))
- {
- petLv = _DicPetBack[key].PetClass;
- GetPetId = key;
+ NeedExp = _NeedExp - _DicPetBack[petID].petExp;
+ petLv = _DicPetBack[petID].PetClass;
+ GetPetId = petID;
+ NeedNumber = Mathf.CeilToInt((float)NeedExp / PetDanExp);
}
}
}
@@ -362,26 +342,14 @@
&& itemCount > 0 && CultivateRedPoint.ContainsKey(key))
{
CultivateRedPoint[key].state = RedPointState.Simple;
- CanEssence = true;
return;
}
}
PetInfoConfig petinfo = Config.Instance.Get<PetInfoConfig>(GetPetId);
- if (PlayerDatas.Instance.baseData.LV >= 1500)
+ if (CultivateRedPoint.ContainsKey(GetPetId) && itemCount >= NeedNumber && petinfo.MaxRank > petLv)
{
- if (CultivateRedPoint.ContainsKey(GetPetId) && itemCount > 0 && RedPointMaxLv && petinfo.MaxRank > petLv)
- {
- CultivateRedPoint[GetPetId].state = RedPointState.Simple;
- CanEssence = true;
- }
- }
- else
- {
- if (CultivateRedPoint.ContainsKey(GetPetId) && itemCount > 0 && petinfo.MaxRank > petLv)
- {
- CultivateRedPoint[GetPetId].state = RedPointState.Simple;
- CanEssence = true;
- }
+ CultivateRedPoint[GetPetId].state = RedPointState.Simple;
+ return;
}
}
diff --git a/System/Role/RolePanel.cs b/System/Role/RolePanel.cs
index 4528a96..15c1f87 100644
--- a/System/Role/RolePanel.cs
+++ b/System/Role/RolePanel.cs
@@ -104,7 +104,8 @@
}
private void OnRenameClick()
{
- MessageWin.Inst.ShowFixedTip(Language.Get("Z1025"));
+ //SysNotifyMgr.Instance.ShowTip("JadeInvestmentLimit1");
+ WindowCenter.Instance.Open<RoleRenameWin>();
}
private void OnElixirClick()
diff --git a/System/Role/RoleRenameWin.cs b/System/Role/RoleRenameWin.cs
index a4acfeb..14d6866 100644
--- a/System/Role/RoleRenameWin.cs
+++ b/System/Role/RoleRenameWin.cs
@@ -50,6 +50,7 @@
if (itemConfig == null) return;
ItemCellModel cellModel = new ItemCellModel(renameToolId, false,(ulong)GetRenameToolNum());
itemCell.Init(cellModel);
+ itemCell.countText.gameObject.SetActive(true);
if(GetRenameToolNum() > 0)
{
itemCell.countText.text = StringUtility.Contact(UIHelper.GetTextColorByItemColor(TextColType.Green,GetRenameToolNum().ToString()),
@@ -120,7 +121,7 @@
{
if (isOk)
{
- LanguageVerify.Instance.VerifyPlayerName(renameInput.text, 0,
+ LanguageVerify.Instance.VerifyPlayerName(renameInput.text, (int)PlayerDatas.Instance.baseData.PlayerID,
UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName), PlayerDatas.Instance.baseData.LV,
PlayerDatas.Instance.baseData.VIPLv, (bool ok, string name) =>
{
diff --git a/System/RolePromote/RolePromoteWin.cs b/System/RolePromote/RolePromoteWin.cs
index 348ebfb..914885d 100644
--- a/System/RolePromote/RolePromoteWin.cs
+++ b/System/RolePromote/RolePromoteWin.cs
@@ -79,8 +79,11 @@
case PlayerDataRefresh.LV:
case PlayerDataRefresh.LV2:
case PlayerDataRefresh.LVEx:
+ UpdateGrade();
+ break;
case PlayerDataRefresh.FightPower:
UpdateGrade();
+ DisplayFightPower();
break;
}
}
@@ -133,7 +136,7 @@
}
}
scrollerController.Restart();
- m_FightPowerTxt.text = Language.Get("RolePromoteFightPower", PlayerDatas.Instance.baseData.FightPoint);
+ DisplayFightPower();
}
void InitResourceData()
@@ -147,6 +150,11 @@
scrollerController.Restart();
}
+ private void DisplayFightPower()
+ {
+ m_FightPowerTxt.text = Language.Get("RolePromoteFightPower", PlayerDatas.Instance.baseData.FightPoint);
+ }
+
private void UpdateGrade()
{
var _playerLvCfg = Config.Instance.Get<PlayerLVConfig>(PlayerDatas.Instance.baseData.LV);
diff --git a/System/Rune/RuneModel.cs b/System/Rune/RuneModel.cs
index d44f451..cc0de13 100644
--- a/System/Rune/RuneModel.cs
+++ b/System/Rune/RuneModel.cs
@@ -1105,6 +1105,40 @@
return false;
}
+ public void IsSameRune(int id, ref List<int> sameHoles)
+ {
+ sameHoles.Clear();
+ var _runeConfig = Config.Instance.Get<RuneConfig>(id);
+ if (_runeConfig == null)
+ {
+ return;
+ }
+ for (int i = 0; i < _runeConfig.AttrType.Length; i++)
+ {
+ var sameHole = SameRuneHole(_runeConfig.AttrType[i]);
+ if (sameHole != -1)
+ {
+ sameHoles.Add(sameHole);
+ }
+ }
+ }
+
+ public int SameRuneHole(int type)
+ {
+ foreach (int key in runeHoleData.Keys)
+ {
+ RuneConfig _runeCfg = Config.Instance.Get<RuneConfig>(runeHoleData[key].id);
+ for (int i = 0; i < _runeCfg.AttrType.Length; i++)
+ {
+ if (type == _runeCfg.AttrType[i])
+ {
+ return key;
+ }
+ }
+ }
+ return -1;
+ }
+
public int GetOpenTowerCnt(bool includeSpecial = false)
{
int Cnt = 0;
diff --git a/System/Rune/RunePackCell.cs b/System/Rune/RunePackCell.cs
index 609aaa8..0aec98f 100644
--- a/System/Rune/RunePackCell.cs
+++ b/System/Rune/RunePackCell.cs
@@ -79,12 +79,32 @@
MessageWin.Inst.ShowFixedTip(Language.Get("L1061"));
return;
}
- if (model.IsSameInHoleRune(_rune.id, model.sltRuneHole))
- {
- MessageWin.Inst.ShowFixedTip(Language.Get("L1078"));
- return;
- }
var sltHoleRune = model.GetHoleRune(model.sltRuneHole);
+ bool switchOtherSameHole = false;
+ List<int> sameHoles = new List<int>();
+ if (sltHoleRune == null || runeComposeModel.m_RuneBothPropertys.Contains(sltHoleRune.id)
+ || !runeComposeModel.m_RuneBothPropertys.Contains(_rune.id))
+ {
+ if (model.IsSameInHoleRune(_rune.id, model.sltRuneHole))
+ {
+ MessageWin.Inst.ShowFixedTip(Language.Get("L1078"));
+ return;
+ }
+ }
+ else
+ {
+ model.IsSameRune(_rune.id, ref sameHoles);
+ if (sameHoles.Count > 0 && !sameHoles.Contains(model.sltRuneHole))
+ {
+ MessageWin.Inst.ShowFixedTip(Language.Get("L1078"));
+ return;
+ }
+ if (sameHoles.Count > 1)
+ {
+ switchOtherSameHole = true;
+ }
+ }
+
if (runeComposeModel.m_RuneBothPropertys.Contains(_rune.id)
&& model.GetDoublePropLimitCount() <= model.GetCurrentDoublePropCount()
&& (sltHoleRune == null || !runeComposeModel.m_RuneBothPropertys.Contains(sltHoleRune.id)))
@@ -93,13 +113,36 @@
SysNotifyMgr.Instance.ShowTip("RuneGridUnEnough", _count);
return;
}
- C073D_tagCPackItemExchange runeInlayPack = new C073D_tagCPackItemExchange();
- runeInlayPack.SrcBackpack = (byte)_rune.packtype;
- runeInlayPack.SrcIndex = (ushort)_rune.index;
- runeInlayPack.DesBackPack = (int)PackType.rptInterimPack;
- runeInlayPack.DestIndex = (ushort)model.sltRuneHole;
- GameNetSystem.Instance.SendInfo(runeInlayPack);
- WindowCenter.Instance.CloseImmediately<RunePackWin>();
+
+ if (switchOtherSameHole)
+ {
+ var otherSameHole = sameHoles[0] == model.sltRuneHole ? sameHoles[1] : sameHoles[0];
+ var otherRune = model.GetHoleRune(otherSameHole);
+ ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("SwitchDoublePropertyRune"), (bool isOk) =>
+ {
+ if (isOk)
+ {
+ SwitchRune(otherRune.packtype, otherSameHole, _rune.packtype, 0);
+ SwitchRune(_rune.packtype, _rune.index, (int)PackType.rptInterimPack, model.sltRuneHole);
+ WindowCenter.Instance.CloseImmediately<RunePackWin>();
+ }
+ });
+ }
+ else
+ {
+ SwitchRune(_rune.packtype, _rune.index, (int)PackType.rptInterimPack, model.sltRuneHole);
+ WindowCenter.Instance.CloseImmediately<RunePackWin>();
+ }
+ }
+
+ void SwitchRune(int srcpackType,int scrIndex,int destpackType,int destIndex)
+ {
+ C073D_tagCPackItemExchange pak = new C073D_tagCPackItemExchange();
+ pak.SrcBackpack = (byte)srcpackType;
+ pak.SrcIndex = (ushort)scrIndex;
+ pak.DesBackPack = (byte)destpackType;
+ pak.DestIndex = (ushort)destIndex;
+ GameNetSystem.Instance.SendInfo(pak);
}
}
}
diff --git a/System/Store/Logic/BuyEquipTip.cs b/System/Store/Logic/BuyEquipTip.cs
index 1004a66..2539170 100644
--- a/System/Store/Logic/BuyEquipTip.cs
+++ b/System/Store/Logic/BuyEquipTip.cs
@@ -540,6 +540,16 @@
washAttr.SetActive(false);
return;
}
+ switch (itemAttrData.itemConfig.EquipPlace)
+ {
+ case 101:
+ case 102:
+ case 103:
+ case 104:
+ case 105:
+ washAttr.SetActive(false);
+ return;
+ }
curAttrTypeNum = 4;
washAttr.SetActive(true);
washTitleText.text = Language.Get("EquipWin_WashPropObj_Text_1");
@@ -552,6 +562,16 @@
{
gemAttr.SetActive(false);
return;
+ }
+ switch (itemAttrData.itemConfig.EquipPlace)
+ {
+ case 101:
+ case 102:
+ case 103:
+ case 104:
+ case 105:
+ gemAttr.SetActive(false);
+ return;
}
curAttrTypeNum = 5;
gemAttr.SetActive(true);
@@ -626,6 +646,16 @@
suitAttr.SetActive(false);
return;
}
+ switch (itemAttrData.itemConfig.EquipPlace)
+ {
+ case 101:
+ case 102:
+ case 103:
+ case 104:
+ case 105:
+ suitAttr.SetActive(false);
+ return;
+ }
curAttrTypeNum = 6;
}
diff --git a/System/Store/StoreModel.cs b/System/Store/StoreModel.cs
index f45e328..a6d1dbc 100644
--- a/System/Store/StoreModel.cs
+++ b/System/Store/StoreModel.cs
@@ -1059,6 +1059,7 @@
}
}
+
public void ClearPetAndMountRedpoint(StoreConfig storeConfig)
{
ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(storeConfig.ItemID);
@@ -1074,7 +1075,23 @@
}
break;
}
-
+ }
+
+ public void ClearAllPetAndMountRedpoint(StoreFunc storeFunc)
+ {
+ if (storeFuncType == StoreFunc.BindStore && storeFunc != StoreFunc.BindStore)
+ {
+ foreach(var key in shopRedDict.Keys)
+ {
+ if(shopRedDict[key].state != RedPointState.None)
+ {
+ string record = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "ShopId",key);
+ shopRedDict[key].state = RedPointState.None;
+ LocalSave.SetBool(record, false);
+ }
+ }
+ }
+
}
#endregion
diff --git a/System/Store/StoreWin.cs b/System/Store/StoreWin.cs
index 7c4d282..c708fad 100644
--- a/System/Store/StoreWin.cs
+++ b/System/Store/StoreWin.cs
@@ -146,6 +146,8 @@
protected override void OnPreClose()
{
+ m_storeModel.ClearAllPetAndMountRedpoint(StoreFunc.WeekStore);
+ m_storeModel.storeFuncType = StoreFunc.WeekStore;
m_storeModel.shoplist.Clear();
m_storeModel.RefreshBuyShopLimitEvent -= OnCreate;
GlobalTimeEvent.Instance.secondEvent -= RefreshResetTime;
@@ -432,6 +434,7 @@
private void OnClickIntegralStore()
{
+ m_storeModel.ClearAllPetAndMountRedpoint(StoreFunc.IntegralStore);
m_storeModel.shoplist.Clear();
m_storeModel.storeFuncType = StoreFunc.IntegralStore;
OnCreate();
@@ -441,6 +444,7 @@
private void OnClickBindStore()
{
+ m_storeModel.ClearAllPetAndMountRedpoint(StoreFunc.BindStore);
m_storeModel.shoplist.Clear();
m_storeModel.storeFuncType = StoreFunc.BindStore;
OnCreate();
@@ -450,6 +454,7 @@
private void OnClickStrengthStore()
{
+ m_storeModel.ClearAllPetAndMountRedpoint(StoreFunc.GrowStrongerStore);
m_storeModel.shoplist.Clear();
m_storeModel.storeFuncType = StoreFunc.GrowStrongerStore;
OnCreate();
@@ -459,6 +464,7 @@
private void OnClickCommonStore()
{
+ m_storeModel.ClearAllPetAndMountRedpoint(StoreFunc.CommonStore);
m_storeModel.shoplist.Clear();
m_storeModel.storeFuncType = StoreFunc.CommonStore;
OnCreate();
@@ -468,6 +474,7 @@
private void OnClickWeekStore()
{
+ m_storeModel.ClearAllPetAndMountRedpoint(StoreFunc.WeekStore);
m_storeModel.storeFuncType = StoreFunc.WeekStore;
OnCreate();
RefreshResetTime();
diff --git a/System/Strengthening/EquipWashModel.cs b/System/Strengthening/EquipWashModel.cs
index c38a449..8a2271c 100644
--- a/System/Strengthening/EquipWashModel.cs
+++ b/System/Strengthening/EquipWashModel.cs
@@ -44,9 +44,13 @@
public delegate void OnRefreshWashModel();
public event OnRefreshWashModel RefreshWashModelEvent;
+ public int[] washGroups1 { get; private set; }
+ public int[] washGroups2 { get; private set; }
+ public int[] washGroups3 { get; private set; }
+
private Dictionary<int, WashProCount> washEquipProDict = new Dictionary<int, WashProCount>();
private FuncConfigConfig funcModel;
- private Dictionary<int, int> _equipWashLimitDict;
+ private Dictionary<int, Dictionary<int, int>> _equipWashLimitDict = new Dictionary<int, Dictionary<int, int>>();
private List<WashProCount> orderWashProlist = new List<WashProCount>();
PlayerPackModel _playerPack;
PlayerPackModel playerPack
@@ -88,10 +92,31 @@
public override void Init()
{
- _equipWashLimitDict = null;
- funcModel = Config.Instance.Get<FuncConfigConfig>("EquipWashMaxLV");
- if (funcModel != null)
- _equipWashLimitDict = ConfigParse.GetDic<int, int>(funcModel.Numerical1);
+ _equipWashLimitDict.Clear();
+ FuncConfigConfig washGroup1Model = Config.Instance.Get<FuncConfigConfig>("EquipWashGroup1");
+ FuncConfigConfig washGroup2Model = Config.Instance.Get<FuncConfigConfig>("EquipWashGroup2");
+ FuncConfigConfig washGroup3Model = Config.Instance.Get<FuncConfigConfig>("EquipWashGroup3");
+ washGroups1 = ConfigParse.GetMultipleStr<int>(washGroup1Model.Numerical1);
+ washGroups2 = ConfigParse.GetMultipleStr<int>(washGroup2Model.Numerical1);
+ washGroups3 = ConfigParse.GetMultipleStr<int>(washGroup3Model.Numerical1);
+ SetEquipWashMaxLV(washGroups1, washGroup1Model.Numerical2);
+ SetEquipWashMaxLV(washGroups2, washGroup2Model.Numerical2);
+ SetEquipWashMaxLV(washGroups3, washGroup3Model.Numerical2);
+ }
+
+ private void SetEquipWashMaxLV(int[] groups,string limit)
+ {
+ Dictionary<int,int> limitDict = ConfigParse.GetDic<int, int>(limit);
+ if (groups != null && limitDict != null)
+ {
+ for (int i = 0; i < groups.Length; i++)
+ {
+ if (!_equipWashLimitDict.ContainsKey(groups[i]))
+ {
+ _equipWashLimitDict.Add(groups[i], limitDict);
+ }
+ }
+ }
}
public override void UnInit()
@@ -302,28 +327,22 @@
//寰楀埌娲楃粌缇ょ粍绫诲瀷
public int OnGetWashType(int itemPlace)
{
- FuncConfigConfig washGroup1Model = Config.Instance.Get<FuncConfigConfig>("EquipWashGroup1");
- FuncConfigConfig washGroup2Model = Config.Instance.Get<FuncConfigConfig>("EquipWashGroup2");
- FuncConfigConfig washGroup3Model = Config.Instance.Get<FuncConfigConfig>("EquipWashGroup3");
- int[] _equipPlacelist1 = ConfigParse.GetMultipleStr<int>(washGroup1Model.Numerical1);
- int[] _equipPlacelist2 = ConfigParse.GetMultipleStr<int>(washGroup2Model.Numerical1);
- int[] _equipPlacelist3 = ConfigParse.GetMultipleStr<int>(washGroup3Model.Numerical1);
int i = 0;
- for (i = 0; i < _equipPlacelist1.Length; i++)
+ for (i = 0; i < washGroups1.Length; i++)
{
- if (_equipPlacelist1[i] == itemPlace)
+ if (washGroups1[i] == itemPlace)
return 1;
}
- for (i = 0; i < _equipPlacelist2.Length; i++)
+ for (i = 0; i < washGroups2.Length; i++)
{
- if (_equipPlacelist2[i] == itemPlace)
+ if (washGroups2[i] == itemPlace)
return 2;
}
- for (i = 0; i < _equipPlacelist3.Length; i++)
+ for (i = 0; i < washGroups3.Length; i++)
{
- if (_equipPlacelist3[i] == itemPlace)
+ if (washGroups3[i] == itemPlace)
return 3;
}
return 0;
@@ -391,16 +410,31 @@
/// </summary>
/// <param name="equipLv"></param>
/// <returns></returns>
- public int GetWashFullLv(int equipLv)
+ public int GetWashFullLv(int equipPlace,int equipLv)
{
- if (_equipWashLimitDict == null)
- return 0;
-
- if (_equipWashLimitDict.ContainsKey(equipLv))
- return _equipWashLimitDict[equipLv];
- else
- return 0;
+ if (_equipWashLimitDict.ContainsKey(equipPlace))
+ {
+ if(_equipWashLimitDict[equipPlace].ContainsKey(equipLv))
+ {
+ return _equipWashLimitDict[equipPlace][equipLv];
+ }
+ }
+ return 0;
}
+
+ public int GetEquipWashMinLv(int equipPlace)
+ {
+ if (_equipWashLimitDict.ContainsKey(equipPlace))
+ {
+ List<int> lvlist = _equipWashLimitDict[equipPlace].Keys.ToList();
+ if (lvlist != null && lvlist.Count > 0)
+ {
+ return lvlist[0];
+ }
+ }
+ return 0;
+ }
+
/// <summary>
/// 鍒ゆ柇褰撳墠瑁呭鏄惁娲楃粌婊¢樁
@@ -413,7 +447,7 @@
return false;
chinItemModel = Config.Instance.Get<ItemConfig>((int)model.itemInfo.ItemID);
- int fullLv = GetWashFullLv(chinItemModel.LV);
+ int fullLv = GetWashFullLv(chinItemModel.EquipPlace,chinItemModel.LV);
if (washPro.XLAttrLV == fullLv)
{
if (washPro.proValuelist[0].XLAttrValue < tagEquipWash.attMax1)
@@ -443,41 +477,37 @@
public bool IsCanWash(ItemModel model)
{
- if (model == null || _equipWashLimitDict == null)
+ if (model == null)
return false;
chinItemModel = Config.Instance.Get<ItemConfig>((int)model.itemInfo.ItemID);
- int[] equipLvs = _equipWashLimitDict.Keys.ToArray();
- if (chinItemModel.LV >= equipLvs[0])
+ if(chinItemModel.LV >= GetEquipWashMinLv(chinItemModel.EquipPlace))
+ {
return true;
- else
- return false;
- }
-
- public int WashMinLV()
- {
- if (_equipWashLimitDict == null)
- return -1;
-
- int[] equipLvs = _equipWashLimitDict.Keys.ToArray();
- return equipLvs[0];
+ }
+ return false;
}
/// <summary>
/// 寰楀埌瑁呭浣嶆渶澶ф礂缁冪瓑绾�
/// </summary>
/// <returns></returns>
- public int GetMaxWashLv()
+ public int GetMaxWashLv(int equipPlace)
{
- if (_equipWashLimitDict == null)
- return 0;
- int[] washLvs = _equipWashLimitDict.Values.ToArray();
- return washLvs[washLvs.Length - 1];
+ if (_equipWashLimitDict.ContainsKey(equipPlace))
+ {
+ List<int> washLvlist = _equipWashLimitDict[equipPlace].Values.ToList();
+ if (washLvlist != null && washLvlist.Count > 0)
+ {
+ return washLvlist[washLvlist.Count - 1];
+ }
+ }
+ return 0;
}
public string GetCurWashLvStr(WashProCount washPro, EquipWashConfig tagEquipWash)
{
- int maxWashLv = GetMaxWashLv();
+ int maxWashLv = GetMaxWashLv(washPro.EquipPlace);
if (washPro.XLAttrLV < maxWashLv)
{
diff --git a/System/Strengthening/GodBeastAttributes.cs b/System/Strengthening/GodBeastAttributes.cs
index a790887..6eda79e 100644
--- a/System/Strengthening/GodBeastAttributes.cs
+++ b/System/Strengthening/GodBeastAttributes.cs
@@ -40,6 +40,9 @@
[SerializeField] Button m_StrengthenDoubleBtn;//鍙屽�嶅己鍖栨寜閽�
[SerializeField] Text m_NeedFairy;//鎵�闇�鐨勪粰鐜�
[SerializeField] GameObject m_BottomBox;
+
+ [SerializeField] Text m_Text_Attributes3;
+ [SerializeField] Text m_Text_Attributes4;
DogzModel Dogz_model;
DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } }
PlayerPackModel _playerPack;
@@ -72,6 +75,8 @@
}
GodBeastReinforcementWin.ChooseToModify += ChooseToModify;
godBeastModel.AbsorbEvent += AbsorbEvent;
+ m_Text_Attributes3.gameObject.SetActive(false);
+ m_Text_Attributes4.gameObject.SetActive(false);
}
private void OnDisable()
{
@@ -286,6 +291,8 @@
m_FullLevel.SetActive(false);
m_UIAlphaTween.gameObject.SetActive(false);
m_BottomBox.SetActive(false);
+ m_Text_Attributes3.gameObject.SetActive(false);
+ m_Text_Attributes4.gameObject.SetActive(false);
}
}
@@ -327,7 +334,8 @@
}
else
{
-
+ m_Text_Attributes3.gameObject.SetActive(false);
+ m_Text_Attributes4.gameObject.SetActive(false);
m_StrengthenDoubleBtn.interactable = true;
m_StrengthenBtn.interactable = true;
m_Text_two.SetActive(true);
@@ -348,6 +356,8 @@
}
else
{
+ m_Text_Attributes3.gameObject.SetActive(false);
+ m_Text_Attributes4.gameObject.SetActive(false);
if (m_DoubleToggle.isOn)
{
m_StrengthenBtn.gameObject.SetActive(false);
@@ -596,25 +606,28 @@
}
private void FullLevelAttributes()//璁剧疆婊$骇灞炴��
{
+ m_TextAttributes1.gameObject.SetActive(false);
+ m_TextAttributesAdd1.gameObject.SetActive(false);
+ m_TextAttributes2.gameObject.SetActive(false);
+ m_TextAttributesAdd2.gameObject.SetActive(false);
var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, DogZLv);
int[] AttType = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attType);
int[] AttValue = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attValue);
- m_TextAttributesAdd1.gameObject.SetActive(false);
- m_TextAttributesAdd2.gameObject.SetActive(false);
if (AttType.Length > 1)
{
- m_TextAttributes1.gameObject.SetActive(true);
- m_TextAttributes2.gameObject.SetActive(true);
+ m_Text_Attributes3.gameObject.SetActive(true);
+ m_Text_Attributes4.gameObject.SetActive(true);
string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
string StrName2 = Config.Instance.Get<PlayerPropertyConfig>(AttType[1]).Name;
- m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
- m_TextAttributes2.text = StrName2 + ":" + AttValue[1];
+ m_Text_Attributes3.text = StrName1 + ":" + AttValue[0];
+ m_Text_Attributes4.text = StrName2 + ":" + AttValue[1];
}
else
{
- m_TextAttributes2.gameObject.SetActive(false);
+ m_Text_Attributes3.gameObject.SetActive(true);
+ m_Text_Attributes4.gameObject.SetActive(false);
string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
- m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
+ m_Text_Attributes3.text = StrName1 + ":" + AttValue[0];
}
}
}
diff --git a/System/Strengthening/GodBeastEntry.cs b/System/Strengthening/GodBeastEntry.cs
index 92c6ba7..78902df 100644
--- a/System/Strengthening/GodBeastEntry.cs
+++ b/System/Strengthening/GodBeastEntry.cs
@@ -17,7 +17,7 @@
[SerializeField] GameObject m_Selectedbar_Image;
[SerializeField] Text m_Item_Text;
[SerializeField] Button m_GodBeastButton;
-
+ [SerializeField] RedpointBehaviour m_RedPoint;
public Button GodBeastButton
{
get { return m_GodBeastButton; }
@@ -25,7 +25,8 @@
}
DogzModel Dogz_model;
- DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } }
+ DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } }
+ GodBeastModel godBeastModel { get { return ModelCenter.Instance.GetModel<GodBeastModel>(); } }
public void GetGodBeastLocationMarker(int locationMarker, int currentlySelected)
{
int godBeastNumber = locationMarker % 100;//绁炲吔缂栧彿
@@ -38,6 +39,10 @@
if (itemModel[i].EquipPlace == godBeastPart)
{
ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, 0);//涓嶆樉绀虹粦瀹�
+ if (godBeastModel.GodBeastRedPointDic.ContainsKey(itemModel[i].itemInfo.ItemPlace))
+ {
+ m_RedPoint.redpointId = godBeastModel.GodBeastRedPointDic[(itemModel[i].itemInfo.ItemPlace)].id;
+ }
m_itemCell.Init(ItemModel);
var itemConfig = Config.Instance.Get<ItemConfig>(itemModel[i].itemId);
var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
diff --git a/System/Strengthening/GodBeastModel.cs b/System/Strengthening/GodBeastModel.cs
index 5a8d41c..395f080 100644
--- a/System/Strengthening/GodBeastModel.cs
+++ b/System/Strengthening/GodBeastModel.cs
@@ -23,6 +23,8 @@
DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } }
PlayerPackModel _playerPack;
PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } }
+ public Dictionary<int, Redpoint> GodBeastRedPointDic = new Dictionary<int, Redpoint>();//key瑁呭浣嶇疆涓嬫爣(绾㈢偣)
+ private List<int> RedPointLIst = new List<int>();
private const int Redpoint_key1 = 11202;//绁炲吔寮哄寲绾㈢偣
public Redpoint redPointStre1 = new Redpoint(112, Redpoint_key1);
public override void Init()
@@ -45,11 +47,22 @@
playerPack.ItemCntReduceAct -= ItemCntReduceAct;
dogz_model.UpdateAssistDogzEvent -= UpdateAssistDogzEvent;
FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
+ DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= MakeItemAnswerEvent;
+ DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent += MakeItemAnswerEvent;
playerPack.ItemCntAddAct += ItemCntAddAct;//鐗╁搧鏁伴噺澧炲姞
playerPack.ItemCntReduceAct += ItemCntReduceAct;//鐗╁搧鏁伴噺鍑忓皯
dogz_model.UpdateAssistDogzEvent += UpdateAssistDogzEvent;
FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
+ SetRedPointID();
GodBeastRedPoint();
+ }
+
+ private void MakeItemAnswerEvent(H0721_tagMakeItemAnswer obj)
+ {
+ if ((int)obj.MakeType == (int)MakeType.Def_mitDogzEquipPlus)
+ {
+ GodBeastRedPoint();
+ }
}
private void OnFuncStateChangeEvent(int obj)
@@ -62,6 +75,11 @@
private void UpdateAssistDogzEvent()
{
+ foreach (var key in GodBeastRedPointDic.Keys)
+ {
+ GodBeastRedPointDic[key].state = RedPointState.None;
+ }
+ SetRedPointID();
GodBeastRedPoint();
}
@@ -200,7 +218,7 @@
if (_IudetDogzEquipPlus != null)
{
SingleProficiency += _IudetDogzEquipPlus[1];
- DoubleProficiency += item_Model.chinItemModel.EffectValueA1+ _IudetDogzEquipPlus[1];
+ DoubleProficiency += item_Model.chinItemModel.EffectValueA1 + _IudetDogzEquipPlus[1];
}
else
{
@@ -233,12 +251,93 @@
}
}
+
+ private void SetRedPointID()//璁剧疆绾㈢偣ID
+ {
+ GodBeastRedPointDic.Clear();
+ RedPointLIst.Clear();
+ var DogzEquipDict = dogz_model.dogzAssistStateDict;
+ foreach (var key in DogzEquipDict.Keys)
+ {
+ if (DogzEquipDict[key] == 1)
+ {
+ List<ItemModel> itemModel = dogz_model.GetDogzEquips(key);
+ for (int i = 0; i < itemModel.Count; i++)
+ {
+ int IndexId = itemModel[i].itemInfo.ItemPlace;
+ int RedPoint = Redpoint_key1 * 1000 + IndexId;
+ Redpoint redPointStare = new Redpoint(Redpoint_key1, RedPoint);
+ if (!GodBeastRedPointDic.ContainsKey(IndexId))
+ {
+ GodBeastRedPointDic.Add(IndexId, redPointStare);
+ RedPointLIst.Add(IndexId);
+ }
+ }
+ }
+ }
+ RedPointLIst.Sort(Compare);
+ }
+ int Compare(int x, int y)
+ {
+ ItemModel IindexitemModelx = playerPack.GetItemModelByIndex(PackType.rptDogzEquip, x);
+ ItemModel IindexitemModely = playerPack.GetItemModelByIndex(PackType.rptDogzEquip, y);
+ if (IindexitemModelx.chinItemModel.ItemColor.CompareTo(IindexitemModely.chinItemModel.ItemColor) != 0)//鍝佽川
+ {
+ return -IindexitemModelx.chinItemModel.ItemColor.CompareTo(IindexitemModely.chinItemModel.ItemColor);
+ }
+ if (IindexitemModelx.chinItemModel.StarLevel.CompareTo(IindexitemModely.chinItemModel.StarLevel) != 0)//鏄熺骇
+ {
+ return -IindexitemModelx.chinItemModel.StarLevel.CompareTo(IindexitemModely.chinItemModel.StarLevel);
+ }
+ if (IindexitemModelx.chinItemModel.EquipPlace.CompareTo(IindexitemModely.chinItemModel.EquipPlace) != 0)//瑁呭浣�
+ {
+ return IindexitemModelx.chinItemModel.EquipPlace.CompareTo(IindexitemModely.chinItemModel.EquipPlace);
+ }
+ if (GetLV(IindexitemModelx).CompareTo(GetLV(IindexitemModely)) != 0)//寮哄寲绛夌骇
+ {
+ return -GetLV(IindexitemModelx).CompareTo(GetLV(IindexitemModely));
+ }
+ if (GetProficiency(IindexitemModelx).CompareTo(GetProficiency(IindexitemModely)) != 0)//鐔熺粌搴�
+ {
+ return -GetProficiency(IindexitemModelx).CompareTo(GetProficiency(IindexitemModely));
+ }
+ if (IindexitemModelx.equipScore.CompareTo(IindexitemModely.equipScore) != 0)//瑁呭璇勫垎
+ {
+ return -IindexitemModelx.equipScore.CompareTo(IindexitemModely.equipScore);
+ }
+ return 1;
+ }
+
+ private int GetLV(ItemModel _ItemModel)
+ {
+ var IudetDogzEquipPlus = _ItemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
+ if (IudetDogzEquipPlus != null)
+ {
+ return IudetDogzEquipPlus[0];
+ }
+ return 0;
+ }
+ private int GetProficiency(ItemModel _ItemModel)
+ {
+ var IudetDogzEquipPlus = _ItemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
+ if (IudetDogzEquipPlus != null)
+ {
+ return IudetDogzEquipPlus[1];
+ }
+ return 0;
+ }
+ public int IndexId = 0;
private void GodBeastRedPoint()//绁炲吔寮哄寲绾㈢偣
{
bool Istrue = false;
+ bool IsRedPoint = false;
int ItemColor = 10;
var DogzEquipDict = dogz_model.dogzAssistStateDict;
- redPointStre1.state = RedPointState.None;
+ IndexId = 0;
+ foreach (var key in GodBeastRedPointDic.Keys)
+ {
+ GodBeastRedPointDic[key].state = RedPointState.None;
+ }
int Type = 0;
foreach (var key in DogzEquipDict.Keys)
{
@@ -278,25 +377,55 @@
var itemModelBack = BackpackDic[keyBack];
if (itemModelBack.chinItemModel.Type == 70)//鏈夌鍏芥按鏅舵椂鐨勭孩鐐�
{
- redPointStre1.state = RedPointState.Simple;
- return;
+ IsRedPoint = true;
}
if (itemModelBack.chinItemModel.ItemColor < _ItemColor)
{
_ItemColor = itemModelBack.chinItemModel.ItemColor;
}
}
- if (Type >= dogz_model.curSumAssistNum && ItemColor> _ItemColor)//鍑烘垬绁炲吔宸叉弧锛屼笖绁炲吔鑳屽寘鏈夊搧璐ㄤ綆浜庡凡鍔╂垬绁炲吔鍝佽川棰滆壊鏃�
+ if (Type >= dogz_model.curSumAssistNum && ItemColor > _ItemColor)//鍑烘垬绁炲吔宸叉弧锛屼笖绁炲吔鑳屽寘鏈夊搧璐ㄤ綆浜庡凡鍔╂垬绁炲吔鍝佽川棰滆壊鏃�
{
- redPointStre1.state = RedPointState.Simple;
- return;
+ IsRedPoint = true;
}
}
}
}
+
+ if (IsRedPoint)
+ {
+ int Lv = 100;
+ for (int i = 0; i < RedPointLIst.Count; i++)
+ {
+ ItemModel _itemModel = playerPack.GetItemModelByIndex(PackType.rptDogzEquip, RedPointLIst[i]);
+ int MaxLv= QualityLimit[_itemModel.chinItemModel.ItemColor];//鑾峰彇鏈�澶у己鍖栫瓑绾�
+ var _IudetDogzEquipPlus = _itemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
+ if (_IudetDogzEquipPlus != null)
+ {
+ if (_IudetDogzEquipPlus[0]<MaxLv && _IudetDogzEquipPlus[0] < Lv)
+ {
+ Lv = _IudetDogzEquipPlus[0];
+ IndexId = RedPointLIst[i];
+ }
+ }
+ else
+ {
+ if (0 < Lv)
+ {
+ Lv = 0;
+ IndexId = RedPointLIst[i];
+ }
+ }
+ }
+ if (GodBeastRedPointDic.ContainsKey(IndexId))
+ {
+ GodBeastRedPointDic[IndexId].state = RedPointState.Simple;
+ }
+ }
+
}
- public bool IsNeedEquipment()//鏄惁鏈夋瀬鍝佽澶囬渶瑕佸脊妗�
+ public bool IsNeedEquipment()//鏄惁鏈夋瀬鍝佽澶囬渶瑕佸脊妗�
{
bool IsBool = false;
foreach (var key in Absorption_Dic.Keys)
@@ -309,7 +438,7 @@
IsBool = true;
}
}
-
+
}
return IsBool;
}
diff --git a/System/Strengthening/GodBeastReinforcementWin.cs b/System/Strengthening/GodBeastReinforcementWin.cs
index d4d1dd2..c415375 100644
--- a/System/Strengthening/GodBeastReinforcementWin.cs
+++ b/System/Strengthening/GodBeastReinforcementWin.cs
@@ -3,6 +3,7 @@
// [ Date ]: Thursday, August 16, 2018
//--------------------------------------------------------
+using EnhancedUI.EnhancedScroller;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -40,22 +41,24 @@
private List<GodBeastClass> GodBeastList = new List<GodBeastClass>();
private int CurrentlySelected = 0;
private int JumpIndex = 0;
+ public int Offset = 0;//鍋忕Щ閲�
#region Built-in
protected override void BindController()
- {
+ {
+ m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
}
protected override void AddListeners()
- {
-
+ {
+
}
protected override void OnPreOpen()
{
CurrentlySelected = 0;
GetGodBeast();//鑾峰彇绁炲吔寮哄寲瑁呭淇℃伅
- m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
- if (godBeastModel.ItemPlace != -1)
+
+ if (godBeastModel.ItemPlace != -1)//瑁呭寮哄寲璺宠浆閫変腑
{
for (int i = 0; i < GodBeastList.Count; i++)
{
@@ -74,23 +77,45 @@
}
else
{
- if (GodBeastList.Count > 0)
+
+ if (godBeastModel.redPointStre1.state == RedPointState.Simple)//寮哄寲绾㈢偣閫変腑
{
- CurrentlySelected = GodBeastList[0].LocationMarker;
- GetDogZBagIndex();
- JumpIndex = 0;
+ for (int i = 0; i < GodBeastList.Count; i++)
+ {
+ if (GodBeastList[i].ItemPlace == godBeastModel.IndexId)
+ {
+ JumpIndex = i;
+ CurrentlySelected = GodBeastList[i].LocationMarker;
+ GetDogZBagIndex();
+ }
+ }
+ }
+ else
+ {
+ if (GodBeastList.Count > 0)//榛樿閫変腑涓�
+ {
+ CurrentlySelected = GodBeastList[0].LocationMarker;
+ GetDogZBagIndex();
+ JumpIndex = 0;
+ }
}
}
OnCreateGridLineCell(m_ScrollerController);
m_GodBeastSlidingList.Init();
m_GodBeastAttributes.Init();
m_GodBeastAttributes.GetGodBeastLocationMarker(CurrentlySelected);
- m_ScrollerController.JumpIndex(JumpIndex);
+
}
+ protected override void OnActived()
+ {
+ var offset = 0f;
+ m_ScrollerController.JumpIndex(JumpIndex,ref offset);
+ m_ScrollerController.JumpIndex(Offset + offset, 0, EnhancedScroller.TweenType.immediate);
+ }
protected override void OnAfterOpen()
{
playerPack.RefreshItemCountAct += RefreshItemCountAct;
@@ -102,7 +127,6 @@
JumpIndex = 0;
godBeastModel.ItemPlace = -1;
playerPack.RefreshItemCountAct -= RefreshItemCountAct;
- m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= MakeItemAnswerEvent;
}
diff --git a/System/Strengthening/GodBeastSlidingList.cs b/System/Strengthening/GodBeastSlidingList.cs
index 5f5b8f2..c0a5b8e 100644
--- a/System/Strengthening/GodBeastSlidingList.cs
+++ b/System/Strengthening/GodBeastSlidingList.cs
@@ -45,7 +45,10 @@
PlayerPackModel _playerPack;
PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } }
GodBeastModel godBeastModel { get { return ModelCenter.Instance.GetModel<GodBeastModel>(); } }
+ private void Awake()
+ {
+ }
private void Start()
{
m_Arrow.AddListener(OnClickArrow);
@@ -132,6 +135,7 @@
public void Init()
{
Quality = 10;
+ LINE = Mathf.CeilToInt((float)100 / 3);
ContentSelect(Quality);
if (m_ScrollViewFirst.activeSelf)
{
@@ -303,7 +307,7 @@
else
{
return;
- }
+ }
}
}
}
@@ -381,12 +385,19 @@
int childCode = 0;
for (childCode = 0; childCode < cell.transform.childCount; childCode++)
{
+
GodBeastChildNodes GodBeastChildNodes = cell.transform.GetChild(childCode).GetComponent<GodBeastChildNodes>();
+ int cellCount = (cell.transform.childCount) * gridlineIndex + (childCode + 1);
+ if (cellCount > 100)
+ {
+ GodBeastChildNodes.gameObject.SetActive(false);
+ continue;
+ }
+ GodBeastChildNodes.gameObject.SetActive(true);
GodBeastChildNodes.ItemCell.gameObject.SetActive(false);
GodBeastChildNodes.ChoosenImg.SetActive(false);
GodBeastChildNodes.TextNumber.gameObject.SetActive(false);
GodBeastChildNodes.NumberNow.gameObject.SetActive(false);
- int cellCount = (cell.transform.childCount) * gridlineIndex + (childCode + 1);
GodBeastChildNodes.ButtonDown.RemoveAllListeners();
if (cellCount - 1 < GodBeastBagList.Count)
{
@@ -401,7 +412,7 @@
if (godBeastModel.Absorption_Dic.ContainsKey(godBeastBagClass.Index))
{
GodBeastChildNodes.ChoosenImg.SetActive(true);
- if (itemModel.EquipPlace <= 0)
+ if (itemModel.EquipPlace <= 0 && itemModel.itemInfo.ItemCount>1)
{
GodBeastChildNodes.NumberNow.gameObject.SetActive(true);
GodBeastChildNodes.NumberNow.text = godBeastModel.Absorption_Dic[godBeastBagClass.Index].ToString();
@@ -424,9 +435,26 @@
}
else//閫変腑鐨勭墿鍝佷负姘存櫠
{
- godBeastModel.Crystal_ItemModel = itemModel;
- godBeastModel.ItemInde = godBeastBagClass.Index;
- WindowCenter.Instance.Open<CrystalSelectionWin>();
+ if (itemModel.itemInfo.ItemCount <= 1)
+ {
+ if (godBeastModel.Absorption_Dic.ContainsKey(godBeastBagClass.Index))
+ {
+ godBeastModel.Absorption_Dic.Remove(godBeastBagClass.Index);
+ }
+ else
+ {
+ godBeastModel.Absorption_Dic.Add(godBeastBagClass.Index, 1);
+ }
+ m_ScrollerController.m_Scorller.RefreshActiveCellViews();//鍒锋柊鍙
+ }
+ else
+ {
+ godBeastModel.Crystal_ItemModel = itemModel;
+ godBeastModel.ItemInde = godBeastBagClass.Index;
+ WindowCenter.Instance.Open<CrystalSelectionWin>();
+
+ }
+
}
godBeastModel.AbsorbEventUpdate();
});
diff --git a/System/Strengthening/WashTips.cs b/System/Strengthening/WashTips.cs
index 66b73f8..052ace8 100644
--- a/System/Strengthening/WashTips.cs
+++ b/System/Strengthening/WashTips.cs
@@ -490,14 +490,14 @@
{
if (equipWashModel.IsWashFull(_itemModel, _washProModel, _tagWashModel))
{
- if(_washProModel.XLAttrLV >= equipWashModel.GetMaxWashLv()
- && _washProModel.XLAttrLV <= equipWashModel.GetWashFullLv(_itemModel.chinItemModel.LV))
+ if(_washProModel.XLAttrLV >= equipWashModel.GetMaxWashLv(_itemModel.chinItemModel.EquipPlace)
+ && _washProModel.XLAttrLV <= equipWashModel.GetWashFullLv(_itemModel.chinItemModel.EquipPlace, _itemModel.chinItemModel.LV))
{
_washFullLvText.text = Language.Get("WashLevelFulled");
}
else
{
- _washFullLvText.text = Language.Get("EquipWash113", _itemModel.chinItemModel.LV, equipWashModel.GetWashFullLv(_itemModel.chinItemModel.LV));
+ _washFullLvText.text = Language.Get("EquipWash113", _itemModel.chinItemModel.LV, equipWashModel.GetWashFullLv(_itemModel.chinItemModel.EquipPlace, _itemModel.chinItemModel.LV));
}
ObjHideOrShow(false, false, false, false, true);
}
@@ -536,7 +536,7 @@
}
else
{
- _washFullLvText.text = Language.Get("EquipWash114", equipWashModel.WashMinLV());
+ _washFullLvText.text = Language.Get("EquipWash114", equipWashModel.GetEquipWashMinLv(_itemModel.chinItemModel.EquipPlace));
ObjHideOrShow(false, false, false, false, true);
}
diff --git a/System/Team/MyTeamWin.cs b/System/Team/MyTeamWin.cs
index f1199d3..2e76838 100644
--- a/System/Team/MyTeamWin.cs
+++ b/System/Team/MyTeamWin.cs
@@ -412,7 +412,7 @@
m_MatchState.text = model.isMatching ? Language.Get("StopMatching") : Language.Get("TeamListAutoMatching");
if (model.isMatching)
{
- m_MatchingCoolDown.Begin(model.matchingEndTime);
+ m_MatchingCoolDown.Begin((int)(model.matchingEndTime - DateTime.Now).TotalSeconds);
}
else
{
diff --git a/System/Tip/ItemConfirmWin.cs b/System/Tip/ItemConfirmWin.cs
index 3b02f89..b53d555 100644
--- a/System/Tip/ItemConfirmWin.cs
+++ b/System/Tip/ItemConfirmWin.cs
@@ -77,7 +77,21 @@
private void ShowItemGetPath()
{
- ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(ConfirmCancel.generalItemId);
+ ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(ConfirmCancel.generalItemId);
+ if(itemConfig != null)
+ {
+ if(itemConfig.GetWay != null && itemConfig.GetWay.Length > 0)
+ {
+ ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(ConfirmCancel.generalItemId);
+ }
+ else
+ {
+ ItemAttrData attrData = new ItemAttrData(ConfirmCancel.generalItemId);
+ var tipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>();
+ tipsModel.SetItemTipsModel(attrData);
+ }
+ }
+
}
}
diff --git a/System/Treasure/TreasureData.cs b/System/Treasure/TreasureData.cs
index 2f0d824..06b418a 100644
--- a/System/Treasure/TreasureData.cs
+++ b/System/Treasure/TreasureData.cs
@@ -83,6 +83,8 @@
get; private set;
}
+ public int autoSelectPotential { get; set; }
+
Dictionary<int, List<TreasurePotential>> jobToPotentials = new Dictionary<int, List<TreasurePotential>>();
public List<TreasurePotential> potentials
@@ -197,6 +199,23 @@
}
}
+ public TreasurePotential GetPotentialByIndex(int index)
+ {
+ if (potentials == null)
+ {
+ return null;
+ }
+ else
+ {
+ if (index >= 0 && index < potentials.Count)
+ {
+ return potentials[index];
+ }
+
+ return null;
+ }
+ }
+
public void UpdatePotentialLevel(int _potentialId, int _level)
{
for (int i = 0; i < potentials.Count; i++)
diff --git a/System/Treasure/TreasureLevelUpWin.cs b/System/Treasure/TreasureLevelUpWin.cs
index d4e4c9e..5b70a10 100644
--- a/System/Treasure/TreasureLevelUpWin.cs
+++ b/System/Treasure/TreasureLevelUpWin.cs
@@ -58,6 +58,8 @@
[SerializeField] FairyTreasureCollectPanel m_TreasureFairyBehaviour;
[SerializeField] RectTransform m_ContainerSelect;
+ [SerializeField] Image m_LeftRedpoint;
+ [SerializeField] Image m_RightRedpoint;
[SerializeField] Button m_LeftBtn;
[SerializeField] Button m_RightBtn;
[SerializeField] Button m_BackBtn;
@@ -342,6 +344,11 @@
m_RightBtn.gameObject.SetActive(_leftRifht != null);
_leftRifht = Config.Instance.Get<TreasureConfig>(model.selectedTreasure - 1);
m_LeftBtn.gameObject.SetActive(_leftRifht != null);
+ var skillLevelUpRedpointTreasure = model.GetSkillLevelUpRedpointTreasure();
+ m_LeftRedpoint.gameObject.SetActive(skillLevelUpRedpointTreasure != 0
+ && model.selectedTreasure > skillLevelUpRedpointTreasure && model.currentCategory == TreasureCategory.Human);
+ m_RightRedpoint.gameObject.SetActive(skillLevelUpRedpointTreasure != 0
+ && model.selectedTreasure < skillLevelUpRedpointTreasure && model.currentCategory == TreasureCategory.Human);
}
private void HideHuman()
@@ -1196,6 +1203,14 @@
UpdateLevelUpSfx(false);
}
}
+ if (_id == TreasureModel.CATEGORY_REDPOINTIDS[(int)TreasureCategory.Human - 1])
+ {
+ var skillLevelUpRedpointTreasure = model.GetSkillLevelUpRedpointTreasure();
+ m_LeftRedpoint.gameObject.SetActive(skillLevelUpRedpointTreasure != 0
+ && model.selectedTreasure > skillLevelUpRedpointTreasure && model.currentCategory == TreasureCategory.Human);
+ m_RightRedpoint.gameObject.SetActive(skillLevelUpRedpointTreasure != 0
+ && model.selectedTreasure < skillLevelUpRedpointTreasure && model.currentCategory == TreasureCategory.Human);
+ }
}
protected override void LateUpdate()
diff --git a/System/Treasure/TreasureModel.cs b/System/Treasure/TreasureModel.cs
index d03a72e..ba7d694 100644
--- a/System/Treasure/TreasureModel.cs
+++ b/System/Treasure/TreasureModel.cs
@@ -662,10 +662,7 @@
{
potentialLevelChangeEvent(key, config.SkillTypeID);
}
- if (FuncOpen.Instance.IsFuncOpen(82))
- {
- UpdateSkillLevelUpRedpoint(treasure.id);
- }
+ UpdateSkillLevelUpRedpoints();
break;
}
}
@@ -819,14 +816,102 @@
private void UpdateSkillLevelUpRedpoints()
{
+ var list = GetTreasureCategory(TreasureCategory.Human);
+ for (int i = 0; i < list.Count; i++)
+ {
+ var id = list[i];
+ if (treasures[id].skillLevelUpRedpoint != null)
+ {
+ treasures[id].skillLevelUpRedpoint.state = RedPointState.None;
+ }
+ }
var functionOpen = FuncOpen.Instance.IsFuncOpen(82);
if (functionOpen)
{
- foreach (var id in treasures.Keys)
+ for (int k = 0; k < 3; k++)
{
- UpdateSkillLevelUpRedpoint(id);
+ for (int i = 0; i < list.Count; i++)
+ {
+ var treasure = treasures[list[i]];
+ if (k < treasure.potentials.Count)
+ {
+ var potential = treasure.potentials[k];
+ Item item;
+ if (SatisfyLevelUpUnlock(list[i], k)
+ && SatisyPotentialLevelUp(list[i], potential.id, out item))
+ {
+ treasure.skillLevelUpRedpoint.state = RedPointState.Simple;
+ treasure.autoSelectPotential = k;
+ return;
+ }
+ }
+ }
+ }
+ int minCostTreasure = 0;
+ int minCostPotentialIndex = 0;
+ int minCostItemColor = 0;
+ int minCostItemCount = 0;
+ bool step = false;
+ for (int i = 0; i < list.Count; i++)
+ {
+ var treasure = treasures[list[i]];
+ if (treasure.state != TreasureState.Collected || !treasure.IsHighestStage)
+ {
+ continue;
+ }
+ for (int k = 0; k < treasure.potentials.Count; k++)
+ {
+ Item item;
+ if (SatisyPotentialLevelUp(treasure.id, treasure.potentials[k].id, out item))
+ {
+ if (item.id != 0)
+ {
+ var itemConfig = Config.Instance.Get<ItemConfig>(item.id);
+ var itemColor = itemConfig.ItemColor;
+ if (minCostItemColor == 0 || itemColor < minCostItemColor ||
+ (itemColor == minCostItemColor && minCostItemCount < item.count))
+ {
+ minCostItemColor = itemColor;
+ minCostItemCount = item.count;
+ minCostTreasure = treasure.id;
+ minCostPotentialIndex = k;
+ }
+ }
+ else
+ {
+ minCostTreasure = treasure.id;
+ minCostPotentialIndex = k;
+ step = true;
+ break;
+ }
+ }
+ }
+ if (step)
+ {
+ break;
+ }
+ }
+ if (minCostTreasure != 0)
+ {
+ treasures[minCostTreasure].skillLevelUpRedpoint.state = RedPointState.Simple;
+ treasures[minCostTreasure].autoSelectPotential = minCostPotentialIndex;
}
}
+ }
+
+ public int GetSkillLevelUpRedpointTreasure()
+ {
+ var list = GetTreasureCategory(TreasureCategory.Human);
+ for (int i = 0; i < list.Count; i++)
+ {
+ var treasure = treasures[list[i]];
+ if (treasure.skillLevelUpRedpoint != null &&
+ treasure.skillLevelUpRedpoint.state == RedPointState.Simple)
+ {
+ return list[i];
+ }
+ }
+ return 0;
}
private void UpdateAchievementRedpoints()
@@ -927,34 +1012,47 @@
WindowCenter.Instance.Open<TreasureNewGotWin>();
}
- private void UpdateSkillLevelUpRedpoint(int _treasureId)
+ public bool SatisfyLevelUpUnlock(int treasureId, int index)
{
- if (treasures.ContainsKey(_treasureId))
+ if (treasures.ContainsKey(treasureId))
{
- var treasure = treasures[_treasureId];
- if (treasure.skillLevelUpRedpoint == null)
- {
- return;
- }
- var anyPointialLevelupAble = false;
+ var treasure = treasures[treasureId];
if (treasure.state == TreasureState.Collected && treasure.IsHighestStage)
{
- for (int i = 0; i < treasure.potentials.Count; i++)
+ if (index >= 0 && index < treasure.potentials.Count - 1)
{
- var potential = treasure.potentials[i];
- if (SatisyPotentialLevelUp(treasure.id, potential.id))
+ var potential = treasure.potentials[index];
+ var nextPotential = treasure.potentials[index + 1];
+ var skillConfig = Config.Instance.Get<SkillConfig>(nextPotential.id);
+ if (skillConfig.LearnSkillReq > 0)
{
- anyPointialLevelupAble = true;
- break;
+ if (potential.level < skillConfig.LearnSkillLV)
+ {
+ return true;
+ }
+ }
+ }
+ else if (index == treasure.potentials.Count - 1)
+ {
+ var potential = treasure.GetPotentialByIndex(index);
+ var config = Config.Instance.Get<SkillConfig>(potential.id);
+ int[] _getSkillArray;
+ if (TryGetPotentialGetSkill(config.SkillTypeID, out _getSkillArray))
+ {
+ if (potential.level < _getSkillArray[0])
+ {
+ return true;
+ }
}
}
}
- treasure.skillLevelUpRedpoint.state = anyPointialLevelupAble ? RedPointState.Simple : RedPointState.None;
}
+ return false;
}
- public bool SatisyPotentialLevelUp(int treasureId, int potentialId)
+ public bool SatisyPotentialLevelUp(int treasureId, int potentialId, out Item item)
{
+ item = default(Item);
var treasure = treasures[treasureId];
var potential = treasure.GetPotential(potentialId);
if (potential == null)
@@ -1010,6 +1108,11 @@
var own = packageModel.GetItemCountByID(PackType.rptItem, itemId);
if (own >= treasureSkillConfig.MeterialNum2[j])
{
+ item = new Item()
+ {
+ id = itemId,
+ count = treasureSkillConfig.MeterialNum2[j],
+ };
return true;
}
}
diff --git a/System/Treasure/TreasurePotentialPanel.cs b/System/Treasure/TreasurePotentialPanel.cs
index 5e05670..5948e7a 100644
--- a/System/Treasure/TreasurePotentialPanel.cs
+++ b/System/Treasure/TreasurePotentialPanel.cs
@@ -34,6 +34,7 @@
[SerializeField] Button m_RemoveBook;
[SerializeField] ImageEx m_UpgradeImage;
[SerializeField] Button m_Upgrade;
+ [SerializeField] Image m_LevelUpRed;
[SerializeField] UIEffect m_FailureEffect;
@@ -94,6 +95,9 @@
DisplayUpgradeCost();
DisplayGetSkill();
DisplaySuccessRatio();
+
+ m_LevelUpRed.gameObject.SetActive(m_Treasure.id == model.GetSkillLevelUpRedpointTreasure()
+ && m_Treasure.GetPotentialByIndex(m_Treasure.autoSelectPotential).id == selectedPotential);
}
else
{
@@ -142,14 +146,26 @@
}
}
- for (int i = 0; i < m_Treasure.potentials.Count; i++)
+ if (m_Treasure.skillLevelUpRedpoint.state == RedPointState.Simple)
{
- if (model.SatisyPotentialLevelUp(_treasure.id, m_Treasure.potentials[i].id))
+ if (m_Treasure.autoSelectPotential < m_Treasure.potentials.Count)
{
- _index = i;
- break;
+ _index = m_Treasure.autoSelectPotential;
}
}
+ else
+ {
+ for (int i = 0; i < m_Treasure.potentials.Count; i++)
+ {
+ Item item;
+ if (model.SatisyPotentialLevelUp(_treasure.id, m_Treasure.potentials[i].id, out item))
+ {
+ _index = i;
+ break;
+ }
+ }
+ }
+
selectedPotential = m_Treasure.potentials[_index].id;
@@ -272,6 +288,8 @@
if (m_Treasure != null && _id == m_Treasure.skillLevelUpRedpoint.id)
{
DisplayAddBookRedpoint();
+ m_LevelUpRed.gameObject.SetActive(m_Treasure.id == model.GetSkillLevelUpRedpointTreasure()
+ && m_Treasure.GetPotentialByIndex(m_Treasure.autoSelectPotential).id == selectedPotential);
}
}
@@ -615,7 +633,8 @@
m_AddBookRedpoint.gameObject.SetActive(false);
return;
}
- bool levelUpHighSuccess = model.SatisyPotentialLevelUp(model.selectedTreasure, model.selectedPotential);
+ Item item;
+ bool levelUpHighSuccess = model.SatisyPotentialLevelUp(model.selectedTreasure, model.selectedPotential, out item);
m_AddBookRedpoint.gameObject.SetActive(levelUpHighSuccess);
}
diff --git a/System/TreasureFindHost/TreasureFindHostModel.cs b/System/TreasureFindHost/TreasureFindHostModel.cs
index 2bb943a..8393bf7 100644
--- a/System/TreasureFindHost/TreasureFindHostModel.cs
+++ b/System/TreasureFindHost/TreasureFindHostModel.cs
@@ -145,7 +145,7 @@
ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip,condi[3]);
if(itemModel != null)
{
- if(specEquipIds != null && specEquipIds.Contains(condi[3]))
+ if(specEquipIds != null && specEquipIds.Contains(itemModel.itemId))
{
progress += 1;
return true;
diff --git a/System/Vip/LimitedTimePackageModel.cs b/System/Vip/LimitedTimePackageModel.cs
index 6fb49eb..6462389 100644
--- a/System/Vip/LimitedTimePackageModel.cs
+++ b/System/Vip/LimitedTimePackageModel.cs
@@ -20,10 +20,6 @@
OpenServerActivityCenter.Instance.Register(7, this);
OperationTimeHepler.Instance.operationEndEvent += OperationEndEvent;
}
-
-
-
- public bool IsShowPanel = false;
private const int Redpoint_key1 = 20907;
public Redpoint redPointStre1 = new Redpoint(209, Redpoint_key1);//闄愭椂绀煎寘绾㈢偣
public bool IsOpen
@@ -52,7 +48,6 @@
public void OnBeforePlayerDataInitialize()
{
- IsShowPanel = false;
DicBuyPackage.Clear();
}
public override void UnInit()
@@ -63,9 +58,13 @@
{
OperationTimeHepler.Instance.operationStartEvent -= operationStartEvent;
OperationTimeHepler.Instance.operationStartEvent += operationStartEvent;
+ OperationTimeHepler.Instance.operationAdvanceEvent -= operationAdvanceEvent;
+ OperationTimeHepler.Instance.operationAdvanceEvent += operationAdvanceEvent;
IsShowTip();
}
+
+
private void operationStartEvent(Operation arg1, int arg2)
{
@@ -78,7 +77,17 @@
}
}
}
-
+ private void operationAdvanceEvent(Operation obj)
+ {
+ if (obj == Operation.GiftPackage)
+ {
+ // IsShowTip();
+ if (onStateUpate != null)
+ {
+ onStateUpate(7);
+ }
+ }
+ }
private void OperationEndEvent(Operation arg1, int arg2)
{
if (arg1 == Operation.GiftPackage && arg2 == 0)
@@ -92,13 +101,16 @@
public void IsShowTip()
{
+ if (OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.GiftPackage))
+ {
+ return;
+ }
int GetDayOfYear = DateTime.Now.DayOfYear;
int day = LocalSave.GetInt("IsOpenLimitedTime");
bool Isbool = IsExpired();
if (day != GetDayOfYear && IsExpired())
{
- LocalSave.SetInt("IsOpenLimitedTime", GetDayOfYear);
- IsShowPanel = true;
+ // LocalSave.SetInt("IsOpenLimitedTime", GetDayOfYear);
redPointStre1.state = RedPointState.Simple;
}
else
@@ -143,7 +155,7 @@
public bool IsExpired()
{
bool IsBool = false;
- IsBool =(OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.GiftPackage)|| OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.GiftPackage));
+ IsBool = (OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.GiftPackage) || OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.GiftPackage));
bool IsBuyBool = false;
OperationBase operationBase;
if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.GiftPackage, out operationBase))
diff --git a/System/Vip/LimitedTimePackageTime.cs b/System/Vip/LimitedTimePackageTime.cs
index a99e6da..ba4fbb0 100644
--- a/System/Vip/LimitedTimePackageTime.cs
+++ b/System/Vip/LimitedTimePackageTime.cs
@@ -7,9 +7,11 @@
using UnityEngine.UI;
using System;
-namespace Snxxz.UI {
+namespace Snxxz.UI
+{
- public class LimitedTimePackageTime:MonoBehaviour {
+ public class LimitedTimePackageTime : MonoBehaviour
+ {
[SerializeField] TimerBehaviour m_Time;
[SerializeField] RectTransform m_ContainerAdvance;
@@ -83,7 +85,7 @@
void DisplayTime(int seconds)
{
m_Time.timeShow.color = seconds > 3600 ? UIHelper.GetUIColor(TextColType.Green) : UIHelper.GetUIColor(TextColType.Red);
- m_Time.Begin(DateTime.Now.AddTicks(seconds * TimeSpan.TicksPerSecond));
+ m_Time.Begin(seconds);
}
void DisplayAdvance(int seconds)
{
diff --git a/System/Vip/LimitedTimePackageWin.cs b/System/Vip/LimitedTimePackageWin.cs
index 26fbd0b..280ceb3 100644
--- a/System/Vip/LimitedTimePackageWin.cs
+++ b/System/Vip/LimitedTimePackageWin.cs
@@ -58,9 +58,10 @@
protected override void OnAfterOpen()
{
- if (limitedTimePackageItemModel.IsShowPanel)
+ if (limitedTimePackageItemModel.redPointStre1.state == RedPointState.Simple)
{
- limitedTimePackageItemModel.IsShowPanel = false;
+ int GetDayOfYear = DateTime.Now.DayOfYear;
+ LocalSave.SetInt("IsOpenLimitedTime", GetDayOfYear);
limitedTimePackageItemModel.IsShowTip();
}
diff --git a/System/Welfare/OperationBase.cs b/System/Welfare/OperationBase.cs
index 8c5892e..33b32f1 100644
--- a/System/Welfare/OperationBase.cs
+++ b/System/Welfare/OperationBase.cs
@@ -90,6 +90,10 @@
{
return time.Hour < DayResetHour;
}
+ if (indexOfDays < totalDays)
+ {
+ return true;
+ }
break;
}
return false;
diff --git a/System/Welfare/OperationTimeHepler.cs b/System/Welfare/OperationTimeHepler.cs
index 6ffca8e..2e2a544 100644
--- a/System/Welfare/OperationTimeHepler.cs
+++ b/System/Welfare/OperationTimeHepler.cs
@@ -310,6 +310,7 @@
operation.startDate = ParseOperationDate(package.StartDate);
operation.endDate = ParseOperationDate(package.EndtDate);
operation.limitLv = package.LimitLV;
+ operation.resetType = package.ResetType;
if (operationTimeUpdateEvent != null)
{
operationTimeUpdateEvent(Operation.FairyCeremony);
diff --git a/System/WindowJump/WindowJumpMgr.cs b/System/WindowJump/WindowJumpMgr.cs
index 3322f73..031cc2e 100644
--- a/System/WindowJump/WindowJumpMgr.cs
+++ b/System/WindowJump/WindowJumpMgr.cs
@@ -46,7 +46,7 @@
TrialDungeonModel trialDungeonModel { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } }
ImpactRankModel rankModel { get { return ModelCenter.Instance.GetModel<ImpactRankModel>(); } }
ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
-
+ MapModel mapModel { get { return ModelCenter.Instance.GetModel<MapModel>(); } }
public bool IsJumpState { get; private set; }
public int jumpPhase { get; private set;}
public int jumpType { get; private set; }
@@ -87,263 +87,8 @@
public void WindowJumpTo(JumpUIType jumpType)
{
- _tagWinSearchModel = Config.Instance.Get<WindowSearchConfig>((int)jumpType);
-
- if (_tagWinSearchModel == null)
- {
- return;
- }
-
- if (!FuncOpen.Instance.IsFuncOpen(_tagWinSearchModel.Lv) && _tagWinSearchModel.Lv != 0)
- {
- FuncOpen.Instance.ProcessorFuncErrorTip(_tagWinSearchModel.Lv);
- return;
- }
-
- switch (jumpType)
- {
- case JumpUIType.UnionFunc1:
- case JumpUIType.UnionFunc2:
- case JumpUIType.UnionWarehouse:
- case JumpUIType.UnionHall:
- case JumpUIType.UnionTask:
- case JumpUIType.UnionTask2:
- case JumpUIType.UnionActive1:
- case JumpUIType.UnionActive2:
- case JumpUIType.UnionBoss:
- if (!PlayerDatas.Instance.fairyData.HasFairy)
- {
- SysNotifyMgr.Instance.ShowTip("DailyQuestwinUnionLimit");
- return;
- }
- break;
- case JumpUIType.UnionMethod:
- if (!fairyModel.fairyMethodToOpen)
- {
- fairyModel.ProcessMethodToErrorTip();
- return;
- }
- break;
- case JumpUIType.UnionStore:
- if (!fairyModel.fairyStoreOpen)
- {
- fairyModel.ProcessErrorTip();
- return;
- }
- break;
- case JumpUIType.TreasureFindHostFunc1:
- case JumpUIType.TreasureFindHostFunc2:
- case JumpUIType.TreasureFindHostFunc3:
- case JumpUIType.TreasureFindHostFunc1Type2:
- case JumpUIType.TreasureFindHostFunc2Type2:
- case JumpUIType.TreasureFindHostFunc3Type2:
- bool isUnlock = hostModel.IsUnlockTreasure(int.Parse(_tagWinSearchModel.SelectActive));
- if (!isUnlock)
- {
- hostModel.jumpTreasureId = 0;
- return;
- }
- break;
- case JumpUIType.FirstRecharge:
- var model = ModelCenter.Instance.GetModel<VipModel>();
- if (model.firstChargeRewardGet)
- {
- model.AreadyGetFirstRecharge();
- return;
- }
- break;
- case JumpUIType.XMZZBattle:
- case JumpUIType.AncientBattle:
- case JumpUIType.IceCrystal:
- case JumpUIType.FairyLand:
- DailyQuestConfig dailyConfig = Config.Instance.Get<DailyQuestConfig>(_tagWinSearchModel.SelectActive);
- if (dailyQuestModel.GetQuestState(dailyConfig.ID) != DailyQuestModel.DailyQuestState.Normal)
- {
- SysNotifyMgr.Instance.ShowTip("FBIsNotOpen");
- return;
- }
- break;
- case JumpUIType.PlotTaskFunc3:
- var taskmodel = ModelCenter.Instance.GetModel<PlayerTaskDatas>();
- if (taskmodel.SideQuestsDic.Count < 1)
- {
- SysNotifyMgr.Instance.ShowTip("SideQuest_None");
- return;
- }
- break;
- case JumpUIType.PrayforDrug:
- var prayModel = ModelCenter.Instance.GetModel<PrayForDurgModel>();
- if(!prayModel.CheckPrayDrugIsOpen())
- {
- return;
- }
- break;
- case JumpUIType.FaBaoSoul_BenYuan:
- case JumpUIType.FaBaoSoul_FengMo:
- case JumpUIType.FaBaoSoul_Strength:
- case JumpUIType.FaBaoSoul_Rune:
- case JumpUIType.FaBaoSoul_Mount:
- case JumpUIType.FaBaoSoul_Pet:
- case JumpUIType.FaBaoSoul_Boss:
- case JumpUIType.FaBaoSoul_Wings:
- case JumpUIType.FaBaoSoul_Suit:
- case JumpUIType.FaBaoSoul_Wash:
- var soulId = 0;
- if (int.TryParse(_tagWinSearchModel.SelectActive, out soulId))
- {
- var soulModel = ModelCenter.Instance.GetModel<TreasureSoulModel>();
- if (!soulModel.IsOpenTreasureSoul(soulId))
- {
- return;
- }
- }
- else
- {
- return;
- }
- break;
- case JumpUIType.TrialExchange:
- if (!trialDungeonModel.CompleteTrialFloor(0))
- {
- trialDungeonModel.ProcessOpenTrialExchangeError();
- return;
- }
- break;
- case JumpUIType.Kylin:
- case JumpUIType.Kylin1:
- case JumpUIType.Kylin2:
- case JumpUIType.Kylin3:
- case JumpUIType.Kylin4:
- case JumpUIType.Kylin5:
- case JumpUIType.Kylin6:
- if (!FuncOpen.Instance.IsFuncOpen(85))
- {
- FuncOpen.Instance.ProcessorFuncErrorTip((int)FuncOpenEnum.Kylin);
- return;
- }
- break;
- case JumpUIType.OpenServerMountRank:
- var type = int.Parse(_tagWinSearchModel.SelectActive);
- if (rankModel.IsLock(type))
- {
- SysNotifyMgr.Instance.ShowTip("InOperationTimeError");
- return;
- }
- if (TimeUtility.OpenDay >= rankModel.openServerActivityDays)
- {
- SysNotifyMgr.Instance.ShowTip("ActiveOutTime");
- return;
- }
- break;
- case JumpUIType.FlashSale:
- {
- if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
- {
- OperationTimeHepler.Instance.ProcessConditionError(Operation.FlashSale);
- return;
- }
- }
- break;
- case JumpUIType.ConsumreRebate:
- {
- if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
- {
- OperationTimeHepler.Instance.ProcessConditionError(Operation.ConsumeRebate);
- return;
- }
- }
- break;
- case JumpUIType.LimitedTimePackage:
- {
- if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
- {
- OperationTimeHepler.Instance.ProcessConditionError(Operation.GiftPackage);
- return;
- }
- }
- break;
- case JumpUIType.BossReborn:
- {
- if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
- {
- OperationTimeHepler.Instance.ProcessConditionError(Operation.BossReborn);
- return;
- }
- }
- break;
- case JumpUIType.VipRechargeFunc3:
- {
- if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
- {
- ModelCenter.Instance.GetModel<FairyJadeInvestmentModel>().MessageNotification();
- return;
- }
- }
- break;
- case JumpUIType.VipRechargeFunc5:
- if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
- {
- return;
- }
- break;
- case JumpUIType.OpenServerRank:
- case JumpUIType.OSTimeLimitGift:
- case JumpUIType.OpenServerActivityFunc2_1:
- case JumpUIType.OpenServerActivityFunc2_2:
- if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
- {
- SysNotifyMgr.Instance.ShowTip("ActiveOutTime");
- return;
- }
- break;
- case JumpUIType.OpenServerGift1:
- case JumpUIType.OpenServerGift2:
- case JumpUIType.OpenServerGift3:
- var giftModel = ModelCenter.Instance.GetModel<OSGiftModel>();
- int giftId = 0;
- int.TryParse(_tagWinSearchModel.SelectActive, out giftId);
- if (!giftModel.CheckActivate())
- {
- if (PlayerDatas.Instance.baseData.coinPointTotal <= 0
- || !ModelCenter.Instance.GetModel<VipModel>().firstChargeRewardGet)
- {
- SysNotifyMgr.Instance.ShowTip("GiftNoOpen");
- }
- else if (giftModel.IsGiftBuy(giftId))
- {
- SysNotifyMgr.Instance.ShowTip("GiftAlreadyBuy");
- }
- else if (giftModel.IsGiftOverdue(giftId))
- {
- SysNotifyMgr.Instance.ShowTip("MissSell");
- }
- return;
- }
- break;
- case JumpUIType.OpenServerGift:
- return;
- case JumpUIType.EquipCompose1:
- case JumpUIType.EquipCompose2:
- case JumpUIType.EquipCompose3:
- case JumpUIType.EquipCompose4:
- case JumpUIType.ComposeTicketFairy:
- case JumpUIType.ComposeTicketGod:
- case JumpUIType.ComposeTicketIce:
- int[] types = ConfigParse.GetMultipleStr<int>(_tagWinSearchModel.SelectActive);
- if (types.Length > 0)
- {
- if (!composeModel.CheckIsComposeByType(_tagWinSearchModel.TABID+1,types[0],types[1]))
- {
- return;
- }
- }
- break;
- }
-
+ if (!CheckIsJump(jumpType)) return;
DebugEx.Log("WindowJumpTo" + jumpType);
-
- GetPreAllOpenWin();
-
#region 鏉′欢鍒ゆ
switch (jumpType)
{
@@ -773,6 +518,12 @@
dungeonModel.selectedTrialDungeon = dungeon;
SetJumpLogic<TrialDungeonEntranceWin>(_tagWinSearchModel.TABID);
break;
+ case JumpUIType.CeremonyRecharge:
+ case JumpUIType.CeremonyFire:
+ case JumpUIType.CeremonyPeopleToHi:
+ case JumpUIType.CeremonyOutof:
+ SetJumpLogic<FairylandCeremonyWin>(_tagWinSearchModel.TABID);
+ break;
case JumpUIType.FaBaoSoul_BenYuan:
case JumpUIType.FaBaoSoul_FengMo:
case JumpUIType.FaBaoSoul_Strength:
@@ -845,6 +596,286 @@
}
+ private bool CheckIsJump(JumpUIType jumpType)
+ {
+ _tagWinSearchModel = Config.Instance.Get<WindowSearchConfig>((int)jumpType);
+
+ if (_tagWinSearchModel == null)
+ {
+ return false;
+ }
+
+ if (!FuncOpen.Instance.IsFuncOpen(_tagWinSearchModel.Lv) && _tagWinSearchModel.Lv != 0)
+ {
+ FuncOpen.Instance.ProcessorFuncErrorTip(_tagWinSearchModel.Lv);
+ return false;
+ }
+
+ switch (jumpType)
+ {
+ case JumpUIType.UnionFunc1:
+ case JumpUIType.UnionFunc2:
+ case JumpUIType.UnionWarehouse:
+ case JumpUIType.UnionHall:
+ case JumpUIType.UnionTask:
+ case JumpUIType.UnionTask2:
+ case JumpUIType.UnionActive1:
+ case JumpUIType.UnionActive2:
+ case JumpUIType.UnionBoss:
+ if (!PlayerDatas.Instance.fairyData.HasFairy)
+ {
+ SysNotifyMgr.Instance.ShowTip("DailyQuestwinUnionLimit");
+ return false;
+ }
+ break;
+ case JumpUIType.UnionMethod:
+ if (!fairyModel.fairyMethodToOpen)
+ {
+ fairyModel.ProcessMethodToErrorTip();
+ return false;
+ }
+ break;
+ case JumpUIType.UnionStore:
+ if (!fairyModel.fairyStoreOpen)
+ {
+ fairyModel.ProcessErrorTip();
+ return false;
+ }
+ break;
+ case JumpUIType.BigMap:
+ if (!mapModel.CanOpenLocalMapWin(PlayerDatas.Instance.baseData.MapID))
+ {
+ SysNotifyMgr.Instance.ShowTip("MapInfo1");
+ return false;
+ }
+ break;
+ case JumpUIType.TreasureFindHostFunc1:
+ case JumpUIType.TreasureFindHostFunc2:
+ case JumpUIType.TreasureFindHostFunc3:
+ case JumpUIType.TreasureFindHostFunc1Type2:
+ case JumpUIType.TreasureFindHostFunc2Type2:
+ case JumpUIType.TreasureFindHostFunc3Type2:
+ bool isUnlock = hostModel.IsUnlockTreasure(int.Parse(_tagWinSearchModel.SelectActive));
+ if (!isUnlock)
+ {
+ hostModel.jumpTreasureId = 0;
+ return false;
+ }
+ break;
+ case JumpUIType.FirstRecharge:
+ var model = ModelCenter.Instance.GetModel<VipModel>();
+ if (model.firstChargeRewardGet)
+ {
+ model.AreadyGetFirstRecharge();
+ return false;
+ }
+ break;
+ case JumpUIType.XMZZBattle:
+ case JumpUIType.AncientBattle:
+ case JumpUIType.IceCrystal:
+ case JumpUIType.FairyLand:
+ DailyQuestConfig dailyConfig = Config.Instance.Get<DailyQuestConfig>(_tagWinSearchModel.SelectActive);
+ if (dailyQuestModel.GetQuestState(dailyConfig.ID) != DailyQuestModel.DailyQuestState.Normal)
+ {
+ SysNotifyMgr.Instance.ShowTip("FBIsNotOpen");
+ return false;
+ }
+ break;
+ case JumpUIType.PlotTaskFunc3:
+ var taskmodel = ModelCenter.Instance.GetModel<PlayerTaskDatas>();
+ if (taskmodel.SideQuestsDic.Count < 1)
+ {
+ SysNotifyMgr.Instance.ShowTip("SideQuest_None");
+ return false;
+ }
+ break;
+ case JumpUIType.PrayforDrug:
+ var prayModel = ModelCenter.Instance.GetModel<PrayForDurgModel>();
+ if (!prayModel.CheckPrayDrugIsOpen())
+ {
+ return false;
+ }
+ break;
+ case JumpUIType.FaBaoSoul_BenYuan:
+ case JumpUIType.FaBaoSoul_FengMo:
+ case JumpUIType.FaBaoSoul_Strength:
+ case JumpUIType.FaBaoSoul_Rune:
+ case JumpUIType.FaBaoSoul_Mount:
+ case JumpUIType.FaBaoSoul_Pet:
+ case JumpUIType.FaBaoSoul_Boss:
+ case JumpUIType.FaBaoSoul_Wings:
+ case JumpUIType.FaBaoSoul_Suit:
+ case JumpUIType.FaBaoSoul_Wash:
+ var soulId = 0;
+ if (int.TryParse(_tagWinSearchModel.SelectActive, out soulId))
+ {
+ var soulModel = ModelCenter.Instance.GetModel<TreasureSoulModel>();
+ if (!soulModel.IsOpenTreasureSoul(soulId))
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ break;
+ case JumpUIType.TrialExchange:
+ if (!trialDungeonModel.CompleteTrialFloor(0))
+ {
+ trialDungeonModel.ProcessOpenTrialExchangeError();
+ return false;
+ }
+ break;
+ case JumpUIType.Kylin:
+ case JumpUIType.Kylin1:
+ case JumpUIType.Kylin2:
+ case JumpUIType.Kylin3:
+ case JumpUIType.Kylin4:
+ case JumpUIType.Kylin5:
+ case JumpUIType.Kylin6:
+ if (!FuncOpen.Instance.IsFuncOpen(85))
+ {
+ FuncOpen.Instance.ProcessorFuncErrorTip((int)FuncOpenEnum.Kylin);
+ return false;
+ }
+ break;
+ case JumpUIType.OpenServerMountRank:
+ var type = int.Parse(_tagWinSearchModel.SelectActive);
+ if (rankModel.IsLock(type))
+ {
+ SysNotifyMgr.Instance.ShowTip("InOperationTimeError");
+ return false;
+ }
+ if (TimeUtility.OpenDay >= rankModel.openServerActivityDays)
+ {
+ SysNotifyMgr.Instance.ShowTip("ActiveOutTime");
+ return false;
+ }
+ break;
+ case JumpUIType.FlashSale:
+ {
+ if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
+ {
+ OperationTimeHepler.Instance.ProcessConditionError(Operation.FlashSale);
+ return false;
+ }
+ }
+ break;
+ case JumpUIType.ConsumreRebate:
+ {
+ if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
+ {
+ OperationTimeHepler.Instance.ProcessConditionError(Operation.ConsumeRebate);
+ return false;
+ }
+ }
+ break;
+ case JumpUIType.LimitedTimePackage:
+ {
+ if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
+ {
+ OperationTimeHepler.Instance.ProcessConditionError(Operation.GiftPackage);
+ return false;
+ }
+ }
+ break;
+ case JumpUIType.BossReborn:
+ {
+ if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
+ {
+ OperationTimeHepler.Instance.ProcessConditionError(Operation.BossReborn);
+ return false;
+ }
+ }
+ break;
+ case JumpUIType.VipRechargeFunc3:
+ {
+ if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
+ {
+ ModelCenter.Instance.GetModel<FairyJadeInvestmentModel>().MessageNotification();
+ return false;
+ }
+ }
+ break;
+ case JumpUIType.VipRechargeFunc5:
+ if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
+ {
+ return false;
+ }
+ break;
+ case JumpUIType.OpenServerRank:
+ case JumpUIType.OSTimeLimitGift:
+ case JumpUIType.OpenServerActivityFunc2_1:
+ case JumpUIType.OpenServerActivityFunc2_2:
+ if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
+ {
+ SysNotifyMgr.Instance.ShowTip("ActiveOutTime");
+ return false;
+ }
+ break;
+ case JumpUIType.OpenServerGift1:
+ case JumpUIType.OpenServerGift2:
+ case JumpUIType.OpenServerGift3:
+ var giftModel = ModelCenter.Instance.GetModel<OSGiftModel>();
+ int giftId = 0;
+ int.TryParse(_tagWinSearchModel.SelectActive, out giftId);
+ if (!giftModel.CheckActivate())
+ {
+ if (PlayerDatas.Instance.baseData.coinPointTotal <= 0
+ || !ModelCenter.Instance.GetModel<VipModel>().firstChargeRewardGet)
+ {
+ SysNotifyMgr.Instance.ShowTip("GiftNoOpen");
+ }
+ else if (giftModel.IsGiftBuy(giftId))
+ {
+ SysNotifyMgr.Instance.ShowTip("GiftAlreadyBuy");
+ }
+ else if (giftModel.IsGiftOverdue(giftId))
+ {
+ SysNotifyMgr.Instance.ShowTip("MissSell");
+ }
+ return false;
+ }
+ break;
+ case JumpUIType.OpenServerGift:
+ return false;
+ case JumpUIType.EquipCompose1:
+ case JumpUIType.EquipCompose2:
+ case JumpUIType.EquipCompose3:
+ case JumpUIType.EquipCompose4:
+ case JumpUIType.ComposeTicketFairy:
+ case JumpUIType.ComposeTicketGod:
+ case JumpUIType.ComposeTicketIce:
+ int[] types = ConfigParse.GetMultipleStr<int>(_tagWinSearchModel.SelectActive);
+ if (types.Length > 0)
+ {
+ if (!composeModel.CheckIsComposeByType(_tagWinSearchModel.TABID + 1, types[0], types[1]))
+ {
+ return false;
+ }
+ }
+ break;
+ case JumpUIType.CeremonyRecharge:
+ case JumpUIType.CeremonyFire:
+ case JumpUIType.CeremonyPeopleToHi:
+ case JumpUIType.CeremonyOutof:
+ if (!OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FairyCeremony))
+ {
+ SysNotifyMgr.Instance.ShowTip("InOperationTimeError");
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ private void CheckJumpWin<T>(int _functionalOrder = 0, bool _forceSync = true) where T : Window
+ {
+ string curOpenWin = typeof(T).Name;
+
+ }
+
private void GotoNormalDungeon(int _dailyQuestId, int _lineId = 0)
{
var config = Config.Instance.Get<DailyQuestConfig>(_dailyQuestId);
@@ -879,26 +910,20 @@
SetJumpLogic<MultipleDifficultyDungeonWin>(0);
}
+
+
private void SetJumpLogic<T>(int _functionalOrder = 0, bool _forceSync = true) where T : Window
{
string curOpenWin = typeof(T).Name;
- if(jumpWinNameDict.ContainsKey(jumpPhase - 1))
+ if (WindowCenter.Instance.IsOpen(curOpenWin))
{
- if(jumpWinNameDict[jumpPhase - 1] != curOpenWin)
- {
- jumpWinNameDict.Add(jumpPhase, curOpenWin);
- }
- else
- {
- openWindows[jumpPhase].Clear();
- jumpPhase -= 1;
- }
+ Window window = WindowCenter.Instance.Get(curOpenWin);
+ window.functionOrder = _functionalOrder;
+ window.ChildActive();
+ return;
}
- else
- {
- jumpWinNameDict.Add(jumpPhase, curOpenWin);
- }
-
+ GetPreAllOpenWin();
+ jumpWinNameDict.Add(jumpPhase, curOpenWin);
jumpType = _tagWinSearchModel.Type;
switch (_tagWinSearchModel.Type)
{
@@ -950,6 +975,10 @@
case 1:
case 4:
openWinlist = openWindows[jumpPhase];
+ if(openWinlist.Contains(obj.name))
+ {
+ openWinlist.Remove(obj.name);
+ }
WindowCenter.Instance.CloseAll(WindowCenter.CloseAllIgnoreType.SystemAndCustom);
for (i = 0; i < openWinlist.Count; i++)
{
@@ -997,6 +1026,10 @@
break;
case 2:
openWinlist = openWindows[1];
+ if (openWinlist.Contains(obj.name))
+ {
+ openWinlist.Remove(obj.name);
+ }
WindowCenter.Instance.CloseAll(WindowCenter.CloseAllIgnoreType.SystemAndCustom);
if (!WindowCenter.Instance.IsOpen<MainInterfaceWin>())
{
@@ -1108,6 +1141,7 @@
//Match curMatch = regex.Match("4**锛坅bc锛夛紵789Y0649");
}
+
}
@@ -1330,6 +1364,10 @@
EquipCompose2 = 236, //瑁呭鍚堟垚-榫欓瓊绾笁
EquipCompose3 = 237, //瑁呭鍚堟垚-鐏电懚绾簩
EquipCompose4 = 238, //瑁呭鍚堟垚-鐏电懚绾笁
+ CeremonyRecharge = 244, //浠欑晫鐩涘吀鍏呭�煎ぇ绀肩晫闈�
+ CeremonyFire = 245, //浠欑晫鐩涘吀鐑熻姳鐙傛鐣岄潰
+ CeremonyPeopleToHi = 246, //浠欑晫鐩涘吀鍏ㄦ皯鏉ュ棬鐣岄潰
+ CeremonyOutof = 247, //浠欑晫鐩涘吀缁濈増闄嶄复鐣岄潰
DhszTs = 1001,//瀹氭捣绁為拡鍔熸硶鎻愬崌鐣岄潰
HyqTs = 1002,//鐨撴湀鏋姛娉曟彁鍗囩晫闈�
GyzTs = 1003,//楝肩墮鍒冨姛娉曟彁鍗囩晫闈�
diff --git a/System/WorldMap/MapModel.cs b/System/WorldMap/MapModel.cs
index c030045..803fc2b 100644
--- a/System/WorldMap/MapModel.cs
+++ b/System/WorldMap/MapModel.cs
@@ -293,6 +293,21 @@
return null;
}
+ public bool CanOpenLocalMapWin(int mapId)
+ {
+ var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig();
+ var config = Config.Instance.Get<MapConfig>(mapId);
+ if (string.IsNullOrEmpty(mapResConfig.BigMap)
+ || mapId == FairyLeagueModel.FAIRY_LEAGUE_DUNGEON)
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
public int GetRecommendHangPoint(int _mapId)
{
var eventPoints = new List<int>(GetMapEventPoints(_mapId));
diff --git a/UI/Common/TimerBehaviour.cs b/UI/Common/TimerBehaviour.cs
index 78aa519..2db7473 100644
--- a/UI/Common/TimerBehaviour.cs
+++ b/UI/Common/TimerBehaviour.cs
@@ -22,11 +22,11 @@
float secondTimer = 0f;
- public void Begin(DateTime _endTime, Action _callBack = null)
+ public void Begin(int seconds, Action _callBack = null)
{
- endTime = _endTime;
+ endTime = TimeUtility.ServerNow + new TimeSpan(seconds * TimeSpan.TicksPerSecond);
onTime = _callBack;
- if (endTime > DateTime.Now)
+ if (endTime > TimeUtility.ServerNow)
{
this.gameObject.SetActive(true);
UpdateTimeShow();
@@ -46,7 +46,7 @@
private void LateUpdate()
{
- if (DateTime.Now > endTime)
+ if (TimeUtility.ServerNow > endTime)
{
if (onTime != null)
{
@@ -69,7 +69,7 @@
protected virtual void UpdateTimeShow()
{
- var lastSecond = (float)(endTime - DateTime.Now).TotalSeconds;
+ var lastSecond = (float)(endTime - TimeUtility.ServerNow).TotalSeconds;
switch (m_Pattern)
{
diff --git a/UI/HUD/HeadUpName.cs b/UI/HUD/HeadUpName.cs
index 9a2c1ee..5def9ad 100644
--- a/UI/HUD/HeadUpName.cs
+++ b/UI/HUD/HeadUpName.cs
@@ -152,12 +152,12 @@
{
return;
}
- m_AncientKing.gameObject.SetActive(isAncientKing);
- if (isAncientKing)
- {
- m_AncientKing.SetSprite("IntegralKing");
- m_AncientKing.SetNativeSize();
- }
+ //m_AncientKing.gameObject.SetActive(isAncientKing);
+ //if (isAncientKing)
+ //{
+ // m_AncientKing.SetSprite("IntegralKing");
+ // m_AncientKing.SetNativeSize();
+ //}
}
public void SetAncientEnemy(bool isAncientEnemy)
@@ -166,12 +166,12 @@
{
return;
}
- m_AncientEnemy.gameObject.SetActive(isAncientEnemy);
- if (isAncientEnemy)
- {
- m_AncientEnemy.SetSprite("Enemy");
- m_AncientEnemy.SetNativeSize();
- }
+ //m_AncientEnemy.gameObject.SetActive(isAncientEnemy);
+ //if (isAncientEnemy)
+ //{
+ // m_AncientEnemy.SetSprite("Enemy");
+ // m_AncientEnemy.SetNativeSize();
+ //}
}
public void SetAlliance(string _alliance)
@@ -305,7 +305,7 @@
{
m_RebornTime.gameObject.SetActive(true);
(m_TimeBehaviour as TimerToChsBehaviour).addtionInfo = Language.Get("BossReborn_RefreshTime");
- m_TimeBehaviour.Begin(_bossInfo.refreshTime, () =>
+ m_TimeBehaviour.Begin( (int)(_bossInfo.refreshTime - TimeUtility.ServerNow).TotalSeconds, () =>
{
m_NpcAppearTxt.gameObject.SetActive(true);
});
diff --git a/Utility/EnumHelper.cs b/Utility/EnumHelper.cs
index a5fe5f4..cdead3b 100644
--- a/Utility/EnumHelper.cs
+++ b/Utility/EnumHelper.cs
@@ -669,12 +669,18 @@
MakerEquipSuitMat = 34, //瑁呭濂楄鏉愭枡
ComposeSuitStone = 35, //濂楄鐭崇鐗�
WingsMat = 39, //鍚堟垚缈呰唨鏉愭枡锛岀窘缈肩簿鐐兼潗鏂�
+ DogzStrengthMat = 70, //鎻愪緵绁炲吔瑁呭寮哄寲鐨勭粡楠�
VipTools = 80, //vip閬撳叿
Box = 81, //瀹濈
Necklaces = 108, //椤归摼
FairyEquip = 109, //浠欏櫒
Wings = 111, //缈呰唨
SpiritAnimal = 112, //鐏靛畧
+ DogzEquipType1 = 119, //绁炲吔瑁呭鍏借
+ DogzEquipType2 = 120, //绁炲吔瑁呭榄旂溂
+ DogzEquipType3 = 121, //绁炲吔瑁呭鐛犵墮
+ DogzEquipType4 = 122, //绁炲吔瑁呭鍏界埅
+ DogzEquipType5 = 123, //绁炲吔瑁呭槌炵敳
}
/** 鍊间负鍒楄〃褰㈠紡,鏋氫妇鍊兼槸鍗曟暟 */
diff --git a/Utility/RuntimeLogUtility.cs b/Utility/RuntimeLogUtility.cs
index bb51030..4e5de91 100644
--- a/Utility/RuntimeLogUtility.cs
+++ b/Utility/RuntimeLogUtility.cs
@@ -16,6 +16,7 @@
public static bool s_UseKeyBoardCastSkill = false;
public static bool s_LogMoveDistance = false;
public static bool s_SkillEffectLog = false;
+ public static bool s_ShowMapLine = false;
public static bool s_forceAutoFight
{
get
@@ -203,7 +204,8 @@
RuntimeLogUtility.s_forceAutoFight = EditorGUILayout.Toggle("鏄惁寮哄埗寮�鍚疉I", RuntimeLogUtility.s_forceAutoFight);
RuntimeLogUtility.s_SkillEffectLog = EditorGUILayout.Toggle("鎶�鑳芥晥鏋渓og杈撳嚭", RuntimeLogUtility.s_SkillEffectLog);
RuntimeLogUtility.s_LogMoveDistance = EditorGUILayout.Toggle("浣嶇Щ璺濈Log杈撳嚭", RuntimeLogUtility.s_LogMoveDistance);
-
+ RuntimeLogUtility.s_ShowMapLine = EditorGUILayout.Toggle("鏄剧ず鍦板浘缃戞牸", RuntimeLogUtility.s_ShowMapLine);
+
_navChkPos = EditorGUILayout.Vector3Field("妫�娴嬬偣", _navChkPos);
if (GUILayout.Button("妫�娴�"))
--
Gitblit v1.8.0