From 2e7aa5faabcbe00757c74379f67b3231b1b3370f Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期二, 09 十月 2018 16:01:59 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Store/Logic/BuyGuardTip.cs | 4
System/Store/Logic/BuyWingsTip.cs | 4
System/Store/Logic/BuyEquipTip.cs | 6
System/KnapSack/Logic/PlayerPackModels.cs | 3
System/SystemSetting/SettingEffectMgr.cs | 49 +++++
System/FindPrecious/ElderEliteMonsterBehaviour.cs.meta | 12 +
System/Store/Logic/BuyBoxInfoWin.cs | 4
System/KnapSack/Logic/PackModelInterface.cs | 3
System/MainInterfacePanel/HeadPortraitTip.cs | 8
System/FindPrecious/ElderGodBreifInfoBehaviour.cs | 41 ++++
System/Treasure/TreasureModel.cs | 12 +
System/Achievement/AchievementModel.cs | 6
Core/GameEngine/Model/TelPartialConfig/RandomNameConfig.cs | 4
System/KnapSack/Logic/EquipDevourWin.cs | 4
System/MainInterfacePanel/UpgradeWin.cs | 41 +--
System/Store/BuyItemPopModel.cs | 20 -
System/Store/Logic/BuyPetMatInfoWin.cs | 5
System/Treasure/TreasureLevelUpWin.cs | 19 +
System/Treasure/TreasurePotentialPanel.cs | 31 ++-
System/Store/StoreModel.cs | 17 +
System/FindPrecious/ElderEliteMonsterBehaviour.cs | 33 +++
System/FindPrecious/ElderGodAreaWin.cs | 48 +++-
System/FindPrecious/ElderGodAreaModel.cs | 82 +++++++-
System/Store/Logic/BuyItemInfoWin.cs | 17 -
System/KnapSack/Logic/EquipTip.cs | 16 +
25 files changed, 357 insertions(+), 132 deletions(-)
diff --git a/Core/GameEngine/Model/TelPartialConfig/RandomNameConfig.cs b/Core/GameEngine/Model/TelPartialConfig/RandomNameConfig.cs
index f2249a7..f80e5e9 100644
--- a/Core/GameEngine/Model/TelPartialConfig/RandomNameConfig.cs
+++ b/Core/GameEngine/Model/TelPartialConfig/RandomNameConfig.cs
@@ -42,8 +42,8 @@
public static string GetFirstName(int occupa)
{
- List<RandomNameConfig> list = null;
- m_RandomNameCfgs.TryGetValue(occupa, out list);
+ List<RandomNameConfig> list = Config.Instance.GetAllValues<RandomNameConfig>();
+ //m_RandomNameCfgs.TryGetValue(occupa, out list);
int cnt = list.Count;
string str = list[Random.Range(0, cnt)].RandomName1;
return str;
diff --git a/System/Achievement/AchievementModel.cs b/System/Achievement/AchievementModel.cs
index af759a2..886a080 100644
--- a/System/Achievement/AchievementModel.cs
+++ b/System/Achievement/AchievementModel.cs
@@ -21,7 +21,6 @@
PlayerTaskDatas taskmodel { get { return ModelCenter.Instance.GetModel<PlayerTaskDatas>(); } }
GetItemPathModel getItemPathModel { get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); } }
DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
-
Dictionary<int, int> equipQualityItemIdTables = new Dictionary<int, int>() { { 1, 2110 }, { 2, 2111 }, { 3, 2112 }, { 4, 2113 }, { 5, 2114 } };
public override void Init()
@@ -294,6 +293,7 @@
}
else
{
+ AchievementGoto.guideAchievementId = _achievementId;
playerPack.SetLookIndex(guid39);
GotoCompleteByJump(144);
}
@@ -314,6 +314,7 @@
}
else
{
+ AchievementGoto.guideAchievementId = _achievementId;
WindowCenter.Instance.Close<TreasureLevelUpWin>();
playerPack.SetLookIndex(guid82);
@@ -329,7 +330,7 @@
if (equipQualityItemIdTables.ContainsKey(itemQuality))
{
getItemPathModel.SetChinItemModel(equipQualityItemIdTables[itemQuality]);
- }
+ }
else
{
getItemPathModel.SetChinItemModel(2108);
@@ -337,6 +338,7 @@
}
else
{
+ AchievementGoto.guideAchievementId = _achievementId;
playerPack.SetLookIndex(guid83);
WindowCenter.Instance.Close<TreasureLevelUpWin>();
WindowCenter.Instance.Close<MainInterfaceWin>();
diff --git a/System/FindPrecious/ElderEliteMonsterBehaviour.cs b/System/FindPrecious/ElderEliteMonsterBehaviour.cs
new file mode 100644
index 0000000..93f07f5
--- /dev/null
+++ b/System/FindPrecious/ElderEliteMonsterBehaviour.cs
@@ -0,0 +1,33 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Saturday, August 18, 2018
+//--------------------------------------------------------
+using UnityEngine;
+using System.Collections;
+using UnityEngine.UI;
+using TableConfig;
+
+namespace Snxxz.UI
+{
+
+ public class ElderEliteMonsterBehaviour : MonoBehaviour
+ {
+ [SerializeField] RawImage m_RawImage;
+
+ public void Display(int npcId)
+ {
+ var config = Config.Instance.Get<NPCConfig>(npcId);
+ UI3DModelExhibition.Instance.ShowNPC(npcId, config.UIModeLOffset, config.UIModelRotation, m_RawImage);
+ }
+
+ public void Dispose()
+ {
+ UI3DModelExhibition.Instance.StopShow();
+ }
+
+ }
+
+}
+
+
+
diff --git a/System/FindPrecious/ElderEliteMonsterBehaviour.cs.meta b/System/FindPrecious/ElderEliteMonsterBehaviour.cs.meta
new file mode 100644
index 0000000..bb809bf
--- /dev/null
+++ b/System/FindPrecious/ElderEliteMonsterBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2aefe6a576cf98e49a1b99cc59e23efe
+timeCreated: 1534563304
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/FindPrecious/ElderGodAreaModel.cs b/System/FindPrecious/ElderGodAreaModel.cs
index 37b9be0..a424284 100644
--- a/System/FindPrecious/ElderGodAreaModel.cs
+++ b/System/FindPrecious/ElderGodAreaModel.cs
@@ -13,9 +13,7 @@
int m_SelectedBoss = 0;
public int selectedBoss {
- get {
- return this.m_SelectedBoss;
- }
+ get { return this.m_SelectedBoss; }
set {
if (this.m_SelectedBoss != value)
{
@@ -39,6 +37,7 @@
public event Action<int> bossSelectedEvent;
public event Action<int> surplusTimesChangeEvent;
+ List<int> sortedElites = new List<int>();
List<int> sortedBossIds = new List<int>();
Dictionary<int, ElderGodBossData> elderGodBosses = new Dictionary<int, ElderGodBossData>();
Dictionary<int, int> npcAngers = new Dictionary<int, int>();
@@ -82,27 +81,61 @@
public bool IsBossUnLocked(int _bossId)
{
- var playerLevel = PlayerDatas.Instance.baseData.LV;
- return elderGodBosses.ContainsKey(_bossId) && playerLevel >= elderGodBosses[_bossId].unLockLevel;
+ var config = Config.Instance.Get<ElderGodAreaConfig>(_bossId);
+ if (config == null)
+ {
+ return false;
+ }
+
+ if (config.MonsterType == 1)
+ {
+ return true;
+ }
+ else
+ {
+ var playerLevel = PlayerDatas.Instance.baseData.LV;
+ return elderGodBosses.ContainsKey(_bossId) && playerLevel >= elderGodBosses[_bossId].unLockLevel;
+ }
}
public List<int> GetElderGodBosses()
{
- return new List<int>(sortedBossIds);
+ var bosses = new List<int>();
+ bosses.Add(sortedElites[0]);
+ bosses.AddRange(sortedBossIds);
+ return bosses;
}
- public int GetLatestUnLockBoss()
+ public int GetRecommendNpc()
{
- for (int i = 0; i < sortedBossIds.Count; i++)
+ foreach (var item in sortedBossIds)
{
- var bossId = sortedBossIds[i];
- if (findPreciousModel.IsBossAlive(bossId))
+ if (findPreciousModel.IsBossAlive(item))
{
- return bossId;
+ return item;
+ }
+ }
+
+ return sortedElites[0];
+ }
+
+ public int GetRecommendEliteNpc()
+ {
+ var npc = 0;
+ var levelDelta = int.MaxValue;
+ var myLevel = PlayerDatas.Instance.baseData.LV;
+ foreach (var item in sortedElites)
+ {
+ var config = Config.Instance.Get<NPCConfig>(item);
+ var delta = Mathf.Abs(myLevel - config.NPCLV);
+ if (delta < levelDelta)
+ {
+ npc = item;
+ levelDelta = delta;
}
}
- return sortedBossIds[0];
+ return npc;
}
private void ParseConfig()
@@ -115,12 +148,25 @@
{
elderGodBosses[config.NPCID] = new ElderGodBossData(config.NPCID);
}
+ else
+ {
+ sortedElites.Add(config.NPCID);
+ }
npcAngers[config.NPCID] = config.MonsterAnger;
}
+ sortedElites.Sort(EliteMonsterCompare);
sortedBossIds.AddRange(elderGodBosses.Keys);
sortedBossIds.Sort(ElderGodBossData.LevelCompare);
+ }
+
+ private int EliteMonsterCompare(int lhs, int rhs)
+ {
+ var config1 = Config.Instance.Get<NPCConfig>(lhs);
+ var config2 = Config.Instance.Get<NPCConfig>(rhs);
+
+ return config1.NPCLV < config2.NPCLV ? -1 : 1;
}
public void OnMapInitOk()
@@ -128,7 +174,17 @@
var dataMapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
if (dataMapId == ELDERGODAREA_MAPID)
{
- MapTransferUtility.Instance.MoveToNPC(selectedBoss);
+ var target = 0;
+ if (sortedElites.Contains(selectedBoss))
+ {
+ target = GetRecommendEliteNpc();
+ }
+ else
+ {
+ target = selectedBoss;
+ }
+
+ MapTransferUtility.Instance.MoveToNPC(target);
}
}
}
diff --git a/System/FindPrecious/ElderGodAreaWin.cs b/System/FindPrecious/ElderGodAreaWin.cs
index 75d72a0..7c9203f 100644
--- a/System/FindPrecious/ElderGodAreaWin.cs
+++ b/System/FindPrecious/ElderGodAreaWin.cs
@@ -16,22 +16,16 @@
public class ElderGodAreaWin : Window
{
[SerializeField] CyclicScroll m_Bosses;
+ [SerializeField] ElderEliteMonsterBehaviour m_EliteMonsterBehaviour;
[SerializeField] BossIntroduceBehaviour m_BossIntroduce;
[SerializeField] Text m_Times;
[SerializeField] Button m_Goto;
[SerializeField] Button m_KillRecord;
[SerializeField] ToggleButton m_Subscribe;
- ElderGodAreaModel m_Model;
- ElderGodAreaModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<ElderGodAreaModel>()); } }
-
- FindPreciousModel m_FindPreciousModel;
- FindPreciousModel findPreciousModel { get { return m_FindPreciousModel ?? (m_FindPreciousModel = ModelCenter.Instance.GetModel<FindPreciousModel>()); } }
-
- DungeonModel m_DungeonModel;
- DungeonModel dungeonModel {
- get { return m_DungeonModel ?? (m_DungeonModel = ModelCenter.Instance.GetModel<DungeonModel>()); }
- }
+ ElderGodAreaModel model { get { return ModelCenter.Instance.GetModel<ElderGodAreaModel>(); } }
+ FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
+ DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
#region Built-in
protected override void BindController()
@@ -81,9 +75,9 @@
var bosses = new List<int>();
bosses.AddRange(model.GetElderGodBosses());
- model.selectedBoss = model.GetLatestUnLockBoss();
+ model.selectedBoss = model.GetRecommendNpc();
+ DisplayNpcBaseInfo(true);
m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(model.selectedBoss);
- m_BossIntroduce.Display(model.selectedBoss, true);
m_Bosses.Init(bosses);
m_Bosses.MoveToCenter(bosses.IndexOf(model.selectedBoss));
}
@@ -111,7 +105,9 @@
break;
case 2:
WindowCenter.Instance.Close<FindPreciousFrameWin>();
- MapTransferUtility.Instance.MoveToNPC(model.selectedBoss);
+ var config = Config.Instance.Get<ElderGodAreaConfig>(model.selectedBoss);
+ var targetNpc = config.MonsterType == 1 ? model.GetRecommendEliteNpc() : model.selectedBoss;
+ MapTransferUtility.Instance.MoveToNPC(targetNpc);
break;
case 3:
SysNotifyMgr.Instance.ShowTip("DungeonNoGO");
@@ -167,10 +163,34 @@
private void OnBossSelected(int _bossId)
{
- m_BossIntroduce.Display(_bossId, false);
+ DisplayNpcBaseInfo(false);
m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(_bossId);
}
+ private void DisplayNpcBaseInfo(bool immediately)
+ {
+ var npcId = model.selectedBoss;
+ var config = Config.Instance.Get<ElderGodAreaConfig>(npcId);
+
+ switch (config.MonsterType)
+ {
+ case 1:
+ m_KillRecord.gameObject.SetActive(false);
+ m_BossIntroduce.gameObject.SetActive(false);
+ m_EliteMonsterBehaviour.gameObject.SetActive(true);
+ m_EliteMonsterBehaviour.Display(npcId);
+ break;
+ case 2:
+ m_KillRecord.gameObject.SetActive(true);
+ m_BossIntroduce.gameObject.SetActive(true);
+ m_EliteMonsterBehaviour.gameObject.SetActive(false);
+ m_BossIntroduce.Display(npcId, immediately);
+ break;
+ default:
+ break;
+ }
+ }
+
private void CheckAchievementGuide()
{
if (AchievementGoto.guideAchievementId != 0)
diff --git a/System/FindPrecious/ElderGodBreifInfoBehaviour.cs b/System/FindPrecious/ElderGodBreifInfoBehaviour.cs
index 188f17e..2456010 100644
--- a/System/FindPrecious/ElderGodBreifInfoBehaviour.cs
+++ b/System/FindPrecious/ElderGodBreifInfoBehaviour.cs
@@ -27,7 +27,8 @@
protected override InteractorableState interactorableState {
get {
var selected = selectedBossId == bossId;
- var dieOrLocked = !model.IsBossUnLocked(bossId) || !findPreciousModel.IsBossAlive(bossId);
+ var config = Config.Instance.Get<ElderGodAreaConfig>(bossId);
+ var dieOrLocked = config.MonsterType == 2 && (!model.IsBossUnLocked(bossId) || !findPreciousModel.IsBossAlive(bossId));
if (!dieOrLocked)
{
@@ -74,6 +75,44 @@
UpdateBossNameLevelFont(interactorableState);
}
+ protected override void DrawBossBaseInfo(string _icon, string _name, int _level, int _realm)
+ {
+ var config = Config.Instance.Get<ElderGodAreaConfig>(bossId);
+ m_Portrait.SetSprite(_icon);
+ m_Portrait.SetNativeSize();
+
+ switch (config.MonsterType)
+ {
+ case 1:
+ m_BossName.text = Language.Get("ElderGodMonster");
+ m_BossLevel.text = string.Empty;
+ m_RealmContainer.gameObject.SetActive(false);
+ break;
+ case 2:
+ m_BossName.text = _name;
+ m_BossLevel.text = Language.Get("Z1024", _level);
+ if (m_Realm != null && m_RealmContainer != null)
+ {
+ if (Config.Instance.ContainKey<RealmConfig>(_realm))
+ {
+ m_RealmContainer.gameObject.SetActive(true);
+ var realmConfig = Config.Instance.Get<RealmConfig>(_realm);
+ if (realmConfig != null)
+ {
+ m_Realm.SetSprite(realmConfig.Img);
+ }
+ }
+ else
+ {
+ m_RealmContainer.gameObject.SetActive(false);
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
protected override void OnSubscribe(int _bossId)
{
base.OnSubscribe(_bossId);
diff --git a/System/KnapSack/Logic/EquipDevourWin.cs b/System/KnapSack/Logic/EquipDevourWin.cs
index dbc6b37..0be8c37 100644
--- a/System/KnapSack/Logic/EquipDevourWin.cs
+++ b/System/KnapSack/Logic/EquipDevourWin.cs
@@ -588,10 +588,10 @@
public void SendEquipdevourQuest()
{
- if (!modelInterface.isPackResetOk) return;
+ if (!modelInterface.isPackResetOk || SettingEffectMgr.Instance.isStartDecompose) return;
playerPack.isAutoDecompose = false;
-
+ SettingEffectMgr.Instance.isStartDecompose = true;
CA32C_tagCMEquipDecompose _petEat = new CA32C_tagCMEquipDecompose();
byte[] _petIndex = new byte[realDevourlist.Count];
for (int i = 0; i < realDevourlist.Count; i++)
diff --git a/System/KnapSack/Logic/EquipTip.cs b/System/KnapSack/Logic/EquipTip.cs
index a9868d4..08c6baf 100644
--- a/System/KnapSack/Logic/EquipTip.cs
+++ b/System/KnapSack/Logic/EquipTip.cs
@@ -944,6 +944,22 @@
foreach (ItemWinBtnType key in itemAttrData.tipsFuncBtnDic.Keys)
{
Button btn = OnGUIButton(btnGroup.gameObject, operateBtn, key.ToString(), Language.Get(StringUtility.Contact("ItemHandle_", key.ToString())));
+ switch (key)
+ {
+ case ItemWinBtnType.putOn:
+ SuccessConfig successConfig = Config.Instance.Get<SuccessConfig>(AchievementGoto.guideAchievementId);
+ if(successConfig != null
+ && (successConfig.Type == 39
+ || successConfig.Type == 82
+ || successConfig.Type == 83))
+ {
+ AchievementGuideEffect guidEffect = AchievementGuideEffectPool.Require(1);
+ guidEffect.transform.SetParentEx(btn.transform, Vector3.zero, Quaternion.identity, Vector3.one);
+ guidEffect.effect.renderQueue = 4500;
+ }
+ break;
+ }
+
btn.RemoveAllListeners();
btn.onClick.AddListener(() => {
OnClickCloseBtn();
diff --git a/System/KnapSack/Logic/PackModelInterface.cs b/System/KnapSack/Logic/PackModelInterface.cs
index e1b454a..aa04277 100644
--- a/System/KnapSack/Logic/PackModelInterface.cs
+++ b/System/KnapSack/Logic/PackModelInterface.cs
@@ -1213,8 +1213,9 @@
/// <param name="_oneKeySelllist"></param>
public void SendOneKeySellQuest(List<ItemModel> _oneKeySelllist)
{
- if (!isPackResetOk) return;
+ if (!isPackResetOk || SettingEffectMgr.Instance.isStartOneKeySell) return;
+ SettingEffectMgr.Instance.isStartOneKeySell = true;
byte[] itemIndexs = new byte[_oneKeySelllist.Count];
int i = 0;
for (i = 0; i < _oneKeySelllist.Count; i++)
diff --git a/System/KnapSack/Logic/PlayerPackModels.cs b/System/KnapSack/Logic/PlayerPackModels.cs
index 8a42104..9abb6e0 100644
--- a/System/KnapSack/Logic/PlayerPackModels.cs
+++ b/System/KnapSack/Logic/PlayerPackModels.cs
@@ -1398,8 +1398,9 @@
public void SendEquipdevourQuest()
{
List<ItemModel> itemModels = GetCanDevourModellist();
- if (itemModels == null || itemModels.Count < minDecomposeNum || !modelInterface.isPackResetOk) return;
+ if (itemModels == null || itemModels.Count < minDecomposeNum || !modelInterface.isPackResetOk || SettingEffectMgr.Instance.isStartDecompose) return;
+ SettingEffectMgr.Instance.isStartDecompose = true;
isAutoDecompose = true;
recordAutoDecomNum = itemModels.Count;
CA32C_tagCMEquipDecompose _petEat = new CA32C_tagCMEquipDecompose();
diff --git a/System/MainInterfacePanel/HeadPortraitTip.cs b/System/MainInterfacePanel/HeadPortraitTip.cs
index 2928d84..b1356b7 100644
--- a/System/MainInterfacePanel/HeadPortraitTip.cs
+++ b/System/MainInterfacePanel/HeadPortraitTip.cs
@@ -63,6 +63,7 @@
CapacityDelayModel capacityDelayModel { get { return m_CapacityDelayModel ?? (m_CapacityDelayModel = ModelCenter.Instance.GetModel<CapacityDelayModel>()); } }
FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
private int vipExperienceSurplusTime = 0;
+ private int GetLv = 0;//鑾峰彇浜虹墿绛夌骇
public void Init()
{
loadingtime = 0f;
@@ -329,7 +330,7 @@
void Initialize()//鍏充簬鏁版嵁鐨勫垵濮嬪寲
{
-
+ GetLv = PlayerDatas.Instance.baseData.LV;
_LVText.text = PlayerDatas.Instance.baseData.LV.ToString();//绛夌骇鐨勫垵濮嬪寲
_Hp_number.text = PlayerDatas.Instance.baseData.HP.ToString() + "/" + PlayerDatas.Instance.extersion.MaxHP.ToString();//浜虹墿琛�閲忕殑鍒濆鍖�
_hp = (int)PlayerDatas.Instance.baseData.HP;
@@ -368,6 +369,11 @@
break;
case PlayerDataRefresh.LV://绛夌骇鐨勫埛鏂�8
_LVText.text = PlayerDatas.Instance.baseData.LV.ToString();
+ if (PlayerDatas.Instance.baseData.LV > GetLv)
+ {
+ GetLv = PlayerDatas.Instance.baseData.LV;
+ WindowCenter.Instance.Open<UpgradeWin>();
+ }
break;
case PlayerDataRefresh.MaxHP://鏈�澶ц閲忕殑鍒锋柊28
_maxHp = (int)PlayerDatas.Instance.extersion.MaxHP;
diff --git a/System/MainInterfacePanel/UpgradeWin.cs b/System/MainInterfacePanel/UpgradeWin.cs
index ad91ce6..3bca967 100644
--- a/System/MainInterfacePanel/UpgradeWin.cs
+++ b/System/MainInterfacePanel/UpgradeWin.cs
@@ -9,15 +9,14 @@
using UnityEngine;
using UnityEngine.UI;
-namespace Snxxz.UI {
+namespace Snxxz.UI
+{
public class UpgradeWin : Window
- {
- [SerializeField] UIAlphaTween m_UIAlphaTween;
- [SerializeField] ScaleTween m_ScaleTween;
- [SerializeField] UIAlphaTween m_UIAlphaTween1;
- [SerializeField] GameObject m_Guang;
+ {
+ [SerializeField] ScaleTween m_ScaleTween;
[SerializeField] Text m_TextLV;
+ [SerializeField] UIEffect m_UIEffect;
#region Built-in
protected override void BindController()
{
@@ -28,31 +27,34 @@
}
protected override void OnPreOpen()
- {
- // m_Guang.SetActive(false);
- m_TextLV.text = PlayerDatas.Instance.baseData.LV.ToString();
- m_UIAlphaTween1.SetEndState();
-
-
+ {
+ m_TextLV.text = PlayerDatas.Instance.baseData.LV.ToString();
}
protected override void OnActived()
{
- m_UIAlphaTween.Play(ShowOverAlpha);
+ m_UIEffect.Play();
+ m_UIEffect.OnComplete = () => { CloseImmediately(); };
m_ScaleTween.Play();
}
protected override void OnAfterOpen()
{
-
WindowCenter.Instance.windowBeforeCloseEvent += windowBeforeClose;
PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;//鏁版嵁鐨勫埛鏂�(h0418)
}
protected override void OnPreClose()
{
+ if (m_UIEffect.IsPlaying)
+ {
+ m_UIEffect.Stop();
+ }
WindowCenter.Instance.windowBeforeCloseEvent -= windowBeforeClose;
PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;//鏁版嵁鐨勫埛鏂�(h0418)
}
-
+ protected override void OnAfterClose()
+ {
+ }
+ #endregion
private void windowBeforeClose(Window _window)
{
if (_window is MainInterfaceWin)
@@ -69,15 +71,6 @@
}
}
- protected override void OnAfterClose()
- {
- }
- #endregion
- private void ShowOverAlpha()
- {
- m_UIAlphaTween.Play(true);
- m_UIAlphaTween1.Play(true);
- }
}
}
diff --git a/System/Store/BuyItemPopModel.cs b/System/Store/BuyItemPopModel.cs
index bbf3951..b467bb9 100644
--- a/System/Store/BuyItemPopModel.cs
+++ b/System/Store/BuyItemPopModel.cs
@@ -106,23 +106,9 @@
int count = 0;
IsReachUpper = false;
if(canBuyCnt == 0)
- {
- if(isVipBuy)
- {
- IsReachUpper = true;
- }
- else
- {
- if (buyCnt <= 9999)
- {
- count = buyCnt;
- }
- else
- {
- count = 9999;
- IsReachUpper = true;
- }
- }
+ {
+ IsReachUpper = true;
+ count = 0;
}
else
{
diff --git a/System/Store/Logic/BuyBoxInfoWin.cs b/System/Store/Logic/BuyBoxInfoWin.cs
index aab6669..3ba8b58 100644
--- a/System/Store/Logic/BuyBoxInfoWin.cs
+++ b/System/Store/Logic/BuyBoxInfoWin.cs
@@ -336,7 +336,7 @@
int addBuyCnt = 0;
bool isLimitCnt = buyItem.CheckIsLimitBuyCnt(buyItem.storeConfig,out canBuyCnt,out addBuyCnt);
bool isReachUpper = false;
- buyCnt = 0;
+ buyCnt = buyItem.GetCurBuyCnt(1, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
if (itemTipsModel.curAttrData.itemConfig.PackCount > 1)
{
numberGo.gameObject.SetActive(true);
@@ -361,7 +361,6 @@
if(curVipIndex != -1)
{
buyBtn.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt,isVipBuy,out isReachUpper);
}
else
{
@@ -373,7 +372,6 @@
{
vipInfoText.gameObject.SetActive(false);
buyBtn.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
buyCountText.text = buyCnt.ToString();
diff --git a/System/Store/Logic/BuyEquipTip.cs b/System/Store/Logic/BuyEquipTip.cs
index 2539170..38be9af 100644
--- a/System/Store/Logic/BuyEquipTip.cs
+++ b/System/Store/Logic/BuyEquipTip.cs
@@ -690,8 +690,8 @@
int addBuyCnt = 0;
bool isLimitCnt = buyItem.CheckIsLimitBuyCnt(buyItem.storeConfig, out canBuyCnt, out addBuyCnt);
bool isReachUpper = false;
- buyCnt = 0;
- if(itemAttrData.itemConfig.PackCount > 1)
+ buyCnt = buyItem.GetCurBuyCnt(1, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
+ if (itemAttrData.itemConfig.PackCount > 1)
{
_numberGo.gameObject.SetActive(true);
}
@@ -715,7 +715,6 @@
if (curVipIndex != -1)
{
btnGroup.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
else
{
@@ -727,7 +726,6 @@
{
vipInfoText.gameObject.SetActive(false);
btnGroup.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
buyCountText.text = buyCnt.ToString();
diff --git a/System/Store/Logic/BuyGuardTip.cs b/System/Store/Logic/BuyGuardTip.cs
index 491c738..437884b 100644
--- a/System/Store/Logic/BuyGuardTip.cs
+++ b/System/Store/Logic/BuyGuardTip.cs
@@ -398,7 +398,7 @@
int addBuyCnt = 0;
bool isLimitCnt = buyItem.CheckIsLimitBuyCnt(buyItem.storeConfig, out canBuyCnt, out addBuyCnt);
bool isReachUpper = false;
- buyCnt = 0;
+ buyCnt = buyItem.GetCurBuyCnt(1, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
if (itemAttrData.itemConfig.PackCount > 1)
{
_numberGo.gameObject.SetActive(true);
@@ -423,7 +423,6 @@
if (curVipIndex != -1)
{
buyBtn.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
else
{
@@ -435,7 +434,6 @@
{
vipInfoObj.SetActive(false);
buyBtn.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
buyCountText.text = buyCnt.ToString();
diff --git a/System/Store/Logic/BuyItemInfoWin.cs b/System/Store/Logic/BuyItemInfoWin.cs
index ac61829..cca5a60 100644
--- a/System/Store/Logic/BuyItemInfoWin.cs
+++ b/System/Store/Logic/BuyItemInfoWin.cs
@@ -326,7 +326,7 @@
int addBuyCnt = 0;
bool isLimitCnt = buyItem.CheckIsLimitBuyCnt(buyItem.storeConfig,out canBuyCnt,out addBuyCnt);
bool isReachUpper = false;
- buyCnt = 0;
+ buyCnt = buyItem.GetCurBuyCnt(1, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
if (itemTipsModel.curAttrData.itemConfig.PackCount > 1)
{
numberGo.gameObject.SetActive(true);
@@ -352,7 +352,7 @@
if(curVipIndex != -1)
{
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt,isVipBuy,out isReachUpper);
+
}
else
{
@@ -363,7 +363,6 @@
else
{
vipInfoText.gameObject.SetActive(false);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
if(buyItem.storeConfig.LimitValue != 0)
@@ -475,7 +474,7 @@
private void OnClickNum()
{
bool isReachUpper = false;
- buyCnt = buyItem.GetCurBuyCnt(int.Parse(numKeyboard.Value),GetRemainBuyCnt(), isVipBuy,out isReachUpper);
+ buyCnt = buyItem.GetCurBuyCnt(int.Parse(numKeyboard.Value), GetRemainBuyCnt(), isVipBuy, out isReachUpper);
RefreshBuyPrice(buyCnt);
numKeyboard.Value = buyCnt.ToString();
if (isReachUpper)
@@ -495,12 +494,12 @@
private void OnClickPlusBuyNum()
{
- buyCnt += 1;
bool isReachUpper = false;
- buyCnt = buyItem.GetCurBuyCnt(buyCnt,GetRemainBuyCnt(), isVipBuy, out isReachUpper);
+ buyCnt += 1;
+ buyCnt = buyItem.GetCurBuyCnt(buyCnt, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
buyCountText.text = buyCnt.ToString();
RefreshBuyPrice(buyCnt);
- if (isReachUpper)
+ if (isReachUpper || buyCnt == 0)
{
MessageWin.Inst.ShowFixedTip(Language.Get("StoreWin109"));
}
@@ -508,9 +507,9 @@
private void OnClickReduceBuyNum()
{
- buyCnt -= 1;
bool isReachUpper = false;
- buyCnt = buyItem.GetCurBuyCnt(buyCnt, GetRemainBuyCnt(), isVipBuy,out isReachUpper);
+ buyCnt -= 1;
+ buyCnt = buyItem.GetCurBuyCnt(buyCnt, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
buyCountText.text = buyCnt.ToString();
RefreshBuyPrice(buyCnt);
}
diff --git a/System/Store/Logic/BuyPetMatInfoWin.cs b/System/Store/Logic/BuyPetMatInfoWin.cs
index fb55e4e..0204427 100644
--- a/System/Store/Logic/BuyPetMatInfoWin.cs
+++ b/System/Store/Logic/BuyPetMatInfoWin.cs
@@ -307,7 +307,7 @@
int addBuyCnt = 0;
bool isLimitCnt = buyItem.CheckIsLimitBuyCnt(buyItem.storeConfig,out canBuyCnt,out addBuyCnt);
bool isReachUpper = false;
- buyCnt = 0;
+ buyCnt = buyItem.GetCurBuyCnt(1, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
if (itemTipsModel.curAttrData.itemConfig.PackCount > 1)
{
numberGo.gameObject.SetActive(true);
@@ -333,7 +333,7 @@
if(curVipIndex != -1)
{
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt,isVipBuy,out isReachUpper);
+
}
else
{
@@ -344,7 +344,6 @@
else
{
vipInfoText.gameObject.SetActive(false);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
if(buyItem.storeConfig.LimitValue != 0)
diff --git a/System/Store/Logic/BuyWingsTip.cs b/System/Store/Logic/BuyWingsTip.cs
index 98942d2..d8bbc29 100644
--- a/System/Store/Logic/BuyWingsTip.cs
+++ b/System/Store/Logic/BuyWingsTip.cs
@@ -361,7 +361,7 @@
int addBuyCnt = 0;
bool isLimitCnt = buyItem.CheckIsLimitBuyCnt(buyItem.storeConfig, out canBuyCnt, out addBuyCnt);
bool isReachUpper = false;
- buyCnt = 0;
+ buyCnt = buyItem.GetCurBuyCnt(1, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
if (itemAttrData.itemConfig.PackCount > 1)
{
numberGo.gameObject.SetActive(true);
@@ -386,7 +386,6 @@
if (curVipIndex != -1)
{
buyBtn.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
else
{
@@ -398,7 +397,6 @@
{
vipInfoText.gameObject.SetActive(false);
buyBtn.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
buyCountText.text = buyCnt.ToString();
diff --git a/System/Store/StoreModel.cs b/System/Store/StoreModel.cs
index a6d1dbc..3bcfbc7 100644
--- a/System/Store/StoreModel.cs
+++ b/System/Store/StoreModel.cs
@@ -1083,12 +1083,21 @@
{
foreach(var key in shopRedDict.Keys)
{
- if(shopRedDict[key].state != RedPointState.None)
+ StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(key);
+ ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(storeConfig.ItemID);
+ switch (itemConfig.Type)
{
- string record = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "ShopId",key);
- shopRedDict[key].state = RedPointState.None;
- LocalSave.SetBool(record, false);
+ case 26:
+ case 41:
+ if (shopRedDict[key].state != RedPointState.None)
+ {
+ string record = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "ShopId", key);
+ shopRedDict[key].state = RedPointState.None;
+ LocalSave.SetBool(record, false);
+ }
+ break;
}
+
}
}
diff --git a/System/SystemSetting/SettingEffectMgr.cs b/System/SystemSetting/SettingEffectMgr.cs
index acc5687..f420d9e 100644
--- a/System/SystemSetting/SettingEffectMgr.cs
+++ b/System/SystemSetting/SettingEffectMgr.cs
@@ -52,6 +52,8 @@
private float delayTime = 2f;
private bool isGetNewItem = false;
+ public bool isStartDecompose { get; set; }
+ public bool isStartOneKeySell { get; set; }
private void Awake()
{
@@ -68,15 +70,21 @@
DeadModel.playerDieEvent += OnPlayerDie;
m_storeModel.RefreshBuyResultEvent += RefreshBuySuccess;
DeadModel.CloseRebornWinEvent += PlayerRebornSuccess;
+ playerPack.RefreshDecomAttrAct += DecomposeSuccess;
+ DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent += OneKeySellSuccess;
}
+
public void Begin()
{
-
+ isStartDecompose = false;
+ isStartOneKeySell = false;
}
float secondTimer = 0;
float halfSecondTimer = 0;
+ float autoSellCoolTimer = 0;
+ float autoDecomposeCoolTimer = 0;
private void LateUpdate()
{
if (!(StageManager.Instance.CurrentStage is DungeonStage))
@@ -100,11 +108,32 @@
}
}
+ if(isStartDecompose)
+ {
+ autoDecomposeCoolTimer += Time.deltaTime;
+ if(autoDecomposeCoolTimer >= 5f)
+ {
+ autoDecomposeCoolTimer = 0;
+ isStartDecompose = false;
+ }
+ }
+
+ if (isStartOneKeySell)
+ {
+ autoSellCoolTimer += Time.deltaTime;
+ if (autoSellCoolTimer >= 5f)
+ {
+ autoSellCoolTimer = 0;
+ isStartOneKeySell = false;
+ }
+ }
+
if (secondTimer >= 1f)
{
secondTimer = 0f;
RefreshBagItem();
}
+
}
private void PlayerRebornSuccess()
@@ -112,6 +141,18 @@
isPlayerDie = false;
}
+ private void OneKeySellSuccess(H0721_tagMakeItemAnswer obj)
+ {
+ if (obj.MakeType != (byte)MakeType.Def_mitKeySell)
+ return;
+
+ isStartOneKeySell = false;
+ }
+
+ private void DecomposeSuccess()
+ {
+ isStartDecompose = false;
+ }
public bool GetSettingEffect()
{
@@ -158,7 +199,7 @@
{
if (playerPack.GetReaminGridCount(PackType.rptItem) < 5 && modelInterface.isPackResetOk)
{
- if (HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.isAutoDevour))
+ if (HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.isAutoDevour) && !isStartDecompose)
{
if(playerPack.IsReachMinDecomposeNum())
{
@@ -167,7 +208,9 @@
}
}
- if (HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.isAutoSell) && modelInterface.GetSellItemList().Count > 0)
+ if (HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.isAutoSell)
+ && !isStartOneKeySell
+ && modelInterface.GetSellItemList().Count > 0)
{
modelInterface.SendOneKeySellQuest(modelInterface.GetSellItemList());
return;
diff --git a/System/Treasure/TreasureLevelUpWin.cs b/System/Treasure/TreasureLevelUpWin.cs
index 5b70a10..b53d92d 100644
--- a/System/Treasure/TreasureLevelUpWin.cs
+++ b/System/Treasure/TreasureLevelUpWin.cs
@@ -169,6 +169,7 @@
m_Slider.slider.onValueChanged.AddListener(OnSliderValueUpdate);
NewBieCenter.Instance.guideCompletedEvent += GuideCompletedEvent;
FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
+ model.skillLevelUpRedpointUpdate += SkillLevelUpRedpointUpdate;
m_DragSelect.onDragComplete += onDragComplete;
CameraManager.uiCamera.enabled = true;
@@ -215,6 +216,7 @@
model.treasureStateChangeEvent -= TreasureStateChangeEvent;
FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
m_DragSelect.onDragComplete -= onDragComplete;
+ model.skillLevelUpRedpointUpdate -= SkillLevelUpRedpointUpdate;
m_Slider.slider.onValueChanged.RemoveAllListeners();
m_TreasurePotential.Dispose();
m_AchievementScroll.Dispose();
@@ -1203,14 +1205,15 @@
UpdateLevelUpSfx(false);
}
}
- if (_id == TreasureModel.CATEGORY_REDPOINTIDS[(int)TreasureCategory.Human - 1])
- {
- var skillLevelUpRedpointTreasure = model.GetSkillLevelUpRedpointTreasure();
- m_LeftRedpoint.gameObject.SetActive(skillLevelUpRedpointTreasure != 0
- && model.selectedTreasure > skillLevelUpRedpointTreasure && model.currentCategory == TreasureCategory.Human);
- m_RightRedpoint.gameObject.SetActive(skillLevelUpRedpointTreasure != 0
- && model.selectedTreasure < skillLevelUpRedpointTreasure && model.currentCategory == TreasureCategory.Human);
- }
+ }
+
+ private void SkillLevelUpRedpointUpdate()
+ {
+ var skillLevelUpRedpointTreasure = model.GetSkillLevelUpRedpointTreasure();
+ m_LeftRedpoint.gameObject.SetActive(skillLevelUpRedpointTreasure != 0
+ && model.selectedTreasure > skillLevelUpRedpointTreasure && model.currentCategory == TreasureCategory.Human);
+ m_RightRedpoint.gameObject.SetActive(skillLevelUpRedpointTreasure != 0
+ && model.selectedTreasure < skillLevelUpRedpointTreasure && model.currentCategory == TreasureCategory.Human);
}
protected override void LateUpdate()
diff --git a/System/Treasure/TreasureModel.cs b/System/Treasure/TreasureModel.cs
index ba7d694..d6b04ac 100644
--- a/System/Treasure/TreasureModel.cs
+++ b/System/Treasure/TreasureModel.cs
@@ -45,6 +45,7 @@
public event Action<int> treasureLevelProgressUpdateEvent;
public event Action<int> treasureStageUpEvent;
public event Action<int> humanTreasureStateChangeEvent;
+ public event Action skillLevelUpRedpointUpdate;
bool m_WaitOpenDetailsWin = false;
public bool waitOpenDetailsWin {
@@ -842,6 +843,10 @@
{
treasure.skillLevelUpRedpoint.state = RedPointState.Simple;
treasure.autoSelectPotential = k;
+ if (skillLevelUpRedpointUpdate != null)
+ {
+ skillLevelUpRedpointUpdate();
+ }
return;
}
}
@@ -869,7 +874,7 @@
var itemConfig = Config.Instance.Get<ItemConfig>(item.id);
var itemColor = itemConfig.ItemColor;
if (minCostItemColor == 0 || itemColor < minCostItemColor ||
- (itemColor == minCostItemColor && minCostItemCount < item.count))
+ (itemColor == minCostItemColor && item.count < minCostItemCount))
{
minCostItemColor = itemColor;
minCostItemCount = item.count;
@@ -896,6 +901,10 @@
treasures[minCostTreasure].skillLevelUpRedpoint.state = RedPointState.Simple;
treasures[minCostTreasure].autoSelectPotential = minCostPotentialIndex;
}
+ }
+ if (skillLevelUpRedpointUpdate != null)
+ {
+ skillLevelUpRedpointUpdate();
}
}
@@ -1303,6 +1312,7 @@
}
}
}
+ UpdateSkillLevelUpRedpoints();
}
public void HumanTreasureStateChange(int _id)
diff --git a/System/Treasure/TreasurePotentialPanel.cs b/System/Treasure/TreasurePotentialPanel.cs
index 5948e7a..25fd539 100644
--- a/System/Treasure/TreasurePotentialPanel.cs
+++ b/System/Treasure/TreasurePotentialPanel.cs
@@ -438,12 +438,16 @@
if (_id == 82)
{
m_ContainerLock.gameObject.SetActive(!FuncOpen.Instance.IsFuncOpen(82));
- if (FuncOpen.Instance.IsFuncOpen(82))
+ if (FuncOpen.Instance.IsFuncOpen(82) && model.serverInited)
{
potentialBriefInfos[0].potentialTween.SetStartState();
potentialBriefInfos[0].potentialTween.enabled = false;
m_TreasureAnimation.UnlockTreasurePotential(0);
model.SetPotentialUnlockShow(model.selectedTreasure);
+ }
+ if (!m_SelectTotalEffect)
+ {
+ DisplayPotentialEffect();
}
}
}
@@ -863,7 +867,7 @@
private void PotentialLevelUpdate(int _potentialId, int arg2)
{
- if (_potentialId == model.selectedPotential)
+ if (_potentialId == model.selectedPotential && !m_SelectTotalEffect)
{
DisplayPotentialEffect();
}
@@ -890,19 +894,20 @@
}
}
- var levelUpConfig = GetPotentialLevelUpConfig();
- if (!ContainsPotentialBook(model.selectedPotentialBook))
+ if(_potentialId == model.selectedPotential && !m_SelectTotalEffect)
{
- AutoSelectPotentialBook();
- //model.selectedPotentialBook = 0;
+ var levelUpConfig = GetPotentialLevelUpConfig();
+ if (!ContainsPotentialBook(model.selectedPotentialBook))
+ {
+ AutoSelectPotentialBook();
+ }
+
+ var curconfig = Config.Instance.Get<SkillConfig>(potential.id);
+
+ var level = potential.level;
+ var isMax = level >= curconfig.SkillMaxLV;
+ m_ContainerUpgrade.gameObject.SetActive(!isMax && FuncOpen.Instance.IsFuncOpen(82));
}
-
- var curconfig = Config.Instance.Get<SkillConfig>(potential.id);
-
- var level = potential.level;
- var isMax = level >= curconfig.SkillMaxLV;
- m_ContainerUpgrade.gameObject.SetActive(!isMax && FuncOpen.Instance.IsFuncOpen(82));
-
}
private void OnPotentialLevelUp(int _treasureId, int _potential, bool _ok)
--
Gitblit v1.8.0