From 21a1542f9d99466b2aedd0992a1032b37b4154a3 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期一, 20 八月 2018 20:21:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into Skill_Polymorph_BeatBackPlayer
---
Core/GameEngine/Model/ConfigManager.cs | 2
System/Dungeon/TrialRewardsBehaviour.cs | 31
System/Dogz/DogzItemCell.cs | 6
UI/Common/SortTable.cs | 218 ++--
System/Dungeon/TrialExchangeBehaviour.cs | 8
System/KnapSack/Logic/WashAttrPointWin.cs | 361 ++++----
System/Dungeon/TrialDungeonEntranceWin.cs | 27
System/Treasure/FunctionUnlockFlyObject.cs | 5
System/Role/RolePanel.cs | 25
System/RolePromote/RolePromoteModel.cs | 11
System/KnapSack/Logic/PackModelInterface.cs | 65 +
System/Realm/RealmUpWin.cs | 87 +
System/FindPrecious/ElderGodBreifInfoBehaviour.cs | 2
Core/GameEngine/Model/Config/TrialExchangeConfig.cs | 59
System/Realm/ActivateShow.cs | 86 ++
System/Treasure/TreasureCollectBriefInfoBehaviour.cs | 78 -
System/FindPrecious/BossHomeBreifInfoBehaviour.cs | 2
System/Strengthening/GodBeastEntry.cs | 58 +
System/Strengthening/GodBeastSlidingList.cs | 142 +++
System/OpenServerActivity/InSevenDayModel.cs | 2
System/BetterItemGet/RealmBetterEquipModel .cs.meta | 6
System/Strengthening/GodBeastReinforcementWin.cs | 152 +++
System/Welfare/PrayerModel.cs | 4
Core/GameEngine/Model/Config/TrialRewardsConfig.cs.meta | 6
UI/HUD/HeadUpName.cs | 53
Core/ResModule/AnimatorControllerLoader.cs | 1
System/Realm/RealmPropertyUpWin.cs | 26
System/FindPrecious/WorldBossBreifInfoBehaviour.cs | 2
System/MainInterfacePanel/PlayerMainDate.cs | 2
System/Role/RoleAttrWin.cs | 22
System/Treasure/TreasureData.cs | 6
UI/Common/BossLifeBar.cs | 20
Core/GameEngine/Model/Config/NPCConfig.cs.meta | 2
System/MainInterfacePanel/MainInterfaceWin.cs | 2
System/KnapSack/Logic/EquipTip.cs | 9
System/Treasure/TreasureSoulModel.cs | 22
System/Welfare/LevelGiftModel.cs | 4
System/OpenServerActivity/ImpactRankModel.cs | 10
System/Strengthening/GodBeastSlidingList.cs.meta | 4
Utility/EnumHelper.cs | 1
System/Tip/PromoteDetailsWin.cs | 3
System/Welfare/WelfareCenter.cs | 12
Core/GameEngine/Model/Config/TrialExchangeConfig.cs.meta | 2
System/KnapSack/Logic/PlayerPackModels.cs | 10
System/Welfare/ConsumeRebateModel.cs | 4
System/Welfare/SignInModel.cs | 2
System/Treasure/TreasureNewGotWin.cs | 19
System/KnapSack/RealmBetterEquipBehaviour.cs | 92 ++
System/KnapSack/RealmBetterEquipBehaviour.cs.meta | 6
System/FindPrecious/DemonJarBriefInfoBehaviour.cs | 2
System/RuneTower/RuneTowerWin.cs | 5
System/Strengthening/GodBeastEntry.cs.meta | 4
System/Dungeon/TrialRewardsBehaviour.cs.meta | 6
System/Dungeon/TrialDungeonModel.cs | 51 +
System/MainInterfacePanel/InGamePushContainer.cs | 26
System/Treasure/TreasureModel.cs | 14
Fight/GameActor/GActorPlayerBase.cs | 2
System/BlastFurnace/LingDanTips.cs | 2
System/BetterItemGet/RealmBetterEquipModel .cs | 221 +++++
System/Dogz/DogzEquip.cs | 6
System/Treasure/TreasureStageUpTriggerWin.cs | 2
System/BlastFurnace/BlastFurnaceModel.cs | 76 +
System/KnapSack/Logic/ItemTipsModel.cs | 36
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs | 1
System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs | 2
System/Strengthening/GodBeastReinforcementWin.cs.meta | 4
Core/GameEngine/Model/Config/TrialRewardsConfig.cs | 52 +
System/KnapSack/Logic/PackSendQuestMgr.cs | 17
System/OpenServerActivity/OSRedEnvelopeModel.cs | 6
/dev/null | 12
System/Pet/PetAttributeMethods.cs | 13
System/WindowJump/WindowJumpMgr.cs | 4
Core/GameEngine/Model/Config/NPCConfig.cs | 53
Core/GameEngine/Model/Player/PlayerDatas.cs | 1
System/Dogz/DogzCell.cs | 17
System/Dogz/DogzModel.cs | 44
System/FindPrecious/PersonalBossBriefInfoBehaviour.cs | 2
System/WindowBase/ModelCenter.cs | 2
78 files changed, 1,752 insertions(+), 710 deletions(-)
diff --git a/Core/GameEngine/Model/Config/NPCConfig.cs b/Core/GameEngine/Model/Config/NPCConfig.cs
index caa8f81..330dfd7 100644
--- a/Core/GameEngine/Model/Config/NPCConfig.cs
+++ b/Core/GameEngine/Model/Config/NPCConfig.cs
@@ -1,14 +1,14 @@
-锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
-// [ Date ]: Thursday, August 02, 2018
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Monday, August 20, 2018
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+
public partial class NPCConfig : ConfigBase {
public int NPCID { get ; private set ; }
@@ -68,13 +68,14 @@
public int LifeBarCount { get ; private set ; }
public int NPCEffect { get ; private set ; }
public int NPCSpeakID { get ; private set ; }
-
+ public int ClientRealm { get ; private set ; }
+
public override string getKey()
{
return NPCID.ToString();
- }
-
- public override void Parse() {
+ }
+
+ public override void Parse() {
try
{
NPCID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
@@ -195,17 +196,19 @@
NPCEffect=IsNumeric(rawContents[55]) ? int.Parse(rawContents[55]):0;
NPCSpeakID=IsNumeric(rawContents[56]) ? int.Parse(rawContents[56]):0;
+
+ ClientRealm=IsNumeric(rawContents[57]) ? int.Parse(rawContents[57]):0;
}
catch (Exception ex)
{
DebugEx.Log(ex);
- }
- }
-
- }
-
-}
-
-
-
-
+ }
+ }
+
+ }
+
+}
+
+
+
+
diff --git a/Core/GameEngine/Model/Config/NPCConfig.cs.meta b/Core/GameEngine/Model/Config/NPCConfig.cs.meta
index 99ac283..647cb16 100644
--- a/Core/GameEngine/Model/Config/NPCConfig.cs.meta
+++ b/Core/GameEngine/Model/Config/NPCConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 1862c84997887d142ab127719c4d5c7f
-timeCreated: 1533189772
+timeCreated: 1534744183
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/Core/GameEngine/Model/Config/TrialExchangeConfig.cs b/Core/GameEngine/Model/Config/TrialExchangeConfig.cs
index 8d83e39..49855c9 100644
--- a/Core/GameEngine/Model/Config/TrialExchangeConfig.cs
+++ b/Core/GameEngine/Model/Config/TrialExchangeConfig.cs
@@ -1,35 +1,40 @@
-锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
-// [ Date ]: Thursday, August 02, 2018
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Monday, August 20, 2018
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+
public partial class TrialExchangeConfig : ConfigBase {
public int id { get ; private set ; }
- public int exchangeItemID { get ; private set ; }
+ public int[] exchangeItemID;
public int exchangeItemCount { get ; private set ; }
public int exchangeItemIsBind { get ; private set ; }
public int tokenId { get ; private set ; }
public int tokenCount { get ; private set ; }
public string description { get ; private set; }
-
+
public override string getKey()
{
return id.ToString();
- }
-
- public override void Parse() {
+ }
+
+ public override void Parse() {
try
{
id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
- exchangeItemID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
+ string[] exchangeItemIDStringArray = rawContents[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+ exchangeItemID = new int[exchangeItemIDStringArray.Length];
+ for (int i=0;i<exchangeItemIDStringArray.Length;i++)
+ {
+ int.TryParse(exchangeItemIDStringArray[i],out exchangeItemID[i]);
+ }
exchangeItemCount=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
@@ -44,13 +49,13 @@
catch (Exception ex)
{
DebugEx.Log(ex);
- }
- }
-
- }
-
-}
-
-
-
-
+ }
+ }
+
+ }
+
+}
+
+
+
+
diff --git a/Core/GameEngine/Model/Config/TrialExchangeConfig.cs.meta b/Core/GameEngine/Model/Config/TrialExchangeConfig.cs.meta
index 5bbd83b..709eab0 100644
--- a/Core/GameEngine/Model/Config/TrialExchangeConfig.cs.meta
+++ b/Core/GameEngine/Model/Config/TrialExchangeConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 95c6c6944c394ac4381e86d9ce3006fb
-timeCreated: 1533192458
+timeCreated: 1534744580
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/Core/GameEngine/Model/Config/TrialRewardsConfig.cs b/Core/GameEngine/Model/Config/TrialRewardsConfig.cs
new file mode 100644
index 0000000..be90145
--- /dev/null
+++ b/Core/GameEngine/Model/Config/TrialRewardsConfig.cs
@@ -0,0 +1,52 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Monday, August 20, 2018
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+
+ public partial class TrialRewardsConfig : ConfigBase {
+
+ public int id { get ; private set ; }
+ public int lineId { get ; private set ; }
+ public int grade { get ; private set ; }
+ public int[] rewards;
+
+ public override string getKey()
+ {
+ return id.ToString();
+ }
+
+ public override void Parse() {
+ try
+ {
+ id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
+
+ lineId=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
+
+ grade=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
+
+ string[] rewardsStringArray = rawContents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+ rewards = new int[rewardsStringArray.Length];
+ for (int i=0;i<rewardsStringArray.Length;i++)
+ {
+ int.TryParse(rewardsStringArray[i],out rewards[i]);
+ }
+ }
+ catch (Exception ex)
+ {
+ DebugEx.Log(ex);
+ }
+ }
+
+ }
+
+}
+
+
+
+
diff --git a/System/Role/RolePoint.cs.meta b/Core/GameEngine/Model/Config/TrialRewardsConfig.cs.meta
similarity index 68%
copy from System/Role/RolePoint.cs.meta
copy to Core/GameEngine/Model/Config/TrialRewardsConfig.cs.meta
index 8d0a009..e820715 100644
--- a/System/Role/RolePoint.cs.meta
+++ b/Core/GameEngine/Model/Config/TrialRewardsConfig.cs.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: 77a6a757b99422846bb5b68b65b5af18
-timeCreated: 1502422861
-licenseType: Free
+guid: ee2212e198950744b9c7524b9d74d042
+timeCreated: 1534748051
+licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
diff --git a/Core/GameEngine/Model/ConfigManager.cs b/Core/GameEngine/Model/ConfigManager.cs
index d24ce41..a7acb01 100644
--- a/Core/GameEngine/Model/ConfigManager.cs
+++ b/Core/GameEngine/Model/ConfigManager.cs
@@ -187,6 +187,7 @@
AddAsyncTask<AllPeoplePartyAwardConfig>();
AddAsyncTask<OrderInfoConfig>();
AddAsyncTask<TrialExchangeConfig>();
+ AddAsyncTask<TrialRewardsConfig>();
while (!AllCompleted())
{
@@ -244,6 +245,7 @@
StartSyncTask<IconConfig>(AssetPath.ResourceOut);
StartSyncTask<SysInfoConfig>(AssetPath.ResourceOut);
StartSyncTask<LanguageConfig>(AssetPath.ResourceOut);
+ StartSyncTask<RealmConfig>(AssetPath.ResourceOut);
}
public bool AllCompleted()
diff --git a/Core/GameEngine/Model/Player/PlayerDatas.cs b/Core/GameEngine/Model/Player/PlayerDatas.cs
index b98983f..4a38ab4 100644
--- a/Core/GameEngine/Model/Player/PlayerDatas.cs
+++ b/Core/GameEngine/Model/Player/PlayerDatas.cs
@@ -317,7 +317,6 @@
break;
case PlayerDataRefresh.FreePoint:
baseData.FreePoint = value;
- ModelCenter.Instance.GetModel<RolePointModel>().UpdateRedPoint();
break;
case PlayerDataRefresh.FreeSkillPoint:
baseData.FreeSkillPoint = value;
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs b/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
index aa8a7bc..408ded0 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
@@ -140,7 +140,6 @@
SettingEffectMgr.Instance.Begin();
DEBUG_STEP = 4;
- ModelCenter.Instance.GetModel<RolePointModel>().UpdateRedPoint();
QuickSetting.Instance.SetQuickSetting(vNetData.Setting);
NetLinkWin.Hide();
WindowCenter.Instance.Close<SelectRoleWin>();
diff --git a/Core/ResModule/AnimatorControllerLoader.cs b/Core/ResModule/AnimatorControllerLoader.cs
index 6f3ea41..53d1f9f 100644
--- a/Core/ResModule/AnimatorControllerLoader.cs
+++ b/Core/ResModule/AnimatorControllerLoader.cs
@@ -11,6 +11,7 @@
public static readonly string controllerSuffix = "AnimatorController_";
public static readonly string controllerUISuffix = "AnimatorController_UI_";
public static readonly string controllerShowSuffix = "AnimatorController_Show_";
+ public static readonly string controllerRealmSuffix = "AnimatorController_Realm_";
public static AnimationClip LoadAnimationClip(string name, string clipName)
{
diff --git a/Fight/GameActor/GActorPlayerBase.cs b/Fight/GameActor/GActorPlayerBase.cs
index b57343e..f001c8b 100644
--- a/Fight/GameActor/GActorPlayerBase.cs
+++ b/Fight/GameActor/GActorPlayerBase.cs
@@ -342,7 +342,7 @@
return;
}
- m_HeadUpName.SetRealm(_realm);
+ m_HeadUpName.SetPlayerRealm(_realm);
}
public void SwitchTitle(uint titleID)
diff --git a/System/BetterItemGet/RealmBetterEquipModel .cs b/System/BetterItemGet/RealmBetterEquipModel .cs
new file mode 100644
index 0000000..57cf056
--- /dev/null
+++ b/System/BetterItemGet/RealmBetterEquipModel .cs
@@ -0,0 +1,221 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Saturday, January 20, 2018
+//--------------------------------------------------------
+using UnityEngine;
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using TableConfig;
+
+namespace Snxxz.UI
+{
+ public class RealmBetterEquipModel : Model, IBeforePlayerDataInitialize, ISwitchAccount,IPlayerLoginOk
+ {
+ PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
+ PackModelInterface modelInterface { get { return ModelCenter.Instance.GetModel<PackModelInterface>(); } }
+
+ public string currentEquipGuid { get; private set; }
+
+ Dictionary<string, ItemModel> betterEquipModels = new Dictionary<string, ItemModel>();
+
+ public event Action showEquipRefreshEvent;
+ public const string RealmRecordKey = "RealmRecord";
+
+ public override void Init()
+ {
+ playerPack.RefreshPackAct += OnPackageRefresh;
+ playerPack.RefreshItemCountAct += OnPackageItemRefresh;
+ }
+
+ public override void UnInit()
+ {;
+ playerPack.RefreshPackAct -= OnPackageRefresh;
+ playerPack.RefreshItemCountAct -= OnPackageItemRefresh;
+ }
+
+ public void OnBeforePlayerDataInitialize()
+ {
+ currentEquipGuid = string.Empty;
+ betterEquipModels.Clear();
+ }
+
+ public void OnPlayerLoginOk()
+ {
+ LocalSave.SetInt(RealmRecordKey,PlayerDatas.Instance.baseData.realmLevel);
+ PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= RefreshRealm;
+ PlayerDatas.Instance.PlayerDataRefreshInfoEvent += RefreshRealm;
+ }
+
+ public void OnSwitchAccount()
+ {
+ currentEquipGuid = string.Empty;
+ }
+
+ private void RefreshRealm(PlayerDataRefresh type)
+ {
+ int realmLv = PlayerDatas.Instance.baseData.realmLevel;
+ if (type != PlayerDataRefresh.OfficialRank
+ || LocalSave.GetInt(RealmRecordKey) == realmLv
+ || NewBieCenter.Instance.inGuiding)
+ {
+ return;
+ }
+
+ LocalSave.SetInt(RealmRecordKey,realmLv);
+ Dictionary<int, ItemModel> pairs = modelInterface.CheckBetterEquipByRealm();
+ betterEquipModels.Clear();
+ currentEquipGuid = string.Empty;
+ foreach (var model in pairs.Values)
+ {
+ betterEquipModels[model.itemInfo.ItemGUID] = model;
+ currentEquipGuid = model.itemInfo.ItemGUID;
+ }
+ if (showEquipRefreshEvent != null)
+ {
+ showEquipRefreshEvent();
+ }
+ }
+
+ public bool TryGetBetterEquip(string _guid, out ItemModel _equip)
+ {
+ return betterEquipModels.TryGetValue(_guid, out _equip);
+ }
+
+ public void ReportConfirmBetterEquip(string _guid)
+ {
+ betterEquipModels.Remove(_guid);
+
+ var tempGuid = GetOneEquip();
+ if (tempGuid != currentEquipGuid)
+ {
+ currentEquipGuid = tempGuid;
+ if (showEquipRefreshEvent != null)
+ {
+ showEquipRefreshEvent();
+ }
+ }
+ }
+
+
+ private void OnPackageRefresh(PackType _packType)
+ {
+ if (_packType != PackType.rptItem)
+ {
+ return;
+ }
+
+ var keys = new List<string>(betterEquipModels.Keys);
+ for (int i = keys.Count - 1; i >= 0; i--)
+ {
+ var guid = keys[i];
+ var itemModel = playerPack.GetItemModelByGUID(guid);
+ if (itemModel == null || itemModel.packType != PackType.rptItem)
+ {
+ betterEquipModels.Remove(guid);
+ }
+ }
+
+ var tempGuid = GetOneEquip();
+ if (tempGuid != currentEquipGuid)
+ {
+ if (!string.IsNullOrEmpty(tempGuid))
+ {
+ currentEquipGuid = tempGuid;
+ if (showEquipRefreshEvent != null)
+ {
+ showEquipRefreshEvent();
+ }
+ }
+ else
+ {
+ currentEquipGuid = tempGuid;
+ if (showEquipRefreshEvent != null)
+ {
+ showEquipRefreshEvent();
+ }
+ }
+ }
+ }
+
+ private void OnPackageItemRefresh(PackType _packType, int _index, int _itemId)
+ {
+ if (_packType == PackType.rptEquip)
+ {
+ //绌夸笂瑁呭鐨勬椂鍊欑殑澶勭悊
+ var item = playerPack.GetItemModelByIndex(_packType, _index);
+ if (item != null)
+ {
+ RemoveLowGradeItemByEquipPlace(_index, item.equipScore);
+ }
+ OnPackageRefresh(PackType.rptItem);
+ }
+ else if (_packType == PackType.rptItem)
+ {
+ OnPackageRefresh(_packType);
+ }
+ }
+
+ private string GetOneEquip()
+ {
+ var guid = string.Empty;
+ foreach (var key in betterEquipModels.Keys)
+ {
+ guid = key;
+ break;
+ }
+
+ return guid;
+ }
+
+ private void RemoveItemByEquipPlace(int _place)
+ {
+ var place = _place == 10 ? 9 : _place;
+ var keys = new List<string>(betterEquipModels.Keys);
+ for (int i = keys.Count - 1; i >= 0; i--)
+ {
+ var item = betterEquipModels[keys[i]];
+ if (item != null && item.chinItemModel.EquipPlace == place)
+ {
+ betterEquipModels.Remove(keys[i]);
+ }
+ }
+ }
+
+ private void RemoveLowGradeItemByEquipPlace(int _place, int _score)
+ {
+ var place = _place == 10 ? 9 : _place;
+ var keys = new List<string>(betterEquipModels.Keys);
+ for (int i = keys.Count - 1; i >= 0; i--)
+ {
+ var item = betterEquipModels[keys[i]];
+ if (item != null && item.chinItemModel.EquipPlace == place && item.equipScore <= _score)
+ {
+ betterEquipModels.Remove(keys[i]);
+ }
+ }
+ }
+
+ private bool TryGetEquipByPlace(int _place, out ItemModel _itemModel)
+ {
+ var place = _place == 10 ? 9 : _place;
+ var keys = new List<string>(betterEquipModels.Keys);
+ for (int i = keys.Count - 1; i >= 0; i--)
+ {
+ var item = betterEquipModels[keys[i]];
+ if (item != null && item.chinItemModel.EquipPlace == place)
+ {
+ _itemModel = item;
+ return true;
+ }
+ }
+
+ _itemModel = null;
+ return false;
+ }
+ }
+
+}
+
+
+
diff --git a/System/Role/RolePoint.cs.meta b/System/BetterItemGet/RealmBetterEquipModel .cs.meta
similarity index 68%
copy from System/Role/RolePoint.cs.meta
copy to System/BetterItemGet/RealmBetterEquipModel .cs.meta
index 8d0a009..7f6f9b1 100644
--- a/System/Role/RolePoint.cs.meta
+++ b/System/BetterItemGet/RealmBetterEquipModel .cs.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: 77a6a757b99422846bb5b68b65b5af18
-timeCreated: 1502422861
-licenseType: Free
+guid: 368f012abd3595c419a67d33f44153ea
+timeCreated: 1534755541
+licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
diff --git a/System/BlastFurnace/BlastFurnaceModel.cs b/System/BlastFurnace/BlastFurnaceModel.cs
index e18abc3..95ed38d 100644
--- a/System/BlastFurnace/BlastFurnaceModel.cs
+++ b/System/BlastFurnace/BlastFurnaceModel.cs
@@ -83,15 +83,18 @@
treasureRefineDict.Clear();
FuncOpen.Instance.OnFuncStateChangeEvent -= RefreshFuncOpenState;
playerPack.RefreshItemCountAct -= RefreshMat;
+ playerPack.ItemCntReduceAct -= RefreshDanReduce;
playerPack.RefreshItemSumUseCntAct -= RefreshItemUsce;
+ WindowCenter.Instance.windowAfterCloseEvent -= StoveUpgradAfterClose;
}
-
public void OnAfterPlayerDataInitialize()
{
playerPack.RefreshItemCountAct += RefreshMat;
FuncOpen.Instance.OnFuncStateChangeEvent += RefreshFuncOpenState;
playerPack.RefreshItemSumUseCntAct += RefreshItemUsce;
+ WindowCenter.Instance.windowAfterCloseEvent += StoveUpgradAfterClose;
+ playerPack.ItemCntReduceAct += RefreshDanReduce;
}
private void RefreshFuncOpenState(int funcId)
@@ -141,13 +144,14 @@
/// 寰楀埌鏈嶅姟绔殑鐐间腹鐐夋暟鎹�
/// </summary>
private int _stovelv = 1;
+ private int preStoveLv = 1;
public int StoveLV { get { return _stovelv; } } // 鐐间腹鐐夌瓑绾�
private int _stoveExp = 0;
public int StoveExp { get { return _stoveExp; } } // 鐐间腹鐐夌粡楠�
public int addExp = 0;
public event Action RefreshStoveModelEvent;
public int makerItemID { get; private set; }
-
+ public bool StoveIsUpGrade { get; private set; }
public void RefreshBlastFurnaceModel(HA3BF_tagMCPlayerStoveMsg data)
{
DebugEx.Log("RefreshBlastFurnaceModel");
@@ -163,6 +167,17 @@
if(!isFirstGet)
{
isMakeDan = true;
+ if(preStoveLv < data.StoveLV)
+ {
+ preStoveLv = data.StoveLV;
+ StoveIsUpGrade = true;
+ }
+ else
+ {
+ preStoveLv = data.StoveLV;
+ StoveIsUpGrade = false;
+ }
+ PlayRecycleGuid();
}
else
{
@@ -175,23 +190,6 @@
if(makerItemID == 0 && addExp > 0)
{
SysNotifyMgr.Instance.ShowTip("RecyclingElixir", addExp);
- }
- }
-
- /// <summary>
- /// 鍒ゆ柇鐐间腹鐐夋槸鍚﹀崌绾�
- /// </summary>
- private int preStoveLv = 1;
- public bool IsUpgrade(int stoveLv)
- {
- if (preStoveLv >= stoveLv)
- {
- return false;
- }
- else
- {
- preStoveLv = stoveLv;
- return true;
}
}
@@ -716,6 +714,8 @@
{
CheckMakerDandrugCondition();
CheckRecycleStoreRed();
+ StoveIsUpGrade = false;
+ PlayRecycleGuid();
}
}
@@ -849,8 +849,7 @@
{
if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace)) return;
- List<ItemModel> itemModels = GetRecycleDanlist();
- if(itemModels != null && itemModels.Count > 0)
+ if(IsRecycleDanDrug())
{
recycleBtnRedpoint.state = RedPointState.Simple;
}
@@ -858,7 +857,42 @@
{
recycleBtnRedpoint.state = RedPointState.None;
}
+ }
+ public bool IsRecycleDanDrug()
+ {
+ List<ItemModel> itemModels = GetRecycleDanlist();
+ if(itemModels != null && itemModels.Count > 0)
+ {
+ return true;
+ }
+ return false;
+ }
+
+
+ private void StoveUpgradAfterClose(Window win)
+ {
+ if (win.name != "StoveUpgradWin") return;
+ StoveIsUpGrade = false;
+ PlayRecycleGuid();
+ }
+
+
+ private void RefreshDanReduce(PackType type, int index, int id)
+ {
+ if (type != PackType.rptItem || !playerPack.CheckIsDrugById(id)) return;
+ StoveIsUpGrade = false;
+ PlayRecycleGuid();
+ }
+
+ public void PlayRecycleGuid()
+ {
+ if (IsRecycleDanDrug()
+ && !NewBieCenter.Instance.completeGuidesBuf.Contains(93)
+ && !StoveIsUpGrade)
+ {
+ NewBieCenter.Instance.StartNewBieGuide(93);
+ }
}
#endregion
diff --git a/System/BlastFurnace/LingDanTips.cs b/System/BlastFurnace/LingDanTips.cs
index 260444d..8791f4b 100644
--- a/System/BlastFurnace/LingDanTips.cs
+++ b/System/BlastFurnace/LingDanTips.cs
@@ -209,7 +209,7 @@
_expValueText.text = Language.Get("L1055");
}
RefreshVirtualFill(_addExp);
- if (FurnaceModel.IsUpgrade(FurnaceModel.StoveLV))
+ if (FurnaceModel.StoveIsUpGrade)
{
ActivateShow.StoveUpgrade(FurnaceModel.StoveLV);
CreateCell();
diff --git a/System/Dogz/DogzCell.cs b/System/Dogz/DogzCell.cs
index 4bd7933..2b300ec 100644
--- a/System/Dogz/DogzCell.cs
+++ b/System/Dogz/DogzCell.cs
@@ -28,10 +28,21 @@
m_DogzIcon.SetSprite(_dogzCfg.HeadIcon);
m_DogzIcon.SetNativeSize();
var _dogzEquips = model.GetDogzEquips(_dogzCfg.ID);
- m_DogzIcon.material = (_dogzEquips == null || _dogzEquips.Count < 5) ? MaterialUtility.GetDefaultSpriteGrayMaterial() :
- MaterialUtility.GetUIDefaultGraphicMaterial();
+ bool isActive = (_dogzEquips == null || _dogzEquips.Count < 5) ? false : true;
m_DogzName.text = _dogzCfg.Name;
- //m_DogzGrade.text = StringUtility.Contact("璇勫垎锛�", 100);
+ m_DogzGrade.text = StringUtility.Contact("璇勫垎锛�", 100);
+ if (isActive)
+ {
+ m_DogzIcon.material = MaterialUtility.GetUIDefaultGraphicMaterial();
+ m_DogzName.material = MaterialUtility.GetUIDefaultGraphicMaterial();
+ m_DogzGrade.material = MaterialUtility.GetUIDefaultGraphicMaterial();
+ }
+ else
+ {
+ m_DogzIcon.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
+ m_DogzName.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
+ m_DogzGrade.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
+ }
m_DogzBtn.image.color = model.presentSelectDogz == _dogzCfg.ID ? Color.blue : Color.white;
m_DogzAssist.gameObject.SetActive(model.TryGetAssistDogzState(_dogzCfg.ID));
m_DogzBtn.onClick.RemoveAllListeners();
diff --git a/System/Dogz/DogzEquip.cs b/System/Dogz/DogzEquip.cs
index f35fcb0..54f13c1 100644
--- a/System/Dogz/DogzEquip.cs
+++ b/System/Dogz/DogzEquip.cs
@@ -32,9 +32,9 @@
itemBaisc.cellBtn.RemoveAllListeners();
itemBaisc.cellBtn.AddListener(()=>
{
- ItemAttrData attrData = new ItemAttrData(model.itemId,false,(ulong)model.itemInfo.ItemCount,model.itemInfo.ItemPlace,
- model.itemInfo.IsBind,false,PackType.rptDogzEquip,model.itemInfo.ItemGUID);
- tipsModel.SetItemTipsModel(attrData);
+ tipsModel.SetItemTipsModel(model.packType,model.itemInfo.ItemGUID,false,false);
+ tipsModel.SetDogzEquipBtn(tipsModel.curAttrData);
+ tipsModel.ShowUICtrl();
});
}
}
diff --git a/System/Dogz/DogzItemCell.cs b/System/Dogz/DogzItemCell.cs
index a85f664..3e83f36 100644
--- a/System/Dogz/DogzItemCell.cs
+++ b/System/Dogz/DogzItemCell.cs
@@ -46,9 +46,9 @@
itemBaisc.cellBtn.RemoveAllListeners();
itemBaisc.cellBtn.AddListener(()=>
{
- ItemAttrData attrData = new ItemAttrData(model.itemId, false, (ulong)model.itemInfo.ItemCount, model.itemInfo.ItemPlace,
- model.itemInfo.IsBind, false, PackType.rptDogzItem, model.itemInfo.ItemGUID);
- tipsModel.SetItemTipsModel(attrData);
+ tipsModel.SetItemTipsModel(model.packType, model.itemInfo.ItemGUID, false, false);
+ tipsModel.SetDogzItemBtn(tipsModel.curAttrData);
+ tipsModel.ShowUICtrl();
});
}
}
diff --git a/System/Dogz/DogzModel.cs b/System/Dogz/DogzModel.cs
index c50516b..43eae00 100644
--- a/System/Dogz/DogzModel.cs
+++ b/System/Dogz/DogzModel.cs
@@ -69,7 +69,7 @@
AddAssistItem = int.Parse(_funcCfg.Numerical2);
AddAssistItemCnt = ConfigParse.GetMultipleStr<int>(_funcCfg.Numerical3);
m_DogzEquipStrenLimit = ConfigParse.GetDic<int, int>(_funcCfg.Numerical4);
- _funcCfg = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("DogzPack");
+ _funcCfg = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("DogzPack");
DogzPackGridCnt = int.Parse(_funcCfg.Numerical1);
}
/// <summary>
@@ -236,28 +236,48 @@
ItemModel itemModel = playerPack.GetItemModelByIndex(type, index);
int dogzId = GetDogzIDByIndex(index);
- if (itemModel != null)
+ List<ItemModel> modellist = GetDogzEquips(dogzId);
+ if(modellist != null)
{
- for (int i = 0; i < m_DogzEquipDict[dogzId].Count; i++)
+ if (itemModel != null)
{
- if (m_DogzEquipDict[dogzId][i].itemInfo.ItemPlace == index)
+ bool isAdd = true;
+ for (int i = 0; i < modellist.Count; i++)
{
- m_DogzEquipDict[dogzId][i] = itemModel;
- return;
+ if (modellist[i].itemInfo.ItemPlace == index)
+ {
+ isAdd = false;
+ modellist[i] = itemModel;
+ break;
+ }
+ }
+ if(isAdd)
+ {
+ modellist.Add(itemModel);
+ }
+ }
+ else
+ {
+ for (int i = 0; i < modellist.Count; i++)
+ {
+ if (modellist[i].itemInfo.ItemPlace == index)
+ {
+ modellist.RemoveAt(i);
+ break;
+ }
}
}
}
else
{
- for (int i = 0; i < m_DogzEquipDict[dogzId].Count; i++)
+ if(itemModel != null)
{
- if (m_DogzEquipDict[dogzId][i].itemInfo.ItemPlace == index)
- {
- m_DogzEquipDict[dogzId].RemoveAt(i);
- return;
- }
+ List<ItemModel> equipDatas = new List<ItemModel>();
+ equipDatas.Add(itemModel);
+ m_DogzEquipDict.Add(dogzId,equipDatas);
}
}
+
if(RefreshDogzEquipAct != null)
{
diff --git a/System/Dungeon/TrialDungeonEntranceWin.cs b/System/Dungeon/TrialDungeonEntranceWin.cs
index ddf216e..001070e 100644
--- a/System/Dungeon/TrialDungeonEntranceWin.cs
+++ b/System/Dungeon/TrialDungeonEntranceWin.cs
@@ -40,8 +40,8 @@
[SerializeField] Image m_BossRealm;
[SerializeField] Text m_BossName;
- [SerializeField]
- ItemBehaviour[] m_RewardBehaviours;
+ [SerializeField] TrialRewardsBehaviour[] m_RewardBehaviours;
+ [SerializeField] ScrollRect m_RewardScroller;
DungeonModel m_Model;
DungeonModel model {
@@ -58,6 +58,8 @@
}
DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
+
+ TrialDungeonModel trialDungeonModel { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } }
#region Built-in
protected override void BindController()
@@ -153,12 +155,20 @@
var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(_npcId);
if (npcConfig != null)
{
- var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.Realm);
- if (realmConfig != null)
+ if (ConfigManager.Instance.ContainKey<RealmConfig>(npcConfig.ClientRealm))
{
m_BossRealm.gameObject.SetActive(true);
- m_BossRealm.SetSprite(realmConfig.Img);
+ var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.ClientRealm);
+ if (realmConfig != null)
+ {
+ m_BossRealm.SetSprite(realmConfig.Img);
+ }
}
+ else
+ {
+ m_BossRealm.gameObject.SetActive(false);
+ }
+
m_BossName.text = npcConfig.charName;
}
}
@@ -176,16 +186,17 @@
private void DrawRewards()
{
+ m_RewardScroller.verticalNormalizedPosition = 1;
var dongeonId = model.DungeonMap(model.selectedTrialDungeon);
var config = ConfigManager.Instance.GetTemplate<DungeonConfig>(dongeonId);
- var rewards = config.Rewards;
for (int i = 0; i < m_RewardBehaviours.Length; i++)
{
var behaviour = m_RewardBehaviours[i];
- if (i < rewards.Length)
+ int[] rewards = null;
+ if (trialDungeonModel.TryGetTrialRewards(config.LineID, m_RewardBehaviours[i].grade, out rewards))
{
behaviour.gameObject.SetActive(true);
- behaviour.SetItem(rewards[i], 0);
+ behaviour.Display(rewards);
}
else
{
diff --git a/System/Dungeon/TrialDungeonModel.cs b/System/Dungeon/TrialDungeonModel.cs
index 261dd8d..6933d8e 100644
--- a/System/Dungeon/TrialDungeonModel.cs
+++ b/System/Dungeon/TrialDungeonModel.cs
@@ -10,6 +10,7 @@
{
Dictionary<int, List<TrialExchangeConfig>> trialTokenExchangeDict = new Dictionary<int, List<TrialExchangeConfig>>();
Dictionary<int, int> lineToTokenClassDict;
+ Dictionary<int, Dictionary<int, int[]>> trialRewardDict = new Dictionary<int, Dictionary<int, int[]>>();
public Dictionary<int, List<int>> trialClassTokens = new Dictionary<int, List<int>>();
public List<int> trialTokens = new List<int>();
PlayerPackModel packModel { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
@@ -78,6 +79,18 @@
}
var funcConfig = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("LineToItemStage");
lineToTokenClassDict = ConfigParse.GetDic<int, int>(funcConfig.Numerical1);
+
+ var trialRewards = ConfigManager.Instance.GetAllValues<TrialRewardsConfig>();
+ for (int i = 0; i < trialRewards.Count; i++)
+ {
+ Dictionary<int, int[]> dict = null;
+ if (!trialRewardDict.TryGetValue(trialRewards[i].lineId, out dict))
+ {
+ dict = new Dictionary<int, int[]>();
+ trialRewardDict.Add(trialRewards[i].lineId, dict);
+ }
+ dict.Add(trialRewards[i].grade, trialRewards[i].rewards);
+ }
}
public override void UnInit()
@@ -138,6 +151,20 @@
public bool TryGetTrialExchanges(int lv, out List<TrialExchangeConfig> list)
{
return trialTokenExchangeDict.TryGetValue(lv, out list);
+ }
+
+ public bool TryGetTrialRewards(int lineId, int grade, out int[] rewards)
+ {
+ rewards = null;
+ if (trialRewardDict.ContainsKey(lineId))
+ {
+ if (trialRewardDict[lineId].ContainsKey(grade))
+ {
+ rewards = trialRewardDict[lineId][grade];
+ return rewards != null && rewards.Length > 0;
+ }
+ }
+ return false;
}
public List<int> GetTotalClass()
@@ -252,6 +279,24 @@
return 0;
}
+ public int GetExchangeItemByJob(TrialExchangeConfig config)
+ {
+ if (config == null)
+ {
+ return 0;
+ }
+ if (config.exchangeItemID.Length == 1)
+ {
+ return config.exchangeItemID[0];
+ }
+ var job = PlayerDatas.Instance.baseData.Job;
+ if (job - 1 < config.exchangeItemID.Length && job - 1 >= 0)
+ {
+ return config.exchangeItemID[job - 1];
+ }
+ return config.exchangeItemID[0];
+ }
+
#region 绾㈢偣
void UpdateRedpoint()
{
@@ -308,12 +353,12 @@
{
return false;
}
- var exchangeItemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(config.exchangeItemID);
+ var exchangeItemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(GetExchangeItemByJob(config));
if (exchangeItemConfig.EquipPlace == 0)
{
return true;
}
- if (EquipCompare(config.exchangeItemID) == 1)
+ if (EquipCompare(GetExchangeItemByJob(config)) == 1)
{
return true;
}
@@ -328,7 +373,7 @@
{
for (int i = 0; i < list.Count; i++)
{
- var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(list[i].exchangeItemID);
+ var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(GetExchangeItemByJob(list[i]));
if (SatisfyExchangeBetter(list[i].id) && itemConfig.EquipPlace != 0)
{
_id = list[i].id;
diff --git a/System/Dungeon/TrialExchangeBehaviour.cs b/System/Dungeon/TrialExchangeBehaviour.cs
index 098e80f..a40aa2a 100644
--- a/System/Dungeon/TrialExchangeBehaviour.cs
+++ b/System/Dungeon/TrialExchangeBehaviour.cs
@@ -59,22 +59,22 @@
}
m_Item.cellBtn.RemoveAllListeners();
m_Item.gameObject.SetActive(true);
- ItemCellModel cellModel = new ItemCellModel(config.exchangeItemID, true, (ulong)config.exchangeItemCount, config.exchangeItemIsBind);
+ ItemCellModel cellModel = new ItemCellModel(model.GetExchangeItemByJob(config), true, (ulong)config.exchangeItemCount, config.exchangeItemIsBind);
m_Item.Init(cellModel);
m_Item.cellBtn.AddListener(() =>
{
- ItemAttrData itemAttrData = new ItemAttrData(config.exchangeItemID, true, (ulong)config.exchangeItemCount, -1, config.exchangeItemIsBind, true);
+ ItemAttrData itemAttrData = new ItemAttrData(model.GetExchangeItemByJob(config), true, (ulong)config.exchangeItemCount, -1, config.exchangeItemIsBind, true);
ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
});
m_Description.text = config.description;
m_Token.SetItem(config.tokenId, config.tokenCount);
var count = model.GetTrialTokenCount(config.tokenId);
m_Token.count.color = UIHelper.GetUIColor(count >= config.tokenCount ? TextColType.Green : TextColType.NavyBrown, true);
- var equipCompare = model.EquipCompare(config.exchangeItemID);
+ var equipCompare = model.EquipCompare(model.GetExchangeItemByJob(config));
m_Up.gameObject.SetActive(equipCompare == 1);
m_Down.gameObject.SetActive(equipCompare == -1);
- var exchangeItemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(config.exchangeItemID);
+ var exchangeItemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(model.GetExchangeItemByJob(config));
m_Redpoint.gameObject.SetActive(count >= config.tokenCount && (equipBetter || exchangeItemConfig.EquipPlace == 0));
}
}
diff --git a/System/Dungeon/TrialRewardsBehaviour.cs b/System/Dungeon/TrialRewardsBehaviour.cs
new file mode 100644
index 0000000..73611a6
--- /dev/null
+++ b/System/Dungeon/TrialRewardsBehaviour.cs
@@ -0,0 +1,31 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+namespace Snxxz.UI
+{
+ public class TrialRewardsBehaviour : MonoBehaviour
+ {
+ [SerializeField] int m_Grade;
+ [SerializeField] ItemBehaviour[] m_ItemBehaviours;
+
+ public int grade { get { return m_Grade; } }
+
+ public void Display(int[] rewards)
+ {
+ for (int i = 0; i < m_ItemBehaviours.Length; i++)
+ {
+ var behaviour = m_ItemBehaviours[i];
+ if (i < rewards.Length)
+ {
+ behaviour.gameObject.SetActive(true);
+ behaviour.SetItem(rewards[i], 0);
+ }
+ else
+ {
+ behaviour.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+}
+
diff --git a/System/Role/RolePoint.cs.meta b/System/Dungeon/TrialRewardsBehaviour.cs.meta
similarity index 68%
copy from System/Role/RolePoint.cs.meta
copy to System/Dungeon/TrialRewardsBehaviour.cs.meta
index 8d0a009..31a479f 100644
--- a/System/Role/RolePoint.cs.meta
+++ b/System/Dungeon/TrialRewardsBehaviour.cs.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: 77a6a757b99422846bb5b68b65b5af18
-timeCreated: 1502422861
-licenseType: Free
+guid: f436f3dabd50bc5429d2de289d60fdd5
+timeCreated: 1534749125
+licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
diff --git a/System/FindPrecious/BossHomeBreifInfoBehaviour.cs b/System/FindPrecious/BossHomeBreifInfoBehaviour.cs
index 6a7cfba..891e65b 100644
--- a/System/FindPrecious/BossHomeBreifInfoBehaviour.cs
+++ b/System/FindPrecious/BossHomeBreifInfoBehaviour.cs
@@ -55,7 +55,7 @@
var config = ConfigManager.Instance.GetTemplate<BossHomeConfig>(bossId);
var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
- DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV,npcConfig.Realm);
+ DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV,npcConfig.ClientRealm);
UpdateBossPortrait(interactorableState);
UpdateBossRebornCoolDown(true);
OnSelected(bossId);
diff --git a/System/FindPrecious/DemonJarBriefInfoBehaviour.cs b/System/FindPrecious/DemonJarBriefInfoBehaviour.cs
index 1cba454..a8413f4 100644
--- a/System/FindPrecious/DemonJarBriefInfoBehaviour.cs
+++ b/System/FindPrecious/DemonJarBriefInfoBehaviour.cs
@@ -72,7 +72,7 @@
m_Participant.gameObject.SetActive(isUnLocked && findPreciousModel.IsBossAlive(bossId));
- DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
+ DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
UpdateBossRebornCoolDown(isUnLocked);
UpdateBossPortrait(interactorableState);
UpdateBossParticipant(bossId);
diff --git a/System/FindPrecious/ElderGodBreifInfoBehaviour.cs b/System/FindPrecious/ElderGodBreifInfoBehaviour.cs
index 2cb083f..d2456c3 100644
--- a/System/FindPrecious/ElderGodBreifInfoBehaviour.cs
+++ b/System/FindPrecious/ElderGodBreifInfoBehaviour.cs
@@ -54,7 +54,7 @@
var config = ConfigManager.Instance.GetTemplate<ElderGodAreaConfig>(bossId);
var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
- DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
+ DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
UpdateBossPortrait(interactorableState);
UpdateBossRebornCoolDown(true);
OnSelected(bossId);
diff --git a/System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs b/System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs
index e52f9fe..1589cc1 100644
--- a/System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs
+++ b/System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs
@@ -92,7 +92,7 @@
if (m_Realm != null)
{
- if (_realm > 0)
+ if (ConfigManager.Instance.ContainKey<RealmConfig>(_realm))
{
m_Realm.gameObject.SetActive(true);
var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
diff --git a/System/FindPrecious/PersonalBossBriefInfoBehaviour.cs b/System/FindPrecious/PersonalBossBriefInfoBehaviour.cs
index da30854..fe08dbf 100644
--- a/System/FindPrecious/PersonalBossBriefInfoBehaviour.cs
+++ b/System/FindPrecious/PersonalBossBriefInfoBehaviour.cs
@@ -50,7 +50,7 @@
var config = ConfigManager.Instance.GetTemplate<PersonalBossConfig>(bossId);
var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
- DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
+ DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
UpdateBossPortrait(interactorableState);
UpdateBossRebornCoolDown(true);
OnSelected(bossId);
diff --git a/System/FindPrecious/WorldBossBreifInfoBehaviour.cs b/System/FindPrecious/WorldBossBreifInfoBehaviour.cs
index 8ba7fce..5e8d8c0 100644
--- a/System/FindPrecious/WorldBossBreifInfoBehaviour.cs
+++ b/System/FindPrecious/WorldBossBreifInfoBehaviour.cs
@@ -59,7 +59,7 @@
var config = ConfigManager.Instance.GetTemplate<WorldBossConfig>(bossId);
var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
- DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
+ DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
UpdateBossRebornCoolDown(isUnLocked);
UpdateBossPortrait(interactorableState);
OnSelected(bossId);
diff --git a/System/KnapSack/Logic/EquipTip.cs b/System/KnapSack/Logic/EquipTip.cs
index 7338b03..08866c9 100644
--- a/System/KnapSack/Logic/EquipTip.cs
+++ b/System/KnapSack/Logic/EquipTip.cs
@@ -179,7 +179,8 @@
yield return null;
if(itemAttrData.isCompare)
{
- if (itemAttrData.packType != PackType.rptEquip)
+ if (itemAttrData.packType != PackType.rptEquip
+ && itemAttrData.packType != PackType.rptDogzEquip)
{
itemTipsModel.SetCurTips(this.GetComponent<RectTransform>());
}
@@ -205,7 +206,8 @@
ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview, (ulong)itemAttrData.count, itemAttrData.isBind,
itemAttrData.guid,itemAttrData.packType,itemAttrData.isCompare, itemAttrData.useDataDict);
itemCell.Init(cellModel);
- if(itemAttrData.packType == PackType.rptEquip)
+ if(itemAttrData.packType == PackType.rptEquip
+ || itemAttrData.packType == PackType.rptDogzEquip)
{
putOnIcon.SetActive(true);
}
@@ -262,7 +264,8 @@
if (itemAttrData.isCompare)
{
- if(itemAttrData.packType != PackType.rptEquip)
+ if(itemAttrData.packType != PackType.rptEquip
+ && itemAttrData.packType != PackType.rptDogzEquip)
{
CreateFuncBtn();
}
diff --git a/System/KnapSack/Logic/ItemTipsModel.cs b/System/KnapSack/Logic/ItemTipsModel.cs
index 2a723a2..372c964 100644
--- a/System/KnapSack/Logic/ItemTipsModel.cs
+++ b/System/KnapSack/Logic/ItemTipsModel.cs
@@ -71,6 +71,8 @@
get { return _modelInterface ?? (_modelInterface = ModelCenter.Instance.GetModel<PackModelInterface>()); }
}
+ DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
+
public override void Init()
{
m_storeModel.RefreshTCBPlayerDataEvent += RefreshOfflinePluginTime;
@@ -637,11 +639,7 @@
switch (attrData.winType)
{
case ItemWinType.equipWin:
- attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendPutOnQuest(ItemWinBtnType.putOn, attrData.guid); });
- break;
case ItemWinType.wingsWin:
- attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendPutOnQuest(ItemWinBtnType.putOn, attrData.guid); });
- break;
case ItemWinType.guardWin:
attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendPutOnQuest(ItemWinBtnType.putOn, attrData.guid); });
break;
@@ -688,6 +686,36 @@
}
+ public void SetDogzItemBtn(ItemAttrData attrData)
+ {
+ if (attrData == null) return;
+
+ if (attrData.itemConfig.CanSell == 1)
+ {
+ attrData.SetTipsFuncBtn(ItemWinBtnType.sell, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendSellQuest(ItemWinBtnType.sell, attrData); });
+ }
+
+ switch (attrData.winType)
+ {
+ case ItemWinType.equipWin:
+ attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => { dogzModel.SendPutOnEquip(dogzModel.presentSelectDogz, attrData.index); });
+ break;
+ }
+ }
+
+ public void SetDogzEquipBtn(ItemAttrData attrData)
+ {
+ if (attrData == null) return;
+
+ attrData.SetTipsFuncBtn(ItemWinBtnType.putOff, (ItemWinBtnType, ItemAttrData) => {
+ dogzModel.SendPutOffEquip(dogzModel.presentSelectDogz,dogzModel.GetDogzEquipPlaceByIndex(attrData.index));
+ });
+
+ attrData.SetTipsFuncBtn(ItemWinBtnType.strength, (ItemWinBtnType, ItemAttrData) => {
+ WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.StrengthFunc1);
+ });
+ }
+
/// <summary>
/// 璁剧疆浠撳簱寮规鎸夐挳
/// </summary>
diff --git a/System/KnapSack/Logic/PackModelInterface.cs b/System/KnapSack/Logic/PackModelInterface.cs
index 6951495..1205a85 100644
--- a/System/KnapSack/Logic/PackModelInterface.cs
+++ b/System/KnapSack/Logic/PackModelInterface.cs
@@ -7,7 +7,7 @@
namespace Snxxz.UI
{
- public class PackModelInterface : Model, IBeforePlayerDataInitialize
+ public class PackModelInterface : Model, IBeforePlayerDataInitialize,IPlayerLoginOk
{
private ItemConfig tagChinModel;
private FuncConfigConfig _equipGSFormula;
@@ -88,6 +88,12 @@
itemEffectCDDict.Clear();
itemEffectTimelist.Clear();
}
+
+ public void OnPlayerLoginOk()
+ {
+
+ }
+
public override void UnInit()
{
@@ -582,7 +588,7 @@
SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
if (singlePack == null) return false;
- int startLockIndex = singlePack.openGridCount - GetInitGridCount(PackType.rptItem);
+ int startLockIndex = singlePack.openGridCount - playerPack.InitBagGridCnt;
FuncConfigConfig _tagFuncModel = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("OpenBagItem");
int haveCount = playerPack.GetItemCountByID(PackType.rptItem,itemId);
Equation.Instance.Clear();
@@ -736,26 +742,57 @@
RefreshPickItemEvent(type,guid);
}
}
+
+ Dictionary<int, ItemModel> RealmBetterDict = new Dictionary<int, ItemModel>();
+ public Dictionary<int, ItemModel> CheckBetterEquipByRealm()
+ {
+ RealmBetterDict.Clear();
+ SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
+ if (singlePack == null) return RealmBetterDict;
+
+ int realmLv = PlayerDatas.Instance.baseData.realmLevel;
+ Dictionary<int,ItemModel> pairs = singlePack.GetPackModelIndexDict();
+ foreach(var model in pairs.Values)
+ {
+ if(model.chinItemModel.EquipPlace > 0
+ && model.chinItemModel.EquipPlace != (int)RoleEquipType.retSpiritAnimal
+ && model.chinItemModel.RealmLimit <= realmLv
+ && !IsOverdue(model.itemInfo.ItemGUID,model.itemId,model.useDataDict)
+ && IsFightUp(model.itemId,model.equipScore) == 1)
+ {
+ if(!RealmBetterDict.ContainsKey(model.EquipPlace))
+ {
+ RealmBetterDict.Add(model.EquipPlace,model);
+ }
+ else
+ {
+ if(model.equipScore > RealmBetterDict[model.EquipPlace].equipScore)
+ {
+ RealmBetterDict[model.EquipPlace] = model;
+ }
+ }
+ }
+ }
+ return RealmBetterDict;
+ }
#endregion
#region 瑙i攣鏍煎瓙
-
- public int GetInitGridCount(PackType type)
- {
- FuncConfigConfig initGridCount = null;
- if (type == PackType.rptItem)
- initGridCount = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("InitBagCellCount");
- else if (type == PackType.rptWarehouse)
- initGridCount = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("InitDepotCellCount");
-
- return int.Parse(initGridCount.Numerical1);
- }
public void OpenGrid(int chooseGridCount, PackType type)
{
SinglePackModel singlePack = playerPack.GetSinglePackModel(type);
int openCount = chooseGridCount - singlePack.openGridCount;
- int index = chooseGridCount - GetInitGridCount(type);
+ int index = 0;
+ switch(type)
+ {
+ case PackType.rptItem:
+ index = chooseGridCount - playerPack.InitBagGridCnt;
+ break;
+ case PackType.rptWarehouse:
+ index = chooseGridCount - playerPack.InitDepotGridCnt;
+ break;
+ }
itemTipsModel.SetExtendGirdModel(openCount,index, type);
WindowCenter.Instance.Open<ExtendWin>();
}
diff --git a/System/KnapSack/Logic/PackSendQuestMgr.cs b/System/KnapSack/Logic/PackSendQuestMgr.cs
index 76ed616..db6ac8e 100644
--- a/System/KnapSack/Logic/PackSendQuestMgr.cs
+++ b/System/KnapSack/Logic/PackSendQuestMgr.cs
@@ -94,14 +94,6 @@
}
#region 鍙戦�佺┛鎴磋澶囩殑璇锋眰
- RolePointModel _rolePointModel;
- RolePointModel rolePointModel
- {
- get
- {
- return _rolePointModel ?? (_rolePointModel = ModelCenter.Instance.GetModel<RolePointModel>());
- }
- }
ItemConfig sendItemConfig = null;
ItemModel sendItemModel = null;
int itemIndex = -1;
@@ -333,7 +325,7 @@
foreach (var key in sumOffsetlist.Keys)
{
PlayerDatas.Instance.PlayerDataRefreshInfoEvent += RefreshFreePoint;
- rolePointModel.SendAddPoint((int)key, (int)sumOffsetlist[key]);
+ //rolePointModel.SendAddPoint((int)key, (int)sumOffsetlist[key]);
}
}
else
@@ -688,7 +680,7 @@
if (useItemModel.itemId == 951)
{
- int startLockIndex = singlePack.openGridCount - modelInterface.GetInitGridCount(PackType.rptItem);
+ int startLockIndex = singlePack.openGridCount - playerPack.InitBagGridCnt;
int chooseGridCnt = singlePack.openGridCount + GetExtendGridCnt(startLockIndex);
modelInterface.OpenGrid(chooseGridCnt, PackType.rptItem);
return;
@@ -784,6 +776,11 @@
{
extendCnt = 1;
}
+ int remianLock = playerPack.MaxBagGridCnt - playerPack.GetSinglePackModel(PackType.rptItem).openGridCount;
+ if(extendCnt > remianLock)
+ {
+ extendCnt = remianLock;
+ }
return extendCnt;
}
}
diff --git a/System/KnapSack/Logic/PlayerPackModels.cs b/System/KnapSack/Logic/PlayerPackModels.cs
index 12b2315..0cdb99f 100644
--- a/System/KnapSack/Logic/PlayerPackModels.cs
+++ b/System/KnapSack/Logic/PlayerPackModels.cs
@@ -17,6 +17,11 @@
public Dictionary<int, Dictionary<int, int>> decomposeAttrDict = new Dictionary<int, Dictionary<int, int>>();
public static string StrengthAttrShift_RecordKey = "StrengthAttrShift";
public const string RecordKnapsackTitle = "RecordKnapsackTitle";
+ public int MaxBagGridCnt { get; private set; }
+ public int InitBagGridCnt { get; private set; }
+ public int MaxDepotGridCnt { get; private set; }
+ public int InitDepotGridCnt { get; private set; }
+
public override void Init()
{
List<DungeonOpenTimeConfig> dungeonlist = ConfigManager.Instance.GetAllValues<DungeonOpenTimeConfig>();
@@ -71,6 +76,11 @@
minDecomposeNum = int.Parse(equipDecompose.Numerical1);
defaultUnSelectlist = ConfigParse.GetMultipleStr<int>(equipDecompose.Numerical2);
+ InitDepotGridCnt = int.Parse(ConfigManager.Instance.GetTemplate<FuncConfigConfig>("InitDepotCellCount").Numerical1);
+ InitBagGridCnt = int.Parse(ConfigManager.Instance.GetTemplate<FuncConfigConfig>("InitBagCellCount").Numerical1);
+ MaxBagGridCnt = int.Parse(ConfigManager.Instance.GetTemplate<FuncConfigConfig>("MaxBagCellCount").Numerical1);
+ MaxDepotGridCnt = int.Parse(ConfigManager.Instance.GetTemplate<FuncConfigConfig>("MaxDepotCellCount").Numerical1);
+
}
public void OnBeforePlayerDataInitialize()
diff --git a/System/KnapSack/Logic/WashAttrPointWin.cs b/System/KnapSack/Logic/WashAttrPointWin.cs
index a7c40d5..def17dc 100644
--- a/System/KnapSack/Logic/WashAttrPointWin.cs
+++ b/System/KnapSack/Logic/WashAttrPointWin.cs
@@ -1,185 +1,176 @@
-锘縰sing UnityEngine;
-using UnityEngine.UI;
-using TableConfig;
-using System;
-
-namespace Snxxz.UI
-{
- public class WashAttrPointWin : Window
- {
- [SerializeField] Toggle strenToggle; //鍔涢噺
- [SerializeField] Toggle agilityToggle; //韬硶
- [SerializeField] Toggle physiqueToggle; //浣撹川
- [SerializeField] Toggle mentAlityToggle; //鐏靛姏
- [SerializeField] Button closeBtn;
- [SerializeField] Button okBtn;
- [SerializeField] Text washAttrDesText;
-
- PlayerPackModel _playerPack;
- PlayerPackModel playerPack
- {
- get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
- }
-
- RolePointModel _rolePointModel;
- RolePointModel rolePointModel
- {
- get
- {
- return _rolePointModel ?? (_rolePointModel = ModelCenter.Instance.GetModel<RolePointModel>());
- }
- }
-
- public static ItemModel itemModel = null;
- private ItemConfig itemConfig = null;
- private AttrEnum selectAttr = AttrEnum.POWER;
-
- float washPoint = 0;
-
- protected override void AddListeners()
- {
-
- }
-
- protected override void BindController()
- {
-
- }
-
- protected override void OnPreOpen()
- {
- washPoint = 0;
- strenToggle.isOn = true;
- agilityToggle.isOn = false;
- physiqueToggle.isOn = false;
- mentAlityToggle.isOn = false;
- strenToggle.onValueChanged.AddListener((bool isOn)=> { OnClickToggle(isOn); });
- agilityToggle.onValueChanged.AddListener((bool isOn) => { OnClickToggle(isOn); });
- physiqueToggle.onValueChanged.AddListener((bool isOn) => { OnClickToggle(isOn); });
- mentAlityToggle.onValueChanged.AddListener((bool isOn) => { OnClickToggle(isOn); });
- closeBtn.AddListener(CloseWin);
- okBtn.AddListener(ClickSureBtn);
- }
-
- protected override void OnAfterOpen()
- {
- InitUI();
-
- }
-
- protected override void OnPreClose()
- {
- closeBtn.RemoveAllListeners();
- strenToggle.RemoveAllListeners();
- agilityToggle.RemoveAllListeners();
- physiqueToggle.RemoveAllListeners();
- mentAlityToggle.RemoveAllListeners();
- okBtn.RemoveAllListeners();
- }
- protected override void OnAfterClose()
- {
-
- }
-
- private void InitUI()
- {
- if (itemModel == null) return;
-
- itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(itemModel.itemId);
- SetCurWashAttr();
- RefreshWashAttrDes();
- }
-
- private void OnClickToggle(bool isOn)
- {
- SetCurWashAttr();
- RefreshWashAttrDes();
- }
-
- private void SetCurWashAttr()
- {
- if (strenToggle.isOn)
- {
- selectAttr = AttrEnum.POWER;
- }
- else if (agilityToggle.isOn)
- {
- selectAttr = AttrEnum.AGILITY;
- }
- else if (physiqueToggle.isOn)
- {
- selectAttr = AttrEnum.PHYSIQUE;
- }
- else if (mentAlityToggle.isOn)
- {
- selectAttr = AttrEnum.MENTALITY;
- }
- }
-
- private void RefreshWashAttrDes()
- {
- float initPoint = rolePointModel.GetPointCreate(PlayerDatas.Instance.baseData.Job)[(int)selectAttr];
- switch (selectAttr)
- {
- case AttrEnum.POWER:
- washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseSTR) - initPoint;
- break;
- case AttrEnum.AGILITY:
- washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePHY) - initPoint;
- break;
- case AttrEnum.PHYSIQUE:
- washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseCON) - initPoint;
- break;
- case AttrEnum.MENTALITY:
- washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePNE) - initPoint;
- break;
- }
-
- PlayerPropertyConfig propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>((int)selectAttr);
- washAttrDesText.text = Language.Get("BagWin_Washpoint2", propertyConfig.Name, UIHelper.GetPropertyMapPlayerData(selectAttr), washPoint);
- }
-
- private void ClickSureBtn()
- {
- if (itemConfig == null || itemModel == null) return;
-
- if(washPoint <= 0)
- {
- SysNotifyMgr.Instance.ShowTip("WashPoint");
- }
- else
- {
- int needCnt = (int)washPoint / itemConfig.EffectValueA1;
- int remain = (int)washPoint % itemConfig.EffectValueA1;
-
- if(remain > 0)
- {
- needCnt = needCnt + 1;
- }
-
- if(needCnt > itemModel.itemInfo.ItemCount)
- {
- needCnt = itemModel.itemInfo.ItemCount;
- }
-
- if (itemModel.chinItemModel.BatchUse == 1 && needCnt > 1)
- {
- BatchUseModel.Instance.SetBatchModel(itemModel.itemInfo.ItemGUID);
- BatchUseModel.Instance.SetExtraInfo((int)selectAttr,needCnt);
- WindowCenter.Instance.Open<WashPointBatchUseWin>();
- }
- else
- {
- PackSendQuestMgr.Instance.SendMakeUseQuest(itemModel.itemInfo.ItemPlace,1,(int)selectAttr);
- }
-
- }
- CloseWin();
- }
-
- private void CloseWin()
- {
- CloseImmediately();
- }
- }
-}
+锘縰sing UnityEngine;
+using UnityEngine.UI;
+using TableConfig;
+using System;
+
+namespace Snxxz.UI
+{
+ public class WashAttrPointWin : Window
+ {
+ [SerializeField] Toggle strenToggle; //鍔涢噺
+ [SerializeField] Toggle agilityToggle; //韬硶
+ [SerializeField] Toggle physiqueToggle; //浣撹川
+ [SerializeField] Toggle mentAlityToggle; //鐏靛姏
+ [SerializeField] Button closeBtn;
+ [SerializeField] Button okBtn;
+ [SerializeField] Text washAttrDesText;
+
+ PlayerPackModel _playerPack;
+ PlayerPackModel playerPack
+ {
+ get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
+ }
+
+ public static ItemModel itemModel = null;
+ private ItemConfig itemConfig = null;
+ private AttrEnum selectAttr = AttrEnum.POWER;
+
+ float washPoint = 0;
+
+ protected override void AddListeners()
+ {
+
+ }
+
+ protected override void BindController()
+ {
+
+ }
+
+ protected override void OnPreOpen()
+ {
+ washPoint = 0;
+ strenToggle.isOn = true;
+ agilityToggle.isOn = false;
+ physiqueToggle.isOn = false;
+ mentAlityToggle.isOn = false;
+ strenToggle.onValueChanged.AddListener((bool isOn)=> { OnClickToggle(isOn); });
+ agilityToggle.onValueChanged.AddListener((bool isOn) => { OnClickToggle(isOn); });
+ physiqueToggle.onValueChanged.AddListener((bool isOn) => { OnClickToggle(isOn); });
+ mentAlityToggle.onValueChanged.AddListener((bool isOn) => { OnClickToggle(isOn); });
+ closeBtn.AddListener(CloseWin);
+ okBtn.AddListener(ClickSureBtn);
+ }
+
+ protected override void OnAfterOpen()
+ {
+ InitUI();
+
+ }
+
+ protected override void OnPreClose()
+ {
+ closeBtn.RemoveAllListeners();
+ strenToggle.RemoveAllListeners();
+ agilityToggle.RemoveAllListeners();
+ physiqueToggle.RemoveAllListeners();
+ mentAlityToggle.RemoveAllListeners();
+ okBtn.RemoveAllListeners();
+ }
+ protected override void OnAfterClose()
+ {
+
+ }
+
+ private void InitUI()
+ {
+ if (itemModel == null) return;
+
+ itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(itemModel.itemId);
+ SetCurWashAttr();
+ RefreshWashAttrDes();
+ }
+
+ private void OnClickToggle(bool isOn)
+ {
+ SetCurWashAttr();
+ RefreshWashAttrDes();
+ }
+
+ private void SetCurWashAttr()
+ {
+ if (strenToggle.isOn)
+ {
+ selectAttr = AttrEnum.POWER;
+ }
+ else if (agilityToggle.isOn)
+ {
+ selectAttr = AttrEnum.AGILITY;
+ }
+ else if (physiqueToggle.isOn)
+ {
+ selectAttr = AttrEnum.PHYSIQUE;
+ }
+ else if (mentAlityToggle.isOn)
+ {
+ selectAttr = AttrEnum.MENTALITY;
+ }
+ }
+
+ private void RefreshWashAttrDes()
+ {
+ //float initPoint = rolePointModel.GetPointCreate(PlayerDatas.Instance.baseData.Job)[(int)selectAttr];
+ //switch (selectAttr)
+ //{
+ // case AttrEnum.POWER:
+ // washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseSTR) - initPoint;
+ // break;
+ // case AttrEnum.AGILITY:
+ // washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePHY) - initPoint;
+ // break;
+ // case AttrEnum.PHYSIQUE:
+ // washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseCON) - initPoint;
+ // break;
+ // case AttrEnum.MENTALITY:
+ // washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePNE) - initPoint;
+ // break;
+ //}
+
+ PlayerPropertyConfig propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>((int)selectAttr);
+ washAttrDesText.text = Language.Get("BagWin_Washpoint2", propertyConfig.Name, UIHelper.GetPropertyMapPlayerData(selectAttr), washPoint);
+ }
+
+ private void ClickSureBtn()
+ {
+ if (itemConfig == null || itemModel == null) return;
+
+ if(washPoint <= 0)
+ {
+ SysNotifyMgr.Instance.ShowTip("WashPoint");
+ }
+ else
+ {
+ int needCnt = (int)washPoint / itemConfig.EffectValueA1;
+ int remain = (int)washPoint % itemConfig.EffectValueA1;
+
+ if(remain > 0)
+ {
+ needCnt = needCnt + 1;
+ }
+
+ if(needCnt > itemModel.itemInfo.ItemCount)
+ {
+ needCnt = itemModel.itemInfo.ItemCount;
+ }
+
+ if (itemModel.chinItemModel.BatchUse == 1 && needCnt > 1)
+ {
+ BatchUseModel.Instance.SetBatchModel(itemModel.itemInfo.ItemGUID);
+ BatchUseModel.Instance.SetExtraInfo((int)selectAttr,needCnt);
+ WindowCenter.Instance.Open<WashPointBatchUseWin>();
+ }
+ else
+ {
+ PackSendQuestMgr.Instance.SendMakeUseQuest(itemModel.itemInfo.ItemPlace,1,(int)selectAttr);
+ }
+
+ }
+ CloseWin();
+ }
+
+ private void CloseWin()
+ {
+ CloseImmediately();
+ }
+ }
+}
diff --git a/System/KnapSack/RealmBetterEquipBehaviour.cs b/System/KnapSack/RealmBetterEquipBehaviour.cs
new file mode 100644
index 0000000..cd712d6
--- /dev/null
+++ b/System/KnapSack/RealmBetterEquipBehaviour.cs
@@ -0,0 +1,92 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Tuesday, December 05, 2017
+//--------------------------------------------------------
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+using TableConfig;
+using Snxxz.UI;
+
+namespace Snxxz.UI
+{
+
+ public class RealmBetterEquipBehaviour : MonoBehaviour
+ {
+ [SerializeField] RectTransform m_ContainerBetterEquip;
+ [SerializeField] ItemCell m_EquipBehaviour;
+ [SerializeField] Text m_EquipName;
+ [SerializeField] Button m_Close;
+ [SerializeField] Button m_Puton;
+ [SerializeField] Button m_BetterEquipDetail;
+ ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
+ PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
+ RealmBetterEquipModel model { get { return ModelCenter.Instance.GetModel<RealmBetterEquipModel>(); } }
+
+ private void OnEnable()
+ {
+ m_Close.AddListener(CloseBetterEquip);
+ m_Puton.AddListener(PutOnBetterEquip);
+ m_BetterEquipDetail.AddListener(ShowBetterEquipDetails);
+ }
+
+ private void OnDisable()
+ {
+ m_Close.RemoveAllListeners();
+ m_Puton.RemoveAllListeners();
+ m_BetterEquipDetail.RemoveAllListeners();
+ }
+
+ public void ShowBetterEquip()
+ {
+ m_ContainerBetterEquip.gameObject.SetActive(false);
+ if (!string.IsNullOrEmpty(model.currentEquipGuid))
+ {
+ ItemModel betterEquip;
+ if (model.TryGetBetterEquip(model.currentEquipGuid, out betterEquip))
+ {
+ DrawBetterEquip(betterEquip);
+ m_ContainerBetterEquip.gameObject.SetActive(true);
+ }
+
+ }
+ }
+
+ private void PutOnBetterEquip()
+ {
+ PackSendQuestMgr.Instance.SendPutOnQuest(ItemWinBtnType.putOn, model.currentEquipGuid);
+ model.ReportConfirmBetterEquip(model.currentEquipGuid);
+ }
+
+ private void ShowBetterEquipDetails()
+ {
+ ItemModel betterEquip;
+ if (model.TryGetBetterEquip(model.currentEquipGuid, out betterEquip))
+ {
+ var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(betterEquip.itemInfo.ItemID);
+ itemTipsModel.SetItemTipsModel(PackType.rptItem, betterEquip.itemInfo.ItemGUID);
+ }
+ }
+
+ private void CloseBetterEquip()
+ {
+ model.ReportConfirmBetterEquip(model.currentEquipGuid);
+ }
+
+ private void DrawBetterEquip(ItemModel betterModel)
+ {
+ var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(betterModel.itemInfo.ItemID);
+ m_EquipName.text = itemConfig.ItemName;
+ m_EquipName.color = UIHelper.GetUIColor(itemConfig.ItemColor, true);
+ m_EquipBehaviour.Init(betterModel, true);
+ }
+ }
+}
+
+
+
+
+
diff --git a/System/Role/RolePoint.cs.meta b/System/KnapSack/RealmBetterEquipBehaviour.cs.meta
similarity index 68%
copy from System/Role/RolePoint.cs.meta
copy to System/KnapSack/RealmBetterEquipBehaviour.cs.meta
index 8d0a009..894d587 100644
--- a/System/Role/RolePoint.cs.meta
+++ b/System/KnapSack/RealmBetterEquipBehaviour.cs.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: 77a6a757b99422846bb5b68b65b5af18
-timeCreated: 1502422861
-licenseType: Free
+guid: c8eb21cc504d5514b950ab4d60ef9814
+timeCreated: 1534753740
+licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
diff --git a/System/MainInterfacePanel/InGamePushContainer.cs b/System/MainInterfacePanel/InGamePushContainer.cs
index c5e07a6..70ca73c 100644
--- a/System/MainInterfacePanel/InGamePushContainer.cs
+++ b/System/MainInterfacePanel/InGamePushContainer.cs
@@ -14,6 +14,7 @@
public class InGamePushContainer : MonoBehaviour
{
[SerializeField] BetterItemGetBehaviour m_BetterEquipPusher;
+ [SerializeField] RealmBetterEquipBehaviour m_RealmBetterEquipPusher;
[SerializeField] PreciousItemGetBehaviour m_PreciousItemPusher;
[SerializeField] FindPreciousBossRebornBehaviour m_BossRebornPusher;
[SerializeField] ItemUseBehaviour m_itemUsePusher;
@@ -26,6 +27,7 @@
FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
BetterEquipGetModel betterEquipGetModel { get { return ModelCenter.Instance.GetModel<BetterEquipGetModel>(); } }
+ RealmBetterEquipModel realmEquipModel { get { return ModelCenter.Instance.GetModel<RealmBetterEquipModel>(); } }
PreciousItemGetModel preciousItemGetModel { get { return ModelCenter.Instance.GetModel<PreciousItemGetModel>(); } }
ItemUseModel itemUseModel { get { return ModelCenter.Instance.GetModel<ItemUseModel>(); } }
ItemOverdueModel itemOverdue { get { return ModelCenter.Instance.GetModel<ItemOverdueModel>(); } }
@@ -38,6 +40,7 @@
public void Init()
{
CheckBetterEquip();
+ CheckRealmBetterEquip();
CheckPreciousItem();
CheckBossReborn();
CheckItemUse();
@@ -49,6 +52,7 @@
FirstChargeTrialShow();
playerPack.RefreshDecomAttrAct += CheckEquipDecompose;
betterEquipGetModel.showEquipRefreshEvent += CheckBetterEquip;
+ realmEquipModel.showEquipRefreshEvent += CheckRealmBetterEquip;
preciousItemGetModel.showItemRefreshEvent += CheckPreciousItem;
findPreciousModel.bossRebornNotifyChangeEvent += CheckBossReborn;
itemUseModel.showItemRefreshEvent += CheckItemUse;
@@ -68,6 +72,28 @@
NewBieCenter.Instance.guideBeginEvent -= OnNewBieGuideBegin;
guardModel.onDungeonEquipGuardEvent -= CheckDungeonGuard;
firstTimeRechargeModel.IsTipShowEvent -= FirstChargeTrialShow;
+ realmEquipModel.showEquipRefreshEvent -= CheckRealmBetterEquip;
+ }
+
+
+ private void CheckRealmBetterEquip()
+ {
+ if (string.IsNullOrEmpty(realmEquipModel.currentEquipGuid))
+ {
+ m_RealmBetterEquipPusher.gameObject.SetActive(false);
+ }
+ else
+ {
+ if (betterEquipGetModel.ShowBetterEquipAble())
+ {
+ m_RealmBetterEquipPusher.gameObject.SetActive(true);
+ m_RealmBetterEquipPusher.ShowBetterEquip();
+ }
+ else
+ {
+ m_RealmBetterEquipPusher.gameObject.SetActive(false);
+ }
+ }
}
private void CheckBetterEquip()
diff --git a/System/MainInterfacePanel/MainInterfaceWin.cs b/System/MainInterfacePanel/MainInterfaceWin.cs
index d4f5936..538a84c 100644
--- a/System/MainInterfacePanel/MainInterfaceWin.cs
+++ b/System/MainInterfacePanel/MainInterfaceWin.cs
@@ -616,7 +616,7 @@
RedEnvelopeModel.RedEnvelope _envelope;
if (envelopeModel.TryGetLatestEnvelope(out _envelope))
{
- if (OSEnvelopeModel.m_OpenServerGetRedpin.state == RedPointState.Simple)
+ if (OSEnvelopeModel.m_OpenServerGetRedpin.state == RedPointState.GetReward)
{
WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().JumpType = 2;
diff --git a/System/MainInterfacePanel/PlayerMainDate.cs b/System/MainInterfacePanel/PlayerMainDate.cs
index fce87a8..9b145d8 100644
--- a/System/MainInterfacePanel/PlayerMainDate.cs
+++ b/System/MainInterfacePanel/PlayerMainDate.cs
@@ -339,7 +339,7 @@
bool IsBool = false;
var State1 = RedpointCenter.Instance.GetRedpointState(201);//绂忓埄
var State2 = RedpointCenter.Instance.GetRedpointState(210);
- if (State1 == RedPointState.Simple || State2 == RedPointState.Simple)
+ if (State1 == RedPointState.Simple || State1 == RedPointState.GetReward || State2 == RedPointState.Simple)
{
IsBool = true;
}
diff --git a/System/OpenServerActivity/ImpactRankModel.cs b/System/OpenServerActivity/ImpactRankModel.cs
index 9cfe10e..36a8208 100644
--- a/System/OpenServerActivity/ImpactRankModel.cs
+++ b/System/OpenServerActivity/ImpactRankModel.cs
@@ -569,7 +569,7 @@
var _complete = _playerData.value >= (_cfg as OSCBillTagAwardConfig).Condition;
if (_complete)
{
- _redpoint.state = RedPointState.Simple;
+ _redpoint.state = RedPointState.GetReward;
return;
}
}
@@ -582,7 +582,7 @@
if (_rank != -1 && _rank >= _start
&& _rank <= _end && !_playerData.billAwardGet)
{
- _redpoint.state = RedPointState.Simple;
+ _redpoint.state = RedPointState.GetReward;
return;
}
}
@@ -613,7 +613,8 @@
}
foreach (var _key in m_Redpoints.Keys)
{
- if (m_Redpoints[_key].state == RedPointState.Simple)
+ if (m_Redpoints[_key].state == RedPointState.GetReward
+ || m_Redpoints[_key].state == RedPointState.Simple)
{
return _key;
}
@@ -632,7 +633,8 @@
{
foreach (var _key in m_Redpoints.Keys)
{
- if (m_Redpoints[_key].state == RedPointState.Simple)
+ if (m_Redpoints[_key].state == RedPointState.GetReward
+ || m_Redpoints[_key].state == RedPointState.Simple)
{
return true;
}
diff --git a/System/OpenServerActivity/InSevenDayModel.cs b/System/OpenServerActivity/InSevenDayModel.cs
index 6efee79..8a638e6 100644
--- a/System/OpenServerActivity/InSevenDayModel.cs
+++ b/System/OpenServerActivity/InSevenDayModel.cs
@@ -182,7 +182,7 @@
}
if (Bool)
{
- redPointStre1.state = RedPointState.Simple;
+ redPointStre1.state = RedPointState.GetReward;
}
}
}
diff --git a/System/OpenServerActivity/OSRedEnvelopeModel.cs b/System/OpenServerActivity/OSRedEnvelopeModel.cs
index 069a870..e70a5a5 100644
--- a/System/OpenServerActivity/OSRedEnvelopeModel.cs
+++ b/System/OpenServerActivity/OSRedEnvelopeModel.cs
@@ -228,11 +228,11 @@
public void UpdateRedpackRedpoint(bool _checkVoice = false)
{
- bool hasRed = m_OpenServerGetRedpin.state == RedPointState.Simple;
+ bool hasRed = m_OpenServerGetRedpin.state == RedPointState.GetReward;
m_OpenServerGetRedpin.state = RedPointState.None;
if (CanGetEnvelope())
{
- m_OpenServerGetRedpin.state = RedPointState.Simple;
+ m_OpenServerGetRedpin.state = RedPointState.GetReward;
if (_checkVoice && !hasRed && servereInited && HasOtherRedpack() && !HasSelfRedpack())
{
CheckRedEnvelopeVoice();
@@ -425,7 +425,7 @@
get
{
return m_RedAchieveRedpoint.state == RedPointState.Simple
- || m_OpenServerGetRedpin.state == RedPointState.Simple;
+ || m_OpenServerGetRedpin.state == RedPointState.GetReward;
}
}
diff --git a/System/Pet/PetAttributeMethods.cs b/System/Pet/PetAttributeMethods.cs
index b5997a0..8515d0e 100644
--- a/System/Pet/PetAttributeMethods.cs
+++ b/System/Pet/PetAttributeMethods.cs
@@ -190,17 +190,8 @@
UIEffect uie = cell.transform.GetComponent<UIEffect>();
if (petmodel.ListEffectSkill.Contains(curPetSkillIds[skillIdIndex]))
{
- if (!uie.IsPlaying)
- {
- uie.Play();
- }
- }
- else
- {
- if (uie.IsPlaying)
- {
- uie.Stop();
- }
+ uie.Play();
+
}
if (petmodel._DicPetBack.ContainsKey(petInfoConfig.ID))
{
diff --git a/System/Realm/ActivateShow.cs b/System/Realm/ActivateShow.cs
index e4e7db4..3edbbc1 100644
--- a/System/Realm/ActivateShow.cs
+++ b/System/Realm/ActivateShow.cs
@@ -14,6 +14,7 @@
public static int currentLv { get; private set; }
public static int beforeLv { get; private set; }
public static int godWeaponType { get; private set; }
+ public static int treasureSoulId { get; private set; }
private static Dictionary<int, int> propertyUpDict = new Dictionary<int, int>();
@@ -177,6 +178,90 @@
}
+ public static void TreasureSoulGetReward(int id, int _beforeLevel, int _currentLevel)
+ {
+ activateType = ActivateFunc.TreasureSoul;
+ treasureSoulId = id;
+ propertyCompares.Clear();
+ propertyUpDict.Clear();
+ var model = ModelCenter.Instance.GetModel<TreasureSoulModel>();
+ TreasureSpecialData special;
+ if (model.TryGetTreasureSoul(treasureSoulId, out special))
+ {
+ switch (special.type)
+ {
+ case TreasurePrivilege.StrengthenAdd:
+ var configs = ConfigManager.Instance.GetAllValues<ItemPlusSumAttrConfig>();
+ var before = -1;
+ var present = 0;
+ for (int i = 0; i < configs.Count; i++)
+ {
+ if (_beforeLevel >= configs[i].countNeed)
+ {
+ before = i;
+ }
+ if (_currentLevel >= configs[i].countNeed)
+ {
+ present = i;
+ }
+ }
+ ItemPlusSumAttrConfig _beforeConfig = null;
+ if (before >= 0 && before < configs.Count)
+ {
+ _beforeConfig = configs[before];
+ }
+ List<int> _beforeProperties = new List<int>();
+ if (_beforeConfig != null)
+ {
+ _beforeProperties.AddRange(_beforeConfig.attType);
+ }
+ var config = (present < 0 || present >= configs.Count) ? null : configs[present];
+ if (config == null)
+ {
+ return;
+ }
+ for (int i = 0; i < config.attType.Length; i++)
+ {
+ var _index = _beforeProperties.IndexOf(config.attType[i]);
+ if (_index == -1 || config.attValue[i] > _beforeConfig.attValue[_index])
+ {
+ propertyUpDict.Add(config.attType[i], config.attValue[i] -
+ (_index == -1 ? 0 : _beforeConfig.attValue[_index]));
+ propertyCompares.Add(new PropertyCompare()
+ {
+ key = config.attType[i],
+ beforeValue = _index == -1 ? 0 : _beforeConfig.attValue[_index],
+ currentValue = config.attValue[i]
+ });
+ }
+ }
+ break;
+ case TreasurePrivilege.DemonJarAtk:
+ case TreasurePrivilege.MountAtk:
+ case TreasurePrivilege.PetHp:
+ case TreasurePrivilege.Sp:
+ foreach (var _key in special.propertyDict.Keys)
+ {
+ var beforeValue = special.propertyDict[_key] * _beforeLevel / special.progress;
+ var nowValue = special.propertyDict[_key] * _currentLevel / special.progress;
+ propertyUpDict.Add(_key, nowValue - beforeValue);
+ propertyCompares.Add(new PropertyCompare()
+ {
+ key = _key,
+ beforeValue = beforeValue,
+ currentValue = nowValue
+ });
+ }
+ break;
+ }
+ fightPower = UIHelper.GetFightPower(propertyUpDict);
+ if (!WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>())
+ {
+ WindowCenter.Instance.Open<RealmPropertyUpWin>();
+ }
+ }
+ }
+
public static void PrepareSkillFly()
{
if (prepareFlySkillEvent != null)
@@ -198,6 +283,7 @@
Realm,
GodWeapon,
Stove, //鐐间腹鐐夊崌绾�
+ TreasureSoul,//娉曞疂榄傞鍙栧睘鎬�
}
public struct PropertyCompare
diff --git a/System/Realm/RealmPropertyUpWin.cs b/System/Realm/RealmPropertyUpWin.cs
index 4a427ad..061620f 100644
--- a/System/Realm/RealmPropertyUpWin.cs
+++ b/System/Realm/RealmPropertyUpWin.cs
@@ -39,6 +39,10 @@
[SerializeField] RectTransform m_ContainerNewGotFly;
+ [SerializeField] RectTransform m_ContainerTreasureSoul;
+ [SerializeField] Image m_TreasureSoulIcon;
+ [SerializeField] Text m_TreasureSoulName;
+
FunctionUnlockFlyObject flyObject;
DateTime openTime = DateTime.Now;
@@ -55,12 +59,13 @@
protected override void OnPreOpen()
{
- m_ModelRawImage.gameObject.SetActive(true);
+ m_ModelRawImage.gameObject.SetActive(false);
m_ContainerSkill.gameObject.SetActive(false);
m_ContainerProperty.gameObject.SetActive(false);
m_ContainerLv.gameObject.SetActive(false);
m_ContainerNewGotSkill.gameObject.SetActive(false);
m_ContainerRealm.gameObject.SetActive(false);
+ m_ContainerTreasureSoul.gameObject.SetActive(false);
m_DisplayAlphaTween.SetStartState();
flying = false;
startFly = false;
@@ -141,6 +146,11 @@
DisplayNewGotSkill();
}
break;
+ case ActivateShow.ActivateFunc.TreasureSoul:
+ DisplayTreasureSoul();
+ DisplayFightPower();
+ DisplayProperty();
+ break;
}
}
@@ -184,6 +194,7 @@
m_Properties[i].gameObject.SetActive(true);
switch (ActivateShow.activateType)
{
+ case ActivateShow.ActivateFunc.TreasureSoul:
case ActivateShow.ActivateFunc.Realm:
m_Properties[i].Display(ActivateShow.propertyCompares[i].key
, ActivateShow.propertyCompares[i].beforeValue, ActivateShow.propertyCompares[i].currentValue);
@@ -235,10 +246,12 @@
switch (ActivateShow.activateType)
{
case ActivateShow.ActivateFunc.Realm:
+ m_ModelRawImage.gameObject.SetActive(true);
m_ModelRawImage.rectTransform.sizeDelta = new Vector2(680, 510);
UI3DModelExhibition.Instance.BeginShowPlayer(m_ModelRawImage, PlayerDatas.Instance.baseData.Job, RoleEquipType.retWing);
break;
case ActivateShow.ActivateFunc.GodWeapon:
+ m_ModelRawImage.gameObject.SetActive(true);
m_ModelRawImage.rectTransform.sizeDelta = new Vector2(600, 600);
UI3DTreasureExhibition.Instance.BeginShowGodWeapon(ActivateShow.godWeaponType, m_ModelRawImage);
break;
@@ -256,6 +269,17 @@
PrepareFly(ActivateShow.skills[0]);
}
+ void DisplayTreasureSoul()
+ {
+ var config = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(ActivateShow.treasureSoulId);
+ if (config != null)
+ {
+ m_ContainerTreasureSoul.gameObject.SetActive(true);
+ m_TreasureSoulIcon.SetSprite(config.Icon);
+ m_TreasureSoulName.text = config.Name;
+ }
+ }
+
void PrepareFly(int _skillId)
{
ActivateShow.PrepareSkillFly();
diff --git a/System/Realm/RealmUpWin.cs b/System/Realm/RealmUpWin.cs
index 6db609f..e1f4654 100644
--- a/System/Realm/RealmUpWin.cs
+++ b/System/Realm/RealmUpWin.cs
@@ -40,7 +40,6 @@
[SerializeField] RealmProgressBehaviour m_RealmProgress;
[SerializeField] UIEffect m_RealmDungeonSfx;
- [SerializeField] UIEffect m_GetRealmPointSfx;
[SerializeField] Button m_FuncButton;
[SerializeField] Text m_FuncButtonTxt;
@@ -55,8 +54,13 @@
[SerializeField, Header("妯″瀷浣嶇疆")] Vector3[] m_ModelPositions;
[SerializeField, Header("褰撳墠澧冪晫浣嶇疆")] Vector3[] m_RealmNowPositions;
[SerializeField, Header("涓嬩竴澧冪晫浣嶇疆")] Vector3[] m_RealmNextwPositions;
+ [SerializeField, Header("Boss浣嶇疆")] Vector3[] m_BossPositions;
int cacheRealmPoint = 0;
+ Coroutine cacheCoroutine = null;
+ RuntimeAnimatorController cacheController = null;
+ const string State_EnterHash = "Show";
+ const string State_IdleHash = "Idle";
RealmModel realmModel { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
@@ -78,6 +82,18 @@
Display();
}
+ protected override void OnActived()
+ {
+ base.OnActived();
+ if (realmModel.realmDungeonState)
+ {
+ m_RawPlayer.gameObject.SetActive(true);
+ StopBoss();
+ m_RawBoss.gameObject.SetActive(false);
+ UI3DModelExhibition.Instance.BeginShowSitDownPlayer(m_RawPlayer, PlayerDatas.Instance.baseData.Job);
+ }
+ }
+
protected override void OnAfterOpen()
{
HandleAchievement();
@@ -91,6 +107,7 @@
if (realmModel.realmDungeonState)
{
m_RealmDungeonSfx.Play();
+ StartCoroutine(Co_DisplayBossShow());
}
realmModel.realmDungeonState = false;
}
@@ -99,9 +116,14 @@
{
PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
WindowCenter.Instance.windowAfterCloseEvent -= WindowAfterCloseEvent;
- UI3DModelExhibition.Instance.StopShowNPC();
+ StopBoss();
UI3DModelExhibition.Instance.StopShowPlayer();
realmModel.realmDungeonState = false;
+ if (cacheCoroutine != null)
+ {
+ StopCoroutine(cacheCoroutine);
+ cacheCoroutine = null;
+ }
}
protected override void OnAfterClose()
@@ -117,10 +139,21 @@
}
#endregion
+ IEnumerator Co_DisplayBossShow()
+ {
+ yield return WaitingForSecondConst.WaitMS800;
+ UI3DModelExhibition.Instance.StopShowPlayer();
+ m_RawPlayer.gameObject.SetActive(false);
+ m_RawBoss.gameObject.SetActive(true);
+ var config = ConfigManager.Instance.GetTemplate<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel);
+ StartBoss(config, true);
+ }
+
private void PlayerDataRefreshInfoEvent(PlayerDataRefresh refreshType)
{
if (refreshType == PlayerDataRefresh.OfficialRank)
{
+ StopBoss();
DisplayRealmNow();
DisplayRealmNext();
DisplayModel();
@@ -135,10 +168,6 @@
DisplayModel();
DisplayButton();
- if (PlayerDatas.Instance.extersion.realmPoint >= cacheRealmPoint)
- {
- DisplayGetRealmPointSfx();
- }
cacheRealmPoint = PlayerDatas.Instance.extersion.realmPoint;
}
}
@@ -236,8 +265,8 @@
if (realmModel.IsRealmHighest || _realmPoint < config.NeedPoint)
{
m_RawPlayer.gameObject.SetActive(true);
+ StopBoss();
m_RawBoss.gameObject.SetActive(false);
- UI3DModelExhibition.Instance.StopShowNPC();
UI3DModelExhibition.Instance.BeginShowSitDownPlayer(m_RawPlayer, PlayerDatas.Instance.baseData.Job);
}
else if (_realmPoint >= config.NeedGood)
@@ -245,7 +274,41 @@
m_RawBoss.gameObject.SetActive(true);
m_RawPlayer.gameObject.SetActive(false);
UI3DModelExhibition.Instance.StopShowPlayer();
- UI3DModelExhibition.Instance.BeginShowNPC(config.BossID, config.IsBigRealm == 1 ? Vector3.zero : direction, m_RawBoss, false);
+ StartBoss(config);
+ }
+ }
+
+ private void StopBoss()
+ {
+ var npcModel = UI3DModelExhibition.Instance.NpcModelPet;
+ if (npcModel != null && m_RawBoss.gameObject.activeSelf)
+ {
+ var animator = npcModel.GetComponentInChildren<Animator>();
+ if (animator != null && cacheController != null)
+ {
+ animator.runtimeAnimatorController = cacheController;
+ }
+ }
+ UI3DModelExhibition.Instance.StopShowNPC();
+ }
+
+ private void StartBoss(RealmConfig config, bool act = false)
+ {
+ UI3DModelExhibition.Instance.StopShowPlayer();
+ UI3DModelExhibition.Instance.BeginShowNPC(config.BossID, config.IsBigRealm == 1 ? Vector3.zero : direction, m_RawBoss, false);
+ var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(config.BossID);
+ var npcModel = UI3DModelExhibition.Instance.NpcModelPet;
+ m_RawBoss.transform.localPosition = config.IsBigRealm == 1 ? m_BossPositions[1] : m_BossPositions[0];
+ if (npcModel != null)
+ {
+ var animator = npcModel.GetComponentInChildren<Animator>();
+ if (animator != null)
+ {
+ cacheController = animator.runtimeAnimatorController;
+ var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerRealmSuffix, npcConfig.MODE);
+ animator.runtimeAnimatorController = runtimeController;
+ animator.Play(act ? State_EnterHash : State_IdleHash, 0);
+ }
}
}
@@ -271,14 +334,6 @@
else
{
m_FuncButtonTxt.text = Language.Get("RealmWin_Bewrite_1");
- }
- }
-
- void DisplayGetRealmPointSfx()
- {
- if (m_GetRealmPointSfx != null)
- {
- m_GetRealmPointSfx.Play();
}
}
diff --git a/System/Role/RoleAttrWin.cs b/System/Role/RoleAttrWin.cs
index 6e73017..5f31b7b 100644
--- a/System/Role/RoleAttrWin.cs
+++ b/System/Role/RoleAttrWin.cs
@@ -14,12 +14,9 @@
[SerializeField] Image baseImg;
[SerializeField] Image specialImg;
- [SerializeField] Image addImg;
- [SerializeField] Button addBtn;
[SerializeField] Text m_BaseTxt;
[SerializeField] Text m_SpecialTxt;
- [SerializeField] Text m_AddTxt;
private readonly Color selectTxtCol = new Color32(52, 7, 1, 255);
private readonly Color unSelectTxtCol = new Color32(125, 91, 52, 255);
@@ -39,31 +36,15 @@
[SerializeField] Text descText;
- private void OnAddBtn()
- {
- if (attrShowType == 3) return;
- attrShowType = 3;
-
- addImg.SetSprite("2LVSelectTab_b");
- specialImg.SetSprite("2LVUnSelectTab_b");
- baseImg.SetSprite("2LVUnSelectTab_b");
- m_BaseTxt.color = unSelectTxtCol;
- m_SpecialTxt.color = unSelectTxtCol;
- m_AddTxt.color = selectTxtCol;
- OnRefreshScroll();
- }
-
private void OnSpecialBtn()
{
if (attrShowType == 2) return;
attrShowType = 2;
- addImg.SetSprite("2LVUnSelectTab_b");
specialImg.SetSprite("2LVSelectTab_b");
baseImg.SetSprite("2LVUnSelectTab_b");
m_BaseTxt.color = unSelectTxtCol;
m_SpecialTxt.color = selectTxtCol;
- m_AddTxt.color = unSelectTxtCol;
OnRefreshScroll();
}
@@ -73,12 +54,10 @@
if (attrShowType == 1) return;
attrShowType = 1;
- addImg.SetSprite("2LVUnSelectTab_b");
specialImg.SetSprite("2LVUnSelectTab_b");
baseImg.SetSprite("2LVSelectTab_b");
m_BaseTxt.color = selectTxtCol;
m_SpecialTxt.color = unSelectTxtCol;
- m_AddTxt.color = unSelectTxtCol;
OnRefreshScroll();
}
@@ -173,7 +152,6 @@
{
m_Controller.OnRefreshCell += OnRefreshCell;
m_Controller.OnGetDynamicSize += OnGetDynamicSize;
- addBtn.onClick.AddListener(OnAddBtn);
specialBtn.onClick.AddListener(OnSpecialBtn);
baseBtn.onClick.AddListener(OnBaseBtn);
closeBtn.onClick.AddListener(OnClose);
diff --git a/System/Role/RolePanel.cs b/System/Role/RolePanel.cs
index 3e0e50c..dd95d59 100644
--- a/System/Role/RolePanel.cs
+++ b/System/Role/RolePanel.cs
@@ -44,7 +44,6 @@
[SerializeField] RectTransform m_ContainerExp;
[SerializeField] Slider m_ExpSlider;
[SerializeField] Text m_WorldExp;
- [SerializeField] Button m_PromoteBtn;
[SerializeField] Button m_PlayerPropertyBtn;
[SerializeField] Button m_TitleBtn;
[SerializeField] Button m_RenameBtn;
@@ -127,17 +126,17 @@
{
WindowCenter.Instance.Open<RoleAttrWin>();
}
- private void OnPromoteClick()
- {
- if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.AddPoint))
- {
- WindowCenter.Instance.Open<RolePoint>();
- }
- else
- {
- FuncOpen.Instance.ProcessorFuncErrorTip((int)FuncOpenEnum.AddPoint);
- }
- }
+ //private void OnPromoteClick()
+ //{
+ // if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.AddPoint))
+ // {
+ // WindowCenter.Instance.Open<RolePoint>();
+ // }
+ // else
+ // {
+ // FuncOpen.Instance.ProcessorFuncErrorTip((int)FuncOpenEnum.AddPoint);
+ // }
+ //}
private void OnRefreshPlayerInfo(PlayerDataRefresh refreshType)
{
switch (refreshType)
@@ -269,7 +268,7 @@
functionButtonMagician.onClick.AddListener(OnFuncMagician);
functionButtonGulu.onClick.AddListener(OnFuncGulu);
functionButtonHorucx.onClick.AddListener(OnFuncHorucx);
- m_PromoteBtn.onClick.AddListener(OnPromoteClick);
+ //m_PromoteBtn.onClick.AddListener(OnPromoteClick);
m_PlayerPropertyBtn.onClick.AddListener(OnAttrExplainClick);
m_TitleBtn.onClick.AddListener(OnDesignationClick);
m_RenameBtn.onClick.AddListener(OnRenameClick);
diff --git a/System/Role/RolePoint.cs b/System/Role/RolePoint.cs
deleted file mode 100644
index 32218c0..0000000
--- a/System/Role/RolePoint.cs
+++ /dev/null
@@ -1,442 +0,0 @@
-锘縰sing System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.UI;
-using TableConfig;
-namespace Snxxz.UI
-{
- public class RolePoint : Window
- {
-
- [SerializeField] Button closeBtn;
- [SerializeField] Button recomBtn;
- [SerializeField] Button confirmBtn;
- [SerializeField] Text surplusPt;
- [SerializeField] List<PropertyValue> m_Propertys;
- [SerializeField] NumKeyBoard keyBoard;
- [SerializeField] ClickScreenOtherSpace keyBoardClickOut;
-
- private Dictionary<int, Text> ptTextDic = new Dictionary<int, Text>();
- private int surplusCnt = 0;
- private Dictionary<int, int> ptValDic = new Dictionary<int, int>();
- private bool lockpak = false;
- private bool isSpeedUp = false;
- private static WaitForSeconds waitSpeedUp = new WaitForSeconds(0.5f);
- private static WaitForSeconds waitSpeedFaster = new WaitForSeconds(0.05f);
- private static WaitForSeconds waitSpeedSlow = new WaitForSeconds(0.2f);
- private const int WAITCNT = 1;
- private int presentAttrPoint = 0;
- RolePointModel m_Model;
- RolePointModel model
- {
- get
- {
- return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<RolePointModel>());
- }
- }
-
- private void OnAddUp(GameObject go)
- {
- isSpeedUp = false;
- StopAllCoroutines();
- }
-
- private void OnMinusUp(GameObject go)
- {
- isSpeedUp = false;
- StopAllCoroutines();
- }
-
- private void OnPlayerInfoRefresh(PlayerDataRefresh refreshType)
- {
- switch (refreshType)
- {
- case PlayerDataRefresh.FreePoint:
- {
- OnRefreshAttr();
- }
- break;
- case PlayerDataRefresh.STR:
- case PlayerDataRefresh.PNE:
- case PlayerDataRefresh.PHY:
- case PlayerDataRefresh.CON:
- {
- OnRefreshPtAttr();
- }
- break;
- default:
- {
- foreach (var _property in m_Propertys)
- {
- _property.RefreshValue();
- }
- }
- break;
- }
- }
-
- private void OnConfirmClick()
- {
- lockpak = true;
- foreach (int key in ptValDic.Keys)
- {
- if (ptValDic[key] > 0)
- {
- model.SendAddPoint(key, ptValDic[key]);
- }
- }
- }
-
- private void OnRecomClick()
- {
- int freepoint = (int)PlayerDatas.Instance.baseData.FreePoint;
- int allfreept = freepoint;
- int pt = 0;
- Dictionary<int, float> recomDic = model.GetPointRecom(PlayerDatas.Instance.baseData.Job);
- Dictionary<int, int> createDic = model.GetPointCreate(PlayerDatas.Instance.baseData.Job);
- foreach (var key in recomDic.Keys)
- {
- allfreept += ((int)UIHelper.GetPropertyMapPlayerData((AttrEnum)key) - createDic[key]);
- }
- ptValDic.Clear();
- foreach (var key in createDic.Keys)
- {
- ptValDic.Add(key, 0);
- ptTextDic[1 * 5 + key].text = ptValDic[key].ToString();
- }
- foreach (var key in recomDic.Keys)
- {
- int expectpt = Mathf.RoundToInt(recomDic[key] * allfreept);
- int presentpt = expectpt - ((int)UIHelper.GetPropertyMapPlayerData((AttrEnum)key) - createDic[key]);
- if (presentpt > 0)
- {
- if (pt + presentpt > freepoint)
- {
- presentpt = freepoint - pt;
- }
- pt += presentpt;
- ptValDic[key] = presentpt;
- }
- ptTextDic[1 * 5 + key].text = ptValDic[key].ToString();
- }
-
- surplusCnt = freepoint - pt;
- surplusPt.text = surplusCnt.ToString();
- OnRefreshAdd();
- }
-
- private void OnMinusBtn(GameObject obj)
- {
- isSpeedUp = true;
- int index = int.Parse(obj.name);
- if (ptValDic.ContainsKey(index))
- {
- if (ptValDic[index] < 1) return;
- ptValDic[index]--;
- surplusCnt++;
- OnUpdatePoint(index);
- }
- StartCoroutine(OnSpeedUp(false, index));
- }
-
- private void OnAddBtn(GameObject obj)
- {
- isSpeedUp = true;
- int index = int.Parse(obj.name);
- if (ptValDic.ContainsKey(index))
- {
- if (surplusCnt < 1) return;
- ptValDic[index]++;
- surplusCnt--;
- OnUpdatePoint(index);
- }
- StartCoroutine(OnSpeedUp(true, index));
- }
-
- private void OnUpdatePoint(int index)
- {
- ptTextDic[1 * 5 + index].text = ptValDic[index].ToString();
- surplusPt.text = surplusCnt.ToString();
- OnRefreshAdd();
- }
-
- IEnumerator OnSpeedUp(bool up, int index)
- {
- yield return waitSpeedUp;
- int upCnt = 0;
- while (isSpeedUp)
- {
- if (ptValDic.ContainsKey(index))
- {
- if (up)
- {
- if (surplusCnt < 1) yield break;
- ptValDic[index]++;
- surplusCnt--;
- OnUpdatePoint(index);
- }
- else
- {
- if (ptValDic[index] < 1) yield break;
- ptValDic[index]--;
- surplusCnt++;
- OnUpdatePoint(index);
- }
- }
- if (upCnt < WAITCNT)
- {
- yield return waitSpeedSlow;
- }
- else
- {
- yield return waitSpeedFaster;
- }
- upCnt++;
- }
- }
-
- private void OnPointValChange()
- {
- int index = presentAttrPoint + 1;
- surplusCnt += ptValDic[index];
- int num = int.Parse(keyBoard.Value);
- if (surplusCnt - num < 0) num = surplusCnt;
- ptValDic[index] = num;
- surplusCnt -= num;
- OnUpdatePoint(index);
- keyBoard.Value = num.ToString();
- }
-
- private void OnRefreshAdd()
- {
- Equation.Instance.Clear();
- Equation.Instance.AddKeyValue("STR", ptValDic[2]);
- Equation.Instance.AddKeyValue("PNE", ptValDic[5]);
- Equation.Instance.AddKeyValue("PHY", ptValDic[3]);
- Equation.Instance.AddKeyValue("CON", ptValDic[4]);
- Dictionary<int, string> dic = model.GetPointAttrFormula(PlayerDatas.Instance.baseData.Job);
- foreach (var _type in dic.Keys)
- {
- float _value = Equation.Instance.Eval<float>(dic[_type]);
- GetProperty(_type).RefreshAdd(_value);
- }
- }
-
- void OnRefreshAttr()
- {
- if (model.rolePointAddAttrArray != null)
- {
- for (int i = 0; i < model.rolePointAddAttrArray.Length; i++)
- {
- PlayerPropertyConfig cfg = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(model.rolePointAddAttrArray[i]);
- ptTextDic[2 * 5 + model.rolePointAddAttrArray[i]].text = cfg.Name;
- ptTextDic[0 * 5 + model.rolePointAddAttrArray[i]].text = UIHelper.GetPropertyMapPlayerData((AttrEnum)model.rolePointAddAttrArray[i]).ToString();
- ptValDic[model.rolePointAddAttrArray[i]] = 0;
- ptTextDic[1 * 5 + model.rolePointAddAttrArray[i]].text = ptValDic[model.rolePointAddAttrArray[i]].ToString();
- }
- }
-
- surplusCnt = (int)PlayerDatas.Instance.baseData.FreePoint;
- surplusPt.text = surplusCnt.ToString();
-
- OnRefreshAdd();
- }
-
- void OnRefreshPtAttr()
- {
- if (model.rolePointAddAttrArray != null)
- {
- for (int i = 0; i < model.rolePointAddAttrArray.Length; i++)
- {
- ptTextDic[0 * 5 + model.rolePointAddAttrArray[i]].text = UIHelper.GetPropertyMapPlayerData((AttrEnum)model.rolePointAddAttrArray[i]).ToString();
- }
- }
- }
-
- private string GetAttrStr(AttrEnum type)
- {
- PlayerPropertyConfig cfg = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>((int)type);
- float value = UIHelper.GetPropertyMapPlayerData(type);
- return UIHelper.ReplacePercentage(value, cfg.ISPercentage) + (cfg.ISPercentage == 1 ? "%" : string.Empty);
- }
-
- protected override void BindController()
- {
- Text text;
- int i = 1;
- foreach (var key in model.GetPointCreate(PlayerDatas.Instance.baseData.Job).Keys)
- {
- text = transform.Find(string.Format("Bgm/RightBox/AddAttrNumText{0}", i)).GetComponent<Text>();
- ptTextDic.Add(0 * 5 + key, text);
- text = transform.Find(string.Format("Bgm/RightBox/DotImg{0}/DotText{0}", i)).GetComponent<Text>();
- text.name = (i).ToString();
- ptTextDic.Add(1 * 5 + key, text);
- text = transform.Find(string.Format("Bgm/RightBox/AddAttrText{0}", i)).GetComponent<Text>();
- ptTextDic.Add(2 * 5 + key, text);
- i++;
- }
- Button btn;
- i = 1;
- foreach (var key in model.GetPointCreate(PlayerDatas.Instance.baseData.Job).Keys)
- {
- btn = transform.Find(string.Format("Bgm/RightBox/MinusButton{0}", i)).GetComponent<Button>();
- btn.name = key.ToString();
- UIEventTrigger.Get(btn.gameObject).OnDown = OnMinusBtn;
- UIEventTrigger.Get(btn.gameObject).OnUp = OnMinusUp;
- i++;
- }
- i = 1;
- foreach (var key in model.GetPointCreate(PlayerDatas.Instance.baseData.Job).Keys)
- {
- btn = transform.Find(string.Format("Bgm/RightBox/AddsButton{0}", i)).GetComponent<Button>();
- btn.name = key.ToString();
- UIEventTrigger.Get(btn.gameObject).OnDown = OnAddBtn;
- UIEventTrigger.Get(btn.gameObject).OnUp = OnAddUp;
- i++;
- }
- }
-
- protected override void AddListeners()
- {
- closeBtn.onClick.AddListener(CloseClick);
- confirmBtn.onClick.AddListener(OnConfirmClick);
- recomBtn.onClick.AddListener(OnRecomClick);
- keyBoard.onValueChange.AddListener(OnPointValChange);
- keyBoard.onConfirm.AddListener((bool _isConfirm) =>
- {
- if (_isConfirm)
- {
- keyBoard.gameObject.SetActive(false);
- }
- });
- keyBoardClickOut.AddListener(() =>
- {
- keyBoard.gameObject.SetActive(false);
- });
- foreach (var key in model.GetPointCreate(PlayerDatas.Instance.baseData.Job).Keys)
- {
- Text text = ptTextDic[1 * 5 + key];
- UIEventTrigger.Get(text.gameObject).OnNoParamsClick = () =>
- {
- int _key = int.Parse(text.name);
- presentAttrPoint = _key;
- keyBoard.gameObject.SetActive(true);
- keyBoard.max = (uint)surplusCnt + (uint)ptValDic[_key + 1];
- keyBoard.min = 0;
- RectTransform parent = text.rectTransform.parent as RectTransform;
- keyBoard.transform.localPosition = parent.localPosition.SetY(parent.localPosition.y - parent.rect.height / 2);
- };
- }
- }
-
- protected override void OnPreOpen()
- {
- PlayerDatas.Instance.PlayerDataRefreshInfoEvent += OnPlayerInfoRefresh;
- keyBoard.gameObject.SetActive(false);
- var _dict = model.GetPointAttrFormula(PlayerDatas.Instance.baseData.Job);
- int i = 0;
- foreach (var _type in _dict.Keys)
- {
- m_Propertys[i].property = _type;
- i++;
- }
- OnRefreshAttr();
- isSpeedUp = false;
- }
-
- protected override void OnAfterOpen()
- {
- HandleAchievement();
- }
-
- protected override void OnPreClose()
- {
- if (!WindowCenter.Instance.CheckOpen<RolePanel>())
- {
- WindowCenter.Instance.Open<MainInterfaceWin>();
- }
- PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnPlayerInfoRefresh;
- isSpeedUp = false;
- StopAllCoroutines();
- }
-
- protected override void OnAfterClose()
- {
- }
-
- private void HandleAchievement()
- {
- if (AchievementGoto.achievementType == AchievementGoto.RolePoint)
- {
- var _effect = AchievementGuideEffectPool.Require(1);
- _effect.transform.SetParentEx(recomBtn.transform,Vector3.zero,Vector3.zero,Vector3.one);
- AchievementGoto.achievementType = 0;
- }
- }
-
- private PropertyValue GetProperty(int _type)
- {
- return m_Propertys.Find((x) =>
- {
- return x.property == _type;
- });
- }
-
- [Serializable]
- public class PropertyValue
- {
- private int m_Property;
- public int property
- {
- get
- {
- return m_Property;
- }
- set
- {
- m_Property = value;
- Refresh();
- }
- }
- [SerializeField] Text m_PropertyTypeTxt;
- [SerializeField] Text m_PropertyValueTxt;
- [SerializeField] Text m_PropertyAddValue;
-
- public void Refresh()
- {
- var _propCfg = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(property);
- if (_propCfg != null)
- {
- m_PropertyTypeTxt.text = _propCfg.Name;
- RefreshValue();
- RefreshAdd(0);
- }
- }
-
- public void RefreshValue()
- {
- var _propCfg = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(property);
- if ((AttrEnum)property == AttrEnum.ATK)
- {
- m_PropertyValueTxt.text =StringUtility.Contact(UIHelper.ReplaceLargeNum((ulong)PlayerDatas.Instance.extersion.MINATK),
- "-", UIHelper.ReplaceLargeNum((ulong)PlayerDatas.Instance.extersion.MAXATK));
- }
- else
- {
- m_PropertyValueTxt.text = UIHelper.ReplaceLargeNum((ulong)UIHelper.GetPropertyMapPlayerData((AttrEnum)property));
- }
- }
-
- public void RefreshAdd(float _value)
- {
- m_PropertyAddValue.gameObject.SetActive(_value != 0);
- if (_value > 0)
- {
- m_PropertyAddValue.text = StringUtility.Contact("+", _value);
- }
- }
- }
- }
-}
-
diff --git a/System/Role/RolePointModel.cs b/System/Role/RolePointModel.cs
deleted file mode 100644
index f787153..0000000
--- a/System/Role/RolePointModel.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using TableConfig;
-namespace Snxxz.UI
-{
- public class RolePointModel : Model
- {
- public override void Init()
- {
- ParseConfig();
- FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
- }
-
-
-
- public override void UnInit()
- {
- }
-
- private void OnFuncStateChangeEvent(int func)
- {
- if ((FuncOpenEnum)func == FuncOpenEnum.AddPoint)
- {
- UpdateRedPoint();
- }
- }
-
- private Dictionary<int, Dictionary<int, string>> rolePointFormulaDic = new Dictionary<int, Dictionary<int, string>>();
- public Dictionary<int, string> GetPointAttrFormula(int job)
- {
- Dictionary<int, string> dic;
- rolePointFormulaDic.TryGetValue(job, out dic);
- return dic;
- }
- public bool ContainsProperty(int _type)
- {
- var _dict = GetPointAttrFormula(PlayerDatas.Instance.baseData.Job);
- return _dict.ContainsKey(_type);
- }
- public int[] rolePointAddAttrArray { get; private set; }
- private Dictionary<int, Dictionary<int, float>> rolePointRecomDic = new Dictionary<int, Dictionary<int, float>>();
- public Dictionary<int, float> GetPointRecom(int job)
- {
- Dictionary<int, float> dic;
- rolePointRecomDic.TryGetValue(job, out dic);
- return dic;
- }
- private Dictionary<int, Dictionary<int, int>> roleCreatePointDic = new Dictionary<int, Dictionary<int, int>>();
- public Dictionary<int, int> GetPointCreate(int job)
- {
- Dictionary<int, int> dic;
- roleCreatePointDic.TryGetValue(job, out dic);
- return dic;
- }
-
- private void ParseConfig()
- {
- FuncConfigConfig cfg;
- for (int i = 1; i <= 3; i++)
- {
- cfg = ConfigManager.Instance.GetTemplate<FuncConfigConfig>(string.Format("PointAttr{0}", i));
- if (cfg != null)
- {
- Dictionary<int, string> dic = ConfigParse.GetDic<int, string>(cfg.Numerical1);
- rolePointFormulaDic.Add(i, dic);
- }
- cfg = ConfigManager.Instance.GetTemplate<FuncConfigConfig>(string.Format("PointAdd{0}", i));
- if (cfg != null)
- {
- Dictionary<int, float> dic = ConfigParse.GetDic<int, float>(cfg.Numerical1);
- rolePointRecomDic.Add(i, dic);
- }
- cfg = ConfigManager.Instance.GetTemplate<FuncConfigConfig>(string.Format("CreatRolePoint{0}", i));
- if (cfg != null)
- {
- Dictionary<int, int> dic = ConfigParse.GetDic<int, int>(cfg.Numerical1);
- roleCreatePointDic.Add(i, dic);
- }
- }
- cfg = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("PointAddAttr");
- rolePointAddAttrArray = ConfigParse.GetMultipleStr<int>(cfg.Numerical1);
- }
-
- Redpoint redpoint = new Redpoint(10101, 1010101);
- Redpoint roleRedPoint = new Redpoint(101, 10101);
- Redpoint mainRoleRedpoint = new Redpoint(1, 101);
-
- public Redpoint addPointRedpoint
- {
- get { return redpoint; }
- }
-
- public void UpdateRedPoint()
- {
- if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.AddPoint))
- {
- return;
- }
- redpoint.state = PlayerDatas.Instance.baseData.FreePoint > 0 ? RedPointState.Simple : RedPointState.None;
- }
-
- public void SendAddPoint(int type, int point)
- {
- C0301_tagCAddPoint addPack = new C0301_tagCAddPoint();
- addPack.Type = (byte)type;
- addPack.Point = (ushort)point;
- GameNetSystem.Instance.SendInfo(addPack);
- }
- }
-}
diff --git a/System/Role/RolePointModel.cs.meta b/System/Role/RolePointModel.cs.meta
deleted file mode 100644
index eb0e17d..0000000
--- a/System/Role/RolePointModel.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 46523513e1b6ec54cb0272f1f8d770e3
-timeCreated: 1510572611
-licenseType: Free
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/System/RolePromote/RolePromoteModel.cs b/System/RolePromote/RolePromoteModel.cs
index d0c801b..c5accdf 100644
--- a/System/RolePromote/RolePromoteModel.cs
+++ b/System/RolePromote/RolePromoteModel.cs
@@ -710,11 +710,6 @@
#endregion
#region 涓荤晫闈㈡彁鍗�
- RolePointModel rolePointModel
- {
- get { return ModelCenter.Instance.GetModel<RolePointModel>(); }
- }
-
PlayerMethodData methodData
{
get { return ModelCenter.Instance.GetModel<PlayerMethodData>(); }
@@ -750,8 +745,7 @@
private void RedpointValueChangeEvent(int _id)
{
- if (_id == rolePointModel.addPointRedpoint.id ||
- _id == strengthengmodel.StrengthRedpoint.id ||
+ if (_id == strengthengmodel.StrengthRedpoint.id ||
_id == MainRedDot.RedPoint_MountPackKey ||
_id == MainRedDot.Instance.redPonintPetFunc2.id ||
_id == MainRedDot.Instance.redPointWashFunc.id ||
@@ -795,8 +789,6 @@
{
case PromoteDetailType.BetterEquip:
return modelInterface.CheckBetterEquip(RoleEquipType.retSpiritAnimal);
- case PromoteDetailType.AddPoint:
- return ModelCenter.Instance.GetModel<RolePointModel>().addPointRedpoint.state == RedPointState.Simple;
case PromoteDetailType.EquipStrength:
return strengthengmodel.StrengthRedpoint.state == RedPointState.Simple;
case PromoteDetailType.Mount:
@@ -845,7 +837,6 @@
public enum PromoteDetailType
{
BetterEquip,
- AddPoint,
EquipStrength,
Mount,
Pet,
diff --git a/System/RuneTower/RuneTowerWin.cs b/System/RuneTower/RuneTowerWin.cs
index 6572750..f09d6db 100644
--- a/System/RuneTower/RuneTowerWin.cs
+++ b/System/RuneTower/RuneTowerWin.cs
@@ -174,10 +174,11 @@
{
var towerFloorConfig = ConfigManager.Instance.GetTemplate<RuneTowerFloorConfig>(model.selectedFloor);
var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(towerFloorConfig.BossId);
- if (npcConfig.Realm > 0)
+
+ if (ConfigManager.Instance.ContainKey<RealmConfig>(npcConfig.ClientRealm))
{
m_BossRealm.gameObject.SetActive(true);
- var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.Realm);
+ var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.ClientRealm);
m_BossRealm.SetSprite(realmConfig.Img);
}
else
diff --git a/System/Strengthening/GodBeastEntry.cs b/System/Strengthening/GodBeastEntry.cs
new file mode 100644
index 0000000..4119582
--- /dev/null
+++ b/System/Strengthening/GodBeastEntry.cs
@@ -0,0 +1,58 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Thursday, August 16, 2018
+//--------------------------------------------------------
+using UnityEngine;
+using System.Collections;
+using UnityEngine.UI;
+using System.Collections.Generic;
+using TableConfig;
+//绁炲吔寮哄寲锛涘垪琛ㄦ潯鐩�
+namespace Snxxz.UI
+{
+
+ public class GodBeastEntry : MonoBehaviour
+ {
+ [SerializeField] ItemCell m_itemCell;
+ [SerializeField] GameObject m_Selectedbar_Image;
+ [SerializeField] Text m_Item_Text;
+ //[SerializeField] Button //
+ DogzModel Dogz_model;
+ DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } }
+ public void GetGodBeastLocationMarker(int locationMarker)
+ {
+ int godBeastNumber = locationMarker / 10;
+ int godBeastPart = locationMarker % 10;
+ List<ItemModel> itemModel = dogz_model.GetDogzEquips(godBeastNumber);
+ if (itemModel != null)
+ {
+ for (int i = 0; i < itemModel.Count; i++)
+ {
+ if (itemModel[i].EquipPlace == godBeastPart)
+ {
+ ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, 1);
+ m_itemCell.Init(ItemModel);
+ var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(itemModel[i].itemId);
+ var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
+ m_Item_Text.color = UIHelper.GetUIColor(itemConfig.ItemColor);
+ if (IudetDogzEquipPlus != null && IudetDogzEquipPlus[0] > 0)
+ {
+ m_Item_Text.text = itemConfig.ItemName+" +"+ IudetDogzEquipPlus[0];
+ }
+ else
+ {
+ m_Item_Text.text = itemConfig.ItemName;
+ }
+ }
+
+ }
+
+ }
+
+ }
+ }
+
+}
+
+
+
diff --git a/System/Role/RolePoint.cs.meta b/System/Strengthening/GodBeastEntry.cs.meta
similarity index 75%
copy from System/Role/RolePoint.cs.meta
copy to System/Strengthening/GodBeastEntry.cs.meta
index 8d0a009..44f7e51 100644
--- a/System/Role/RolePoint.cs.meta
+++ b/System/Strengthening/GodBeastEntry.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 77a6a757b99422846bb5b68b65b5af18
-timeCreated: 1502422861
+guid: ce0013549955f054e978142d01217a31
+timeCreated: 1534423338
licenseType: Free
MonoImporter:
serializedVersion: 2
diff --git a/System/Strengthening/GodBeastReinforcementWin.cs b/System/Strengthening/GodBeastReinforcementWin.cs
new file mode 100644
index 0000000..9750523
--- /dev/null
+++ b/System/Strengthening/GodBeastReinforcementWin.cs
@@ -0,0 +1,152 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Thursday, August 16, 2018
+//--------------------------------------------------------
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+//绁炲吔寮哄寲
+namespace Snxxz.UI
+{
+ public class GodBeastClass
+ {
+ public int GodBeastNumber;//绁炲吔缂栧彿
+ public int GodBeastPart;//绁炲吔閮ㄤ綅
+ public int GodBeastLv;//绁炲吔绛夌骇
+ public int GodBeasProficiency;//鐔熺粌搴�
+ public int GodBeastQuality;//绁炲吔鍝佽川
+ public int GodBeastStar;//绁炲吔鏄熺骇
+ public int LocationMarker;//浣嶇疆鏍囪
+ }
+ public class GodBeastReinforcementWin : Window
+ {
+ [SerializeField] ScrollerController m_ScrollerController;
+ [SerializeField] GodBeastSlidingList m_GodBeastSlidingList;
+ [SerializeField] GameObject m_Listprompt_Text;
+
+ DogzModel Dogz_model;
+ DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } }
+ private List<GodBeastClass> GodBeastList = new List<GodBeastClass>();
+ #region Built-in
+ protected override void BindController()
+ {
+ }
+
+ protected override void AddListeners()
+ {
+
+ }
+
+ protected override void OnPreOpen()
+ {
+ GetGodBeast();//鑾峰彇绁炲吔寮哄寲瑁呭淇℃伅
+ m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
+ OnCreateGridLineCell(m_ScrollerController);
+ if (GodBeastList.Count > 0)
+ {
+ m_ScrollerController.JumpIndex(0);
+ }
+ m_GodBeastSlidingList.Init();
+ }
+
+ protected override void OnAfterOpen()
+ {
+ }
+
+ protected override void OnPreClose()
+ {
+ m_ScrollerController.m_Scorller.RefreshActiveCellViews();//鍒锋柊鍙
+ m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
+ }
+
+
+
+ protected override void OnAfterClose()
+ {
+ }
+ #endregion
+
+ private void GetGodBeast()//瀛樺偍绁炲吔寮哄寲鍒楄〃鏁版嵁鍜屾帓搴�
+ {
+ GodBeastList.Clear();
+ var DogzEquipDict = dogz_model.dogzAssistStateDict;
+ foreach (var key in DogzEquipDict.Keys)
+ {
+ if (DogzEquipDict[key] == 1)
+ {
+ GodBeastClass godBeastClass = new GodBeastClass();
+ List<ItemModel> itemModel = dogz_model.GetDogzEquips(key);
+ for (int i = 0; i < itemModel.Count; i++)
+ {
+ godBeastClass.GodBeastNumber = key;
+ godBeastClass.GodBeastPart = itemModel[i].EquipPlace;
+ godBeastClass.GodBeastQuality = itemModel[i].chinItemModel.ItemColor;
+ godBeastClass.GodBeastStar = itemModel[i].chinItemModel.StarLevel;
+ var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
+ godBeastClass.GodBeastLv = IudetDogzEquipPlus[0];
+ godBeastClass.GodBeasProficiency = IudetDogzEquipPlus[1];
+ godBeastClass.LocationMarker= key*10+ itemModel[i].EquipPlace;
+ GodBeastList.Add(godBeastClass);
+ }
+ }
+ }
+ GodBeastList.Sort(Compare);
+ }
+ int Compare(GodBeastClass x, GodBeastClass y)
+ {
+ if (x.GodBeastQuality.CompareTo(y.GodBeastQuality) != 0)//鍝佽川
+ {
+ return -x.GodBeastQuality.CompareTo(y.GodBeastQuality);
+ }
+ if (x.GodBeastStar.CompareTo(y.GodBeastStar) != 0)//鏄熺骇
+ {
+ return -x.GodBeastStar.CompareTo(y.GodBeastStar);
+ }
+ if (x.GodBeastPart.CompareTo(y.GodBeastPart) != 0)//瑁呭浣�
+ {
+ return x.GodBeastPart.CompareTo(y.GodBeastPart);
+ }
+ if (x.GodBeastLv.CompareTo(y.GodBeastLv) != 0)//寮哄寲绛夌骇
+ {
+ return -x.GodBeastLv.CompareTo(y.GodBeastLv);
+ }
+ if (x.GodBeasProficiency.CompareTo(y.GodBeasProficiency) != 0)//鐔熺粌搴�
+ {
+ return -x.GodBeasProficiency.CompareTo(y.GodBeasProficiency);
+ }
+ return 1;
+ }
+ void OnCreateGridLineCell(ScrollerController gridCtrl)
+ {
+ gridCtrl.Refresh();
+ if (GodBeastList.Count > 0)
+ {
+ m_Listprompt_Text.SetActive(false);
+ }
+ else
+ {
+ m_Listprompt_Text.SetActive(true);
+ }
+ for (int i = 0; i < GodBeastList.Count; i++)
+ {
+ int locationMarker = GodBeastList[i].LocationMarker;
+ gridCtrl.AddCell(ScrollerDataType.Header, locationMarker);
+ }
+ gridCtrl.Restart();
+
+ }
+ private void OnRefreshGridCell(ScrollerDataType type, CellView cell)
+ {
+ GodBeastEntry godBeastEntry = cell.GetComponent<GodBeastEntry>();
+ int locationMarker = cell.index;
+ }
+ }
+
+}
+
+
+
+
diff --git a/System/Role/RolePoint.cs.meta b/System/Strengthening/GodBeastReinforcementWin.cs.meta
similarity index 75%
rename from System/Role/RolePoint.cs.meta
rename to System/Strengthening/GodBeastReinforcementWin.cs.meta
index 8d0a009..e439d1c 100644
--- a/System/Role/RolePoint.cs.meta
+++ b/System/Strengthening/GodBeastReinforcementWin.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 77a6a757b99422846bb5b68b65b5af18
-timeCreated: 1502422861
+guid: 69585e30fb1796b42b2b119b864f6776
+timeCreated: 1534421646
licenseType: Free
MonoImporter:
serializedVersion: 2
diff --git a/System/Strengthening/GodBeastSlidingList.cs b/System/Strengthening/GodBeastSlidingList.cs
new file mode 100644
index 0000000..54de49c
--- /dev/null
+++ b/System/Strengthening/GodBeastSlidingList.cs
@@ -0,0 +1,142 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Friday, August 17, 2018
+//--------------------------------------------------------
+using UnityEngine;
+using System.Collections;
+using UnityEngine.UI;
+//绁炲吔寮哄寲鍙充晶鏉愭枡鍚告敹鍒楄〃
+namespace Snxxz.UI {
+
+ public class GodBeastSlidingList:MonoBehaviour {
+ [SerializeField] ScrollerController m_ScrollerController;
+
+ [SerializeField] Text m_Label;
+ [SerializeField] Button m_Arrow;
+ [SerializeField] GameObject m_ScrollViewFirst;
+ [SerializeField] Button m_ButtonAll;//鎵�鏈�
+ [SerializeField] Button m_ButtonCrystal;//姘存櫠
+ [SerializeField] Button m_ButtonBlue;//钃�
+ [SerializeField] Button m_ButtonPurple;//绱壊
+ [SerializeField] Button m_ButtonOrange;//姗欒壊
+
+ [SerializeField] Toggle m_ToggleAll;
+ public int LINE = 10;
+
+ private int Quality = 10;
+ private void Start()
+ {
+ m_Arrow.AddListener(OnClickArrow);
+ m_ButtonAll.AddListener(()=>{ OnClickSwith(10); });
+ m_ButtonCrystal.AddListener(() => { OnClickSwith(1);});
+ m_ButtonBlue.AddListener(() => { OnClickSwith(2); });
+ m_ButtonPurple.AddListener(() => { OnClickSwith(3); });
+ m_ButtonOrange.AddListener(() => { OnClickSwith(4); });
+ m_ToggleAll.onValueChanged.AddListener(OnClickToggle);
+ }
+ private void OnEnable()
+ {
+
+ }
+ private void OnDisable()
+ {
+
+ }
+
+ public void Init()
+ {
+ Quality = 10;
+ ContentSelect(Quality);
+ if (m_ScrollViewFirst.activeSelf)
+ {
+ m_ScrollViewFirst.SetActive(false);
+ }
+ if (m_ToggleAll.isOn)
+ {
+ m_ToggleAll.isOn = false;
+ }
+ m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
+ OnCreateGridLineCell(m_ScrollerController);
+
+ }
+
+ public void Unit()
+ {
+ m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
+ }
+
+ private void OnClickArrow()
+ {
+ m_ScrollViewFirst.SetActive(!m_ScrollViewFirst.activeSelf);
+ }
+
+ private void OnClickToggle(bool IsBool)
+ {
+
+ }
+ private void OnClickSwith(int Type)
+ {
+ Quality = Type;
+ if (m_ScrollViewFirst.activeSelf)
+ {
+ m_ScrollViewFirst.SetActive(false);
+ }
+ ContentSelect(Quality);
+ }
+ private void ContentSelect(int Type)
+ {
+ switch (Type)
+ {
+ case 1:
+ m_Label.text = "寮哄寲姘存櫠";
+ break;
+ case 2:
+ m_Label.text = "钃濊壊浠ヤ笅";
+ break;
+ case 3:
+ m_Label.text = "绱壊浠ヤ笅";
+ break;
+ case 4:
+ m_Label.text = "姗欒壊浠ヤ笅";
+ break;
+ case 10:
+ m_Label.text = "鍏ㄩ儴";
+ break;
+ default:
+ break;
+ }
+
+ }
+ void OnCreateGridLineCell(ScrollerController gridCtrl)
+ {
+ gridCtrl.Refresh();
+ int code = 0;
+ for (code = 0; code < LINE; code++)
+ {
+ gridCtrl.AddCell(ScrollerDataType.Header, code);
+ }
+ gridCtrl.Restart();
+ }
+ private void OnRefreshGridCell(ScrollerDataType type, CellView cell)
+ {
+ int gridlineIndex = cell.index;
+ int childCode = 0;
+ for (childCode = 0; childCode < cell.transform.childCount; childCode++)
+ {
+ ChildNodes _ChildNodes = cell.transform.GetChild(childCode).GetComponent<ChildNodes>();
+ _ChildNodes._ItemIcon.SetActive(false);
+ _ChildNodes._Elect.SetActive(false);
+ int cellCount = (cell.transform.childCount) * gridlineIndex + (childCode + 1);
+ if (cellCount - 1 < 1)
+ {
+
+
+ }
+ }
+ }
+ }
+
+}
+
+
+
diff --git a/System/Role/RolePoint.cs.meta b/System/Strengthening/GodBeastSlidingList.cs.meta
similarity index 75%
copy from System/Role/RolePoint.cs.meta
copy to System/Strengthening/GodBeastSlidingList.cs.meta
index 8d0a009..a978907 100644
--- a/System/Role/RolePoint.cs.meta
+++ b/System/Strengthening/GodBeastSlidingList.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 77a6a757b99422846bb5b68b65b5af18
-timeCreated: 1502422861
+guid: e770376f004aa1143bcd9613fa087f12
+timeCreated: 1534485389
licenseType: Free
MonoImporter:
serializedVersion: 2
diff --git a/System/Tip/PromoteDetailsWin.cs b/System/Tip/PromoteDetailsWin.cs
index afc8fd7..b941bfc 100644
--- a/System/Tip/PromoteDetailsWin.cs
+++ b/System/Tip/PromoteDetailsWin.cs
@@ -72,9 +72,6 @@
case RolePromoteModel.PromoteDetailType.BetterEquip:
WindowCenter.Instance.Open<KnapSackWin>();
break;
- case RolePromoteModel.PromoteDetailType.AddPoint:
- WindowCenter.Instance.Open<RolePoint>();
- break;
case RolePromoteModel.PromoteDetailType.EquipStrength:
WindowCenter.Instance.Open<EquipReinforceWin>();
break;
diff --git a/System/Treasure/FunctionUnlockFlyObject.cs b/System/Treasure/FunctionUnlockFlyObject.cs
index fd4ed4b..f8ee0ec 100644
--- a/System/Treasure/FunctionUnlockFlyObject.cs
+++ b/System/Treasure/FunctionUnlockFlyObject.cs
@@ -64,6 +64,10 @@
m_FunctionIcon.SetSprite(skillConfig.IconName);
originalScale = 1f;
break;
+ case FunctionUnlockType.TreasureFunc:
+ UI3DTreasureExhibition.Instance.BeginShowTreasure(m_Id, m_TreasureIcon);
+ originalScale = 9f;
+ break;
}
this.transform.localScale = Vector3.one * originalScale;
@@ -189,6 +193,7 @@
{
case FunctionUnlockType.Treasure:
case FunctionUnlockType.TreasureSkill:
+ case FunctionUnlockType.TreasureFunc:
UI3DTreasureExhibition.Instance.StopShow();
break;
case FunctionUnlockType.Normal:
diff --git a/System/Treasure/TreasureCollectBriefInfoBehaviour.cs b/System/Treasure/TreasureCollectBriefInfoBehaviour.cs
index 3e301f8..c5852da 100644
--- a/System/Treasure/TreasureCollectBriefInfoBehaviour.cs
+++ b/System/Treasure/TreasureCollectBriefInfoBehaviour.cs
@@ -189,45 +189,13 @@
return;
}
- if (FuncOpen.Instance.IsFuncOpen(126))
+ treasureId = GetNextChallengeTreasure();
+ if (treasureId != 0)
{
- treasureId = GetTreasureSoulTreasure();
- if (treasureId != 0)
- {
- this.displayTreasureId = treasureId;
- displayState = DisplayState.TreasureSoul;
- effectState = 0;
- return;
- }
-
- treasureId = GetNextChallengeTreasure();
- if (treasureId != 0)
- {
- this.displayTreasureId = treasureId;
- displayState = DisplayState.WaitUnLock;
- effectState = 0;
- return;
- }
- }
- else
- {
- treasureId = GetNextChallengeTreasure();
- if (treasureId != 0)
- {
- this.displayTreasureId = treasureId;
- displayState = DisplayState.WaitUnLock;
- effectState = 0;
- return;
- }
-
- treasureId = GetTreasureSoulTreasure();
- if (treasureId != 0)
- {
- this.displayTreasureId = treasureId;
- displayState = DisplayState.TreasureSoul;
- effectState = 0;
- return;
- }
+ this.displayTreasureId = treasureId;
+ displayState = DisplayState.WaitUnLock;
+ effectState = 0;
+ return;
}
}
@@ -332,21 +300,6 @@
}
m_Description.text = Language.Get("FabaoState_Text_4", Mathf.RoundToInt(progress * 100f));
- break;
- case DisplayState.TreasureSoul:
- if (treasure != null)
- {
- var privilege = treasure.unLockPrivilege;
- if (privilege != 0)
- {
- var privilegeConfig = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(privilege);
- m_Description.text = Language.Get("FabaoState_Text_8", privilegeConfig.Name);
- }
- else
- {
- m_Description.text = Language.Get("FabaoState_Text_8", config.Name);
- }
- }
break;
case DisplayState.WaitUnLock:
Achievement achievement = null;
@@ -484,24 +437,6 @@
);
}
- private int GetTreasureSoulTreasure()
- {
- return humanTreasures.Find((x) =>
- {
- Treasure treasure;
- if (model.TryGetTreasure(x, out treasure))
- {
- var humanTreasure = treasure as HumanTreasure;
- return humanTreasure != null && humanTreasure.humanState == HumanTreasureState.CastSoul;
- }
- else
- {
- return false;
- }
- }
- );
- }
-
private int GetNextChallengeTreasure()
{
for (int i = 0; i < humanTreasures.Count; i++)
@@ -606,7 +541,6 @@
AwakenAble,//鍙閱�
CollectSoul,//鍙泦榄�
AwakenUnderway,//瑙夐啋杩涜涓�
- TreasureSoul,//娉曞疂榄傝閱掍腑
WaitUnLock,//绛夊緟瑙e皝
PotentialUp,//娼滃姏鎻愬崌杩涜涓�
PotentialUpAble,//娼滃姏鍙彁鍗�
diff --git a/System/Treasure/TreasureData.cs b/System/Treasure/TreasureData.cs
index 5eb5636..78dc432 100644
--- a/System/Treasure/TreasureData.cs
+++ b/System/Treasure/TreasureData.cs
@@ -409,12 +409,6 @@
var id = achievements[i];
Achievement achievement;
- var config = ConfigManager.Instance.GetTemplate<SuccessConfig>(id);
- if (config == null || PlayerDatas.Instance.baseData.LV < config.Condition3)
- {
- continue;
- }
-
if (model.TryGetAchievement(id, out achievement) && !achievement.completed)
{
return id;
diff --git a/System/Treasure/TreasureModel.cs b/System/Treasure/TreasureModel.cs
index a9e49b8..ce18d8a 100644
--- a/System/Treasure/TreasureModel.cs
+++ b/System/Treasure/TreasureModel.cs
@@ -1060,20 +1060,6 @@
foreach (var achievementGroup in treasure.achievementGroups.Values)
{
- if ((TreasureCategory)config.Category == TreasureCategory.Human)
- {
- Achievement doingAchievement;
- if (achievementModel.TryGetAchievement(achievementGroup.GetDoingAchievement(), out doingAchievement))
- {
- var successConfig = ConfigManager.Instance.GetTemplate<SuccessConfig>(doingAchievement.id);
- if (successConfig.Condition3 > 0 && PlayerDatas.Instance.baseData.LV < successConfig.Condition3)
- {
- treasure.achievementRedpoint.state = RedPointState.None;
- continue;
- }
- }
- }
-
if (achievementGroup.IsAwardable())
{
treasure.achievementRedpoint.state = RedPointState.Simple;
diff --git a/System/Treasure/TreasureNewGotWin.cs b/System/Treasure/TreasureNewGotWin.cs
index 216758a..9aa9762 100644
--- a/System/Treasure/TreasureNewGotWin.cs
+++ b/System/Treasure/TreasureNewGotWin.cs
@@ -362,15 +362,16 @@
m_Story.text = string.Format(config.Verse[0], killNpcConfig.MaxAtk);
}
break;
- //case 304://绛惧埌鐩稿叧閰嶇疆绉诲埌鍔熻兘閰嶇疆琛�
- // var _specialData = treasure.specialData;
- // if (_specialData != null)
- // {
- // var _keyValue = _specialData.propertyDict.First();
- // var _propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_keyValue.Key);
- // m_Story.text = string.Format(config.Verse[0], _keyValue.Value, _propertyConfig.Name);
- // }
- // break;
+ case 304://绛惧埌鐩稿叧閰嶇疆绉诲埌鍔熻兘閰嶇疆琛�
+ var soulModel = ModelCenter.Instance.GetModel<TreasureSoulModel>();
+ var _propertyDict = soulModel.signAddProperty;
+ if (_propertyDict != null)
+ {
+ var _keyValue = _propertyDict.First();
+ var _propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_keyValue.Key);
+ m_Story.text = string.Format(config.Verse[0], _keyValue.Value, _propertyConfig.Name);
+ }
+ break;
}
flyObject = unlockFlyObject1;
}
diff --git a/System/Treasure/TreasureSoulModel.cs b/System/Treasure/TreasureSoulModel.cs
index f3fda0d..893a274 100644
--- a/System/Treasure/TreasureSoulModel.cs
+++ b/System/Treasure/TreasureSoulModel.cs
@@ -268,6 +268,9 @@
}
continue;
}
+
+ int beforeFinishCount = special.presentFinishCount;
+
special.presentFinishCount = (int)_data.GotValue;
special.presentGetCount = (int)_data.CurValue;
special.itemGet = _data.ItemAwardState == 1;
@@ -276,6 +279,15 @@
if (treasureSoulEvent != null)
{
treasureSoulEvent((int)_data.PriID);
+ }
+
+ if (beforeFinishCount < special.presentFinishCount && serverInited && special.active
+ && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>()
+ && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
+ && !WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>()
+ && !NewBieCenter.Instance.inGuiding)
+ {
+ ActivateShow.TreasureSoulGetReward((int)_data.PriID, beforeFinishCount, special.presentFinishCount);
}
}
}
@@ -290,13 +302,23 @@
if (treasureSoulDict.ContainsKey((int)TreasurePrivilege.StrengthenAdd))
{
var _specialData = treasureSoulDict[(int)TreasurePrivilege.StrengthenAdd];
+ int beforeFinishCount = _specialData.presentFinishCount;
_specialData.presentFinishCount = (int)_data.Cnt;
UpdateRedpoint((int)TreasurePrivilege.StrengthenAdd);
+ if (beforeFinishCount < _specialData.presentFinishCount && serverInited && _specialData.active
+ && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>()
+ && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
+ && !WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>())
+ {
+ ActivateShow.TreasureSoulGetReward((int)TreasurePrivilege.StrengthenAdd,
+ beforeFinishCount, _specialData.presentFinishCount);
+ }
}
if (treasureSoulEvent != null)
{
treasureSoulEvent((int)TreasurePrivilege.StrengthenAdd);
}
+
}
}
}
diff --git a/System/Treasure/TreasureStageUpTriggerWin.cs b/System/Treasure/TreasureStageUpTriggerWin.cs
index 77c0cae..dc2a2fe 100644
--- a/System/Treasure/TreasureStageUpTriggerWin.cs
+++ b/System/Treasure/TreasureStageUpTriggerWin.cs
@@ -174,7 +174,7 @@
var instance = UIUtility.CreateWidget("TreasureUnlockFlyObject_1", "TreasureUnlockFlyObject_1");
instance.transform.SetParentEx(m_FurnacesFlyContainer, Vector3.zero, Quaternion.identity, Vector3.one);
flyObject = instance.GetComponent<FunctionUnlockFlyObject>();
- flyObject.SetContent(FunctionUnlockType.Treasure, 301);
+ flyObject.SetContent(FunctionUnlockType.TreasureFunc, 301);
flyObject.transform.localScale = Vector3.one * m_FurnacesScale;
flyObject.SetScale(m_FurnacesScale);
diff --git a/System/Welfare/ConsumeRebateModel.cs b/System/Welfare/ConsumeRebateModel.cs
index 6c6638d..87a3e79 100644
--- a/System/Welfare/ConsumeRebateModel.cs
+++ b/System/Welfare/ConsumeRebateModel.cs
@@ -57,7 +57,7 @@
{
get
{
- return consumeRebateRedpoint.state == RedPointState.Simple;
+ return consumeRebateRedpoint.state == RedPointState.GetReward;
}
}
@@ -208,7 +208,7 @@
{
continue;
}
- consumeRebateRedpoint.state = RedPointState.Simple;
+ consumeRebateRedpoint.state = RedPointState.GetReward;
break;
}
}
diff --git a/System/Welfare/LevelGiftModel.cs b/System/Welfare/LevelGiftModel.cs
index 8ecb61c..9edf458 100644
--- a/System/Welfare/LevelGiftModel.cs
+++ b/System/Welfare/LevelGiftModel.cs
@@ -212,13 +212,13 @@
}
if (PlayerDatas.Instance.baseData.LV >= _cfg.LV && !_got)
{
- redpoint.state = RedPointState.Simple;
+ redpoint.state = RedPointState.GetReward;
break;
}
if (PlayerDatas.Instance.baseData.LV >= _cfg.LV &&
PlayerDatas.Instance.baseData.VIPLv >= _cfg.VIPLimit && !_vipGot)
{
- redpoint.state = RedPointState.Simple;
+ redpoint.state = RedPointState.GetReward;
break;
}
}
diff --git a/System/Welfare/PrayerModel.cs b/System/Welfare/PrayerModel.cs
index 0958162..1b78f98 100644
--- a/System/Welfare/PrayerModel.cs
+++ b/System/Welfare/PrayerModel.cs
@@ -324,7 +324,7 @@
{
if (CanFreeCoinPrayer())
{
- redpoint.state = RedPointState.Simple;
+ redpoint.state = RedPointState.GetReward;
}
}
if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.ExpPray))
@@ -332,7 +332,7 @@
var _expRuneCnt = playerPack.GetItemCountByID(PackType.rptItem, prayerExpRune);
if (_expRuneCnt > 0)
{
- redpoint.state = RedPointState.Simple;
+ redpoint.state = RedPointState.GetReward;
}
}
}
diff --git a/System/Welfare/SignInModel.cs b/System/Welfare/SignInModel.cs
index 9bce39b..ca4bed4 100644
--- a/System/Welfare/SignInModel.cs
+++ b/System/Welfare/SignInModel.cs
@@ -108,7 +108,7 @@
redpoint.state = RedPointState.None;
return;
}
- redpoint.state = todaySign ? RedPointState.None : RedPointState.Simple;
+ redpoint.state = todaySign ? RedPointState.None : RedPointState.GetReward;
}
public override void Init()
diff --git a/System/Welfare/WelfareCenter.cs b/System/Welfare/WelfareCenter.cs
index fc49aec..397c2a5 100644
--- a/System/Welfare/WelfareCenter.cs
+++ b/System/Welfare/WelfareCenter.cs
@@ -25,7 +25,7 @@
{
functionOrder = 1;
}
- else if (signInModel.redpoint.state == RedPointState.Simple)
+ else if (signInModel.redpoint.state == RedPointState.GetReward)
{
WindowCenter.Instance.Close<MainInterfaceWin>();
WindowCenter.Instance.Open<WelfareWin>(false, 0);
@@ -38,7 +38,7 @@
{
functionOrder = 2;
}
- else if (prayerModel.redpoint.state == RedPointState.Simple)
+ else if (prayerModel.redpoint.state == RedPointState.GetReward)
{
WindowCenter.Instance.Close<MainInterfaceWin>();
WindowCenter.Instance.Open<WelfareWin>(false, 1);
@@ -56,7 +56,7 @@
return;
}
- if (levelGiftModel.redpoint.state == RedPointState.Simple)
+ if (levelGiftModel.redpoint.state == RedPointState.GetReward)
{
WindowCenter.Instance.Close<MainInterfaceWin>();
WindowCenter.Instance.Open<WelfareWin>(false, 3);
@@ -80,7 +80,7 @@
{
functionOrder = 1;
}
- else if (signInModel.redpoint.state == RedPointState.Simple)
+ else if (signInModel.redpoint.state == RedPointState.GetReward)
{
return 0;
}
@@ -91,7 +91,7 @@
{
functionOrder = 2;
}
- else if (prayerModel.redpoint.state == RedPointState.Simple)
+ else if (prayerModel.redpoint.state == RedPointState.GetReward)
{
return 1;
}
@@ -105,7 +105,7 @@
return 2;
}
- if (levelGiftModel.redpoint.state == RedPointState.Simple)
+ if (levelGiftModel.redpoint.state == RedPointState.GetReward)
{
return 3;
}
diff --git a/System/WindowBase/ModelCenter.cs b/System/WindowBase/ModelCenter.cs
index 783ca6b..de88d9a 100644
--- a/System/WindowBase/ModelCenter.cs
+++ b/System/WindowBase/ModelCenter.cs
@@ -81,7 +81,6 @@
RegisterModel<UnionTaskModel>();
RegisterModel<FriendsModel>();
- RegisterModel<RolePointModel>();
RegisterModel<RoleParticularModel>();
RegisterModel<WorldBossModel>();
RegisterModel<RolePromoteModel>();
@@ -145,6 +144,7 @@
RegisterModel<ActivityModel>();
RegisterModel<PlayerDeadModel>();
RegisterModel<BetterEquipGetModel>();
+ RegisterModel<RealmBetterEquipModel>();
RegisterModel<PreciousItemGetModel>();
RegisterModel<PlayerMainDate>();
RegisterModel<StoryMissionsModel>();
diff --git a/System/WindowJump/WindowJumpMgr.cs b/System/WindowJump/WindowJumpMgr.cs
index a97dedd..1d113b1 100644
--- a/System/WindowJump/WindowJumpMgr.cs
+++ b/System/WindowJump/WindowJumpMgr.cs
@@ -379,7 +379,7 @@
SetJumpLogic<RealmWin>(_tagWinSearchModel.TABID);
break;
case JumpUIType.RolePoint:
- SetJumpLogic<RolePoint>(_tagWinSearchModel.TABID);
+ //SetJumpLogic<RolePoint>(_tagWinSearchModel.TABID);
break;
case JumpUIType.MainTask:
PlayerTaskDatas taskDatas = ModelCenter.Instance.GetModel<PlayerTaskDatas>();
@@ -528,7 +528,7 @@
SetJumpLogic<KnapSackWin>(_tagWinSearchModel.TABID);
break;
case JumpUIType.RebornOpenAddPoint:
- SetJumpLogic<RolePoint>(_tagWinSearchModel.TABID);
+ //SetJumpLogic<RolePoint>(_tagWinSearchModel.TABID);
break;
case JumpUIType.RebornOpenHourse:
SetJumpLogic<PetWin>(_tagWinSearchModel.TABID);
diff --git a/UI/Common/BossLifeBar.cs b/UI/Common/BossLifeBar.cs
index 6d20083..9ec3ca7 100644
--- a/UI/Common/BossLifeBar.cs
+++ b/UI/Common/BossLifeBar.cs
@@ -74,15 +74,19 @@
m_BossName.text = npcConfig.charName;
m_BossLevel.text = _level.ToString();
m_BossIcon.SetSprite(npcConfig.HeadPortrait);
- if (npcConfig.Realm > 0)
+
+ if (m_Realm != null)
{
- m_Realm.gameObject.SetActive(true);
- var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.Realm);
- m_Realm.SetSprite(realmConfig.Img);
- }
- else
- {
- m_Realm.gameObject.SetActive(false);
+ if (ConfigManager.Instance.ContainKey<RealmConfig>(npcConfig.ClientRealm))
+ {
+ m_Realm.gameObject.SetActive(true);
+ var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.ClientRealm);
+ m_Realm.SetSprite(realmConfig.Img);
+ }
+ else
+ {
+ m_Realm.gameObject.SetActive(false);
+ }
}
surplusSegments = -1;
diff --git a/UI/Common/SortTable.cs b/UI/Common/SortTable.cs
index c146a98..dce259c 100644
--- a/UI/Common/SortTable.cs
+++ b/UI/Common/SortTable.cs
@@ -1,67 +1,67 @@
-锘縰sing EnhancedUI.EnhancedScroller;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.UI;
-
-namespace Snxxz.UI
-{
- public class SortTable : MonoBehaviour
- {
- [SerializeField] SortType m_SortType;
- public SortType sortType
- {
- get
- {
- return m_SortType;
- }
- set
- {
- m_SortType = value;
- }
- }
- [SerializeField] List<SortElement> m_SortElements;
- [SerializeField] ScrollerController m_Controller;
- [SerializeField] ClickScreenOtherSpace m_ClickOtherSpace;
- [SerializeField] Text m_TargetDisplay;
- public event Action<int> onSelectSortEvent;
- public event Action onSortCloseEvent;
-
- DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
- private void Awake()
- {
- m_Controller.OnRefreshCell += OnRefreshCell;
- }
-
- private void OnEnable()
- {
- m_Controller.Refresh();
- if (m_SortElements != null)
- {
- for (int i = 0; i < m_SortElements.Count; i++)
- {
- m_Controller.AddCell(ScrollerDataType.Header, i, OnSortSelect);
- }
- }
- m_Controller.Restart();
-
- if (m_ClickOtherSpace != null)
- {
- m_ClickOtherSpace.RemoveAllListeners();
- m_ClickOtherSpace.AddListener(() =>
- {
- if (onSortCloseEvent != null)
- {
- onSortCloseEvent();
- }
- });
- }
- }
- private void OnSortSelect(CellView _cell)
- {
- var _index = _cell.index;
- var type = m_SortElements[_index].type;
+锘縰sing EnhancedUI.EnhancedScroller;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI
+{
+ public class SortTable : MonoBehaviour
+ {
+ [SerializeField] SortType m_SortType;
+ public SortType sortType
+ {
+ get
+ {
+ return m_SortType;
+ }
+ set
+ {
+ m_SortType = value;
+ }
+ }
+ [SerializeField] List<SortElement> m_SortElements;
+ [SerializeField] ScrollerController m_Controller;
+ [SerializeField] ClickScreenOtherSpace m_ClickOtherSpace;
+ [SerializeField] Text m_TargetDisplay;
+ public event Action<int> onSelectSortEvent;
+ public event Action onSortCloseEvent;
+
+ DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
+ private void Awake()
+ {
+ m_Controller.OnRefreshCell += OnRefreshCell;
+ }
+
+ private void OnEnable()
+ {
+ m_Controller.Refresh();
+ if (m_SortElements != null)
+ {
+ for (int i = 0; i < m_SortElements.Count; i++)
+ {
+ m_Controller.AddCell(ScrollerDataType.Header, i, OnSortSelect);
+ }
+ }
+ m_Controller.Restart();
+
+ if (m_ClickOtherSpace != null)
+ {
+ m_ClickOtherSpace.RemoveAllListeners();
+ m_ClickOtherSpace.AddListener(() =>
+ {
+ if (onSortCloseEvent != null)
+ {
+ onSortCloseEvent();
+ }
+ });
+ }
+ }
+ private void OnSortSelect(CellView _cell)
+ {
+ var _index = _cell.index;
+ var type = m_SortElements[_index].type;
switch (sortType)
{
case SortType.EquipQuality:
@@ -70,48 +70,48 @@
case SortType.EquipStar:
dogzModel.SelectDogzItemStart = type;
break;
- }
-
- if (onSelectSortEvent != null)
- {
- onSelectSortEvent(type);
- }
- if (onSortCloseEvent != null)
- {
- onSortCloseEvent();
- }
- if (m_TargetDisplay != null)
- {
- m_TargetDisplay.text = Language.Get(m_SortElements[_index].textKey);
- }
- this.gameObject.SetActive(false);
- }
- private void OnRefreshCell(ScrollerDataType type, CellView cell)
- {
- var _sortCell = cell as SortCell;
- _sortCell.sortTypeTxt.text = Language.Get(m_SortElements[cell.index].textKey);
- }
-
- public void SetDefault()
- {
- if (m_TargetDisplay != null && m_SortElements != null && m_SortElements.Count > 0)
- {
- m_TargetDisplay.text = Language.Get(m_SortElements[0].textKey);
- }
- }
- }
-
- public enum SortType
- {
- EquipQuality,
- EquipStar,
- }
- [Serializable]
- public struct SortElement
- {
- [Header("璇█琛╧ey")]
- public string textKey;
- public int type;
- }
-}
-
+ }
+
+ if (onSelectSortEvent != null)
+ {
+ onSelectSortEvent(type);
+ }
+ if (onSortCloseEvent != null)
+ {
+ onSortCloseEvent();
+ }
+ if (m_TargetDisplay != null)
+ {
+ m_TargetDisplay.text = Language.Get(m_SortElements[_index].textKey);
+ }
+ this.gameObject.SetActive(false);
+ }
+ private void OnRefreshCell(ScrollerDataType type, CellView cell)
+ {
+ var _sortCell = cell as SortCell;
+ _sortCell.sortTypeTxt.text = Language.Get(m_SortElements[cell.index].textKey);
+ }
+
+ public void SetDefault()
+ {
+ if (m_TargetDisplay != null && m_SortElements != null && m_SortElements.Count > 0)
+ {
+ m_TargetDisplay.text = Language.Get(m_SortElements[0].textKey);
+ }
+ }
+ }
+
+ public enum SortType
+ {
+ EquipQuality,
+ EquipStar,
+ }
+ [Serializable]
+ public struct SortElement
+ {
+ [Header("璇█琛╧ey")]
+ public string textKey;
+ public int type;
+ }
+}
+
diff --git a/UI/HUD/HeadUpName.cs b/UI/HUD/HeadUpName.cs
index 0b6dae5..b006e8f 100644
--- a/UI/HUD/HeadUpName.cs
+++ b/UI/HUD/HeadUpName.cs
@@ -80,38 +80,50 @@
{
m_PlayerName.text = _name;
m_HangHint.gameObject.SetActive(_hang);
- SetRealm(_realm);
+ SetPlayerRealm(_realm);
SetTitle(_titleId);
SetAlliance(_alliance);
SyncPosition(true);
}
- public void SetRealm(int _realm)
+ public void SetPlayerRealm(int _realm)
{
- m_Realm.gameObject.SetActive(_realm > 0);
- m_PlayerName.alignment = _realm > 0 ? TextAnchor.MiddleLeft : TextAnchor.MiddleCenter;
-
- if (_realm > 0)
+ if (m_Realm)
{
- var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
- if (realmConfig != null)
+ if (_realm > 0)
{
+ m_Realm.gameObject.SetActive(true);
+ m_PlayerName.alignment = TextAnchor.MiddleLeft;
+ var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
m_Realm.SetSprite(realmConfig.Img);
SetImageMaterialTexture(realmConfig.Img);
}
+ else
+ {
+ m_Realm.gameObject.SetActive(false);
+ m_PlayerName.alignment = TextAnchor.MiddleCenter;
+ }
}
+
}
- public void SetFunctionalNpcRealm(int _realm)
+ public void SetNpcRealm(int _realm)
{
- m_Realm.gameObject.SetActive(true);
- m_PlayerName.alignment = TextAnchor.MiddleLeft;
-
- var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
- if (realmConfig != null)
+ if (m_Realm != null)
{
- m_Realm.SetSprite(realmConfig.Img);
- SetImageMaterialTexture(realmConfig.Img);
+ if (ConfigManager.Instance.ContainKey<RealmConfig>(_realm))
+ {
+ m_Realm.gameObject.SetActive(true);
+ m_PlayerName.alignment = TextAnchor.MiddleLeft;
+ var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
+ m_Realm.SetSprite(realmConfig.Img);
+ SetImageMaterialTexture(realmConfig.Img);
+ }
+ else
+ {
+ m_PlayerName.alignment = TextAnchor.MiddleCenter;
+ m_Realm.gameObject.SetActive(false);
+ }
}
}
@@ -193,7 +205,7 @@
public void SetNPCName(string _name)
{
- SetFunctionalNpcRealm(0);
+ SetNpcRealm(999);
m_PlayerName.text = _name;
SyncPosition(true);
}
@@ -203,7 +215,7 @@
var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_id);
if (config != null)
{
- SetFunctionalNpcRealm(config.Realm);
+ SetNpcRealm(config.ClientRealm);
m_PlayerName.text = config.charName;
}
@@ -217,10 +229,11 @@
findPreciousModel.bossInfoUpdateEvent -= UpdateNpcRebornTime;
findPreciousModel.bossInfoUpdateEvent += UpdateNpcRebornTime;
npcId = _npcId;
+
var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_npcId);
if (config != null)
{
- SetRealm(config.Realm);
+ SetNpcRealm(config.ClientRealm);
m_PlayerName.text = config.charName;
}
@@ -279,7 +292,7 @@
var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_npcId);
if (config != null)
{
- SetRealm(config.Realm);
+ SetNpcRealm(config.ClientRealm);
m_PlayerName.text = StringUtility.Contact(config.charName, Language.Get("HeadUpName_Monster", _level));
monsterLevel = _level;
monsterType = (E_MonsterType)config.IsBoss;
diff --git a/Utility/EnumHelper.cs b/Utility/EnumHelper.cs
index 45c2f74..584dc03 100644
--- a/Utility/EnumHelper.cs
+++ b/Utility/EnumHelper.cs
@@ -1033,6 +1033,7 @@
Normal = 2,
TreasureSkill = 3,
Skill = 4,
+ TreasureFunc = 5,
}
public enum RedPointState
--
Gitblit v1.8.0