From 416fbb174c1a8a6ed97e8fdee6c374a64f6fe027 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期六, 29 九月 2018 21:18:56 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/FairylandCeremony/CeremonyFirepartyWin.cs | 13 -
System/KnapSack/Logic/BoxGetItemWin.cs | 53 ++++--
System/KnapSack/New/BatchBuyWin.cs.meta | 12 +
System/WindowJump/WindowJumpMgr.cs | 21 ++
System/KnapSack/New/BatchUseModel.cs | 45 ++++-
Fight/MapTransferUtility.cs | 2
System/FairylandCeremony/CeremonyCoolTime.cs | 35 ++++
System/KnapSack/New/BatchBuyWin.cs | 178 ++++++++++++++++++++++
System/MainInterfacePanel/HighSettingFadeInFadeOut.cs | 60 +++---
System/FairylandCeremony/CeremonyCoolTime.cs.meta | 12 +
System/FairylandCeremony/ToHiTaskCell.cs | 1
11 files changed, 365 insertions(+), 67 deletions(-)
diff --git a/Fight/MapTransferUtility.cs b/Fight/MapTransferUtility.cs
index ef22022..c5f2b0b 100644
--- a/Fight/MapTransferUtility.cs
+++ b/Fight/MapTransferUtility.cs
@@ -359,6 +359,8 @@
var mapId = _npcLocation.mapId;
var position = new Vector3(_mapConfig.BornPoints[0].x, 0, _mapConfig.BornPoints[0].y);
Send_WorldTransfer(mapId, position, MapTransferType.WorldTransport, (byte)_lineID, npcID);
+
+ forceMove = true;
if (BossFakeLineUtility.Instance.IsShuntBoss(npcID))
{
diff --git a/System/FairylandCeremony/CeremonyCoolTime.cs b/System/FairylandCeremony/CeremonyCoolTime.cs
new file mode 100644
index 0000000..6ce7bd0
--- /dev/null
+++ b/System/FairylandCeremony/CeremonyCoolTime.cs
@@ -0,0 +1,35 @@
+锘縰sing UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI
+{
+
+ public class CeremonyCoolTime : MonoBehaviour
+ {
+ [SerializeField] Text m_Time;
+
+ private void OnEnable()
+ {
+ GlobalTimeEvent.Instance.secondEvent += RefreshSecond;
+ RefreshSecond();
+ }
+
+ private void OnDisable()
+ {
+ GlobalTimeEvent.Instance.secondEvent -= RefreshSecond;
+ }
+
+ private void RefreshSecond()
+ {
+ int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.FairyCeremony);
+ if (seconds > 0)
+ {
+ m_Time.text = StringUtility.Contact("<color=#8DDC11FF>", TimeUtility.SecondsToHMS(seconds), "</color>");
+ }
+ else
+ {
+ m_Time.text = UIHelper.GetTextColorByItemColor(TextColType.Red, Language.Get("XMZZ110"));
+ }
+ }
+ }
+}
diff --git a/System/FairylandCeremony/CeremonyCoolTime.cs.meta b/System/FairylandCeremony/CeremonyCoolTime.cs.meta
new file mode 100644
index 0000000..13db25f
--- /dev/null
+++ b/System/FairylandCeremony/CeremonyCoolTime.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b611da4d8aa2ca943b69485ca6f3d2a6
+timeCreated: 1538223260
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/FairylandCeremony/CeremonyFirepartyWin.cs b/System/FairylandCeremony/CeremonyFirepartyWin.cs
index 11a57dd..4963482 100644
--- a/System/FairylandCeremony/CeremonyFirepartyWin.cs
+++ b/System/FairylandCeremony/CeremonyFirepartyWin.cs
@@ -18,6 +18,8 @@
ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } }
PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
+ StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
+
StoreConfig storeConfig;
protected override void BindController()
{
@@ -110,15 +112,8 @@
SysNotifyMgr.Instance.ShowTip("BagFull");
return;
}
-
- if(ceremonyModel.CheckIsBuyFireCondi(storeConfig))
- {
- ModelCenter.Instance.GetModel<StoreModel>().SendBuyShopItem(storeConfig,1);
- }
- else
- {
- WindowCenter.Instance.Open<RechargeTipWin>();
- }
+ storeModel.OnClickShopCell(storeConfig);
}
+
}
}
diff --git a/System/FairylandCeremony/ToHiTaskCell.cs b/System/FairylandCeremony/ToHiTaskCell.cs
index 091b04c..1fb1bf4 100644
--- a/System/FairylandCeremony/ToHiTaskCell.cs
+++ b/System/FairylandCeremony/ToHiTaskCell.cs
@@ -29,6 +29,7 @@
public void Init(AllPeoplePartyConfig taskConfig)
{
+ activeNameText.gameObject.SetActive(false);
this.taskConfig = taskConfig;
activeIcon.SetSprite(taskConfig.IconKey);
SetTaskState(ceremonyModel.GetPeopleTaskTimesById(taskConfig.ID),taskConfig.TotalTimes);
diff --git a/System/KnapSack/Logic/BoxGetItemWin.cs b/System/KnapSack/Logic/BoxGetItemWin.cs
index e2b10ed..96c6040 100644
--- a/System/KnapSack/Logic/BoxGetItemWin.cs
+++ b/System/KnapSack/Logic/BoxGetItemWin.cs
@@ -66,6 +66,11 @@
ShowUICtrl();
}
+ protected override void OnActived()
+ {
+ UpdateFireEffect();
+ }
+
protected override void OnAfterOpen()
{
this.transform.SetAsLastSibling();
@@ -91,6 +96,33 @@
private void RefreshGetIem(int useId, int useCnt, BoxGetItemInfo[] info)
{
ShowUICtrl();
+ }
+
+ private void UpdateFireEffect()
+ {
+ if (BoxModel.getItems == null) return;
+
+ bool isFireBox = false;
+ foreach (var key in ceremonyModel.fireDict.Keys)
+ {
+ StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(ceremonyModel.fireDict[key]);
+ if (storeConfig != null)
+ {
+ if (storeConfig.ItemID == BoxModel.itemId)
+ {
+ isFireBox = true;
+ if (!fireEffect.IsPlaying)
+ {
+ fireEffect.Play();
+ return;
+ }
+ }
+ }
+ }
+ if(!isFireBox)
+ {
+ fireEffect.Stop();
+ }
}
private void ShowUICtrl()
@@ -125,27 +157,6 @@
else
{
getCoinsText.gameObject.SetActive(false);
- }
-
- foreach(var key in ceremonyModel.fireDict.Keys)
- {
- StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(ceremonyModel.fireDict[key]);
- if(storeConfig != null)
- {
- if(storeConfig.ItemID == BoxModel.itemId)
- {
- if (!fireEffect.IsPlaying)
- {
- fireEffect.Play();
- return;
- }
- }
- }
- }
-
- if (fireEffect.IsPlaying)
- {
- fireEffect.Stop();
}
}
diff --git a/System/KnapSack/New/BatchBuyWin.cs b/System/KnapSack/New/BatchBuyWin.cs
new file mode 100644
index 0000000..d65c5d5
--- /dev/null
+++ b/System/KnapSack/New/BatchBuyWin.cs
@@ -0,0 +1,178 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Friday, September 08, 2017
+//--------------------------------------------------------
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+using TableConfig;
+
+namespace Snxxz.UI
+{
+
+ public class BatchBuyWin : Window
+ {
+ #region 鎴愬憳鍙橀噺
+ private Text _itemName;
+ private Slider _splitSlider;
+ private Text _number;
+ private Button _addBtn;
+ private Button _reduceBtn;
+ private Button _splitBtn;
+ private Button _closeBtn;
+ private ItemCell _itemCell;
+ #endregion
+
+ ItemTipsModel _itemTipsModel;
+ ItemTipsModel itemTipsModel
+ {
+ get
+ {
+ return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
+ }
+ }
+
+ PlayerPackModel _playerPack;
+ PlayerPackModel playerPack
+ {
+ get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
+ }
+
+ PlayerBuffDatas _buffModel;
+ PlayerBuffDatas Buffmodel
+ {
+ get
+ {
+ return _buffModel ?? (_buffModel = ModelCenter.Instance.GetModel<PlayerBuffDatas>());
+ }
+ }
+
+ StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
+ #region Built-in
+ protected override void BindController()
+ {
+ _itemName = transform.Find("ItemNameText").GetComponent<Text>();
+ _number = transform.Find("SplitSlider/Background/Fill/SplitIcon/NumBG/NumText").GetComponent<Text>();
+ _splitSlider = transform.Find("SplitSlider").GetComponent<Slider>();
+ _addBtn = transform.Find("Addbtn").GetComponent<Button>();
+ _splitBtn = transform.Find("Usebtn").GetComponent<Button>();
+ _reduceBtn = transform.Find("Reducebtn").GetComponent<Button>();
+ _closeBtn = transform.Find("Closebtn").GetComponent<Button>();
+ _itemCell = transform.Find("ItemCell").GetComponent<ItemCell>();
+ }
+
+ protected override void AddListeners()
+ {
+ _splitSlider.onValueChanged.RemoveAllListeners();
+ _addBtn.onClick.RemoveAllListeners();
+ _reduceBtn.onClick.RemoveAllListeners();
+ _splitBtn.onClick.RemoveAllListeners();
+ _closeBtn.onClick.RemoveAllListeners();
+
+ _splitSlider.onValueChanged.AddListener(
+
+ delegate
+ {
+ OnSplitValueChange();
+ }
+
+ );
+
+ _addBtn.onClick.AddListener(OnClickAddBtn);
+ _reduceBtn.onClick.AddListener(OnClickReduceBtn);
+ _splitBtn.onClick.AddListener(OnClickBatchUseBtn);
+ _closeBtn.onClick.AddListener(OnClickCloseBtn);
+ }
+
+ protected override void OnPreOpen()
+ {
+ //OpenBatchWin(itemInfoModel.CurItemModel);
+ OpenBatchWin();
+ }
+
+ protected override void OnAfterOpen()
+ {
+ }
+
+ protected override void OnPreClose()
+ {
+ BatchUseModel.Instance.ClearBatchBuyModel();
+ }
+
+ protected override void OnAfterClose()
+ {
+
+ }
+ #endregion
+
+ private void OpenBatchWin()
+ {
+ if (BatchUseModel.Instance.storeConfig == null)
+ return;
+ InitPanel();
+ }
+
+ public void InitPanel()
+ {
+ ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(BatchUseModel.Instance.storeConfig.ItemID);
+ if (itemConfig == null) return;
+
+ ItemCellModel cellModel = new ItemCellModel(itemConfig.ID);
+ _itemCell.Init(cellModel);
+ _itemName.text = itemConfig.ItemName;
+ _splitSlider.minValue = 1;
+ _splitSlider.maxValue = itemConfig.PackCount;
+ OnSplitValueChange();
+ }
+
+ public void OnSplitValueChange()
+ {
+ _number.text = Mathf.Ceil(_splitSlider.value).ToString();
+ }
+
+ public void OnClickAddBtn()
+ {
+ if (_splitSlider.value < _splitSlider.maxValue)
+ {
+ _splitSlider.value++;
+ }
+ }
+
+ public void OnClickReduceBtn()
+ {
+ if (_splitSlider.value > _splitSlider.minValue)
+ {
+ _splitSlider.value--;
+ }
+ }
+
+ public void OnClickBatchUseBtn()
+ {
+ if (BatchUseModel.Instance.storeConfig == null) return;
+
+ if(BatchUseModel.Instance.CheckIsBuy(BatchUseModel.Instance.storeConfig, (int)_splitSlider.value))
+ {
+ storeModel.SendBuyShopItem(BatchUseModel.Instance.storeConfig, (int)_splitSlider.value);
+ OnClickCloseBtn();
+ }
+ else
+ {
+ WindowCenter.Instance.Open<RechargeTipWin>();
+ }
+ }
+
+ public void OnClickCloseBtn()
+ {
+ Close();
+ }
+
+ }
+
+}
+
+
+
+
diff --git a/System/KnapSack/New/BatchBuyWin.cs.meta b/System/KnapSack/New/BatchBuyWin.cs.meta
new file mode 100644
index 0000000..df25779
--- /dev/null
+++ b/System/KnapSack/New/BatchBuyWin.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b189f464e250e4545973fbd542fab701
+timeCreated: 1538221287
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/KnapSack/New/BatchUseModel.cs b/System/KnapSack/New/BatchUseModel.cs
index b32aaac..9bc9a16 100644
--- a/System/KnapSack/New/BatchUseModel.cs
+++ b/System/KnapSack/New/BatchUseModel.cs
@@ -2,12 +2,14 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using TableConfig;
namespace Snxxz.UI
{
public class BatchUseModel : Singleton<BatchUseModel>
- {
- public string guid{ get; private set; }
+ {
+ #region 鎵归噺浣跨敤鏁版嵁
+ public string guid { get; private set; }
public void SetBatchModel(string guid)
{
extraPrams = 0;
@@ -15,12 +17,39 @@
this.guid = guid;
}
- public int extraPrams { get; private set;}
- public int maxValue { get; private set;}
- public void SetExtraInfo(int extraUseInfo,int maxValue)
- {
- this.extraPrams = extraUseInfo;
+ public int extraPrams { get; private set; }
+ public int maxValue { get; private set; }
+ public void SetExtraInfo(int extraUseInfo, int maxValue)
+ {
+ this.extraPrams = extraUseInfo;
this.maxValue = maxValue;
- }
+ }
+ #endregion
+
+ #region 鎵归噺璐拱鏁版嵁
+ public StoreConfig storeConfig { get; private set; }
+ public void SetBatchBuyModel(StoreConfig _storeConfig)
+ {
+ if (_storeConfig == null) return;
+
+ storeConfig = _storeConfig;
+ WindowCenter.Instance.Open<BatchBuyWin>();
+ }
+
+ public bool CheckIsBuy(StoreConfig storeConfig, int buyNum = 1)
+ {
+ ulong price = (ulong)(storeConfig.MoneyNumber * buyNum);
+ if (UIHelper.GetMoneyCnt(storeConfig.MoneyType) >= price)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ public void ClearBatchBuyModel()
+ {
+ storeConfig = null;
+ }
+ #endregion
}
}
diff --git a/System/MainInterfacePanel/HighSettingFadeInFadeOut.cs b/System/MainInterfacePanel/HighSettingFadeInFadeOut.cs
index 5367881..177fd5c 100644
--- a/System/MainInterfacePanel/HighSettingFadeInFadeOut.cs
+++ b/System/MainInterfacePanel/HighSettingFadeInFadeOut.cs
@@ -538,6 +538,29 @@
int IndexOf = GroupLowIndexList.IndexOf(highBtnRecord.Index);
if (IndexOf == 0)
{
+ if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FairyCeremony))//绮剧伒鐩涘吀
+ {
+ if (AnimationFadeOutDicLow.Count < 6)//------绗簩灞�
+ {
+ SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
+ selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
+ selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
+ selectCaseRequest.Index = highBtnRecord.Index;
+ AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
+ }
+ else//------绗笁灞�
+ {
+ SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
+ selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
+ selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
+ selectCaseRequest.Index = highBtnRecord.Index;
+ AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
+ }
+ }
+
+ }
+ else if (IndexOf == 1)
+ {
var _funcOrder = 0;
if (OpenServerActivityCenter.Instance.IsAnyActivityOpen(out _funcOrder))//绮惧僵娲诲姩
{
@@ -561,11 +584,10 @@
}
}
}
-
-
+
}
- else if (IndexOf == 1)
- {
+ else if (IndexOf == 2)
+ {
if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && limitedTimePackageItemModel.IsExpired())//闄愭椂绀煎寘
{
if (AnimationFadeOutDicLow.Count < 6)//------绗簩灞�
@@ -586,8 +608,9 @@
}
}
+
}
- else if (IndexOf == 2)
+ else if (IndexOf == 3)
{
bool Isopen = OpenServerActivityCenter.Instance.IsActivityOpen(4);
if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//闄愭椂鐗规儬
@@ -609,33 +632,12 @@
AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
}
}
- }
- else if (IndexOf == 3)
- {
- bool Isopen = impactRankModel.IsInImpactRank;
- if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//鍏ㄦ皯鍐叉
- {
- if (AnimationFadeOutDicLow.Count < 6)//------绗簩灞�
- {
- SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
- selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
- selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
- selectCaseRequest.Index = highBtnRecord.Index;
- AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
- }
- else//------绗笁灞�
- {
- SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
- selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
- selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
- selectCaseRequest.Index = highBtnRecord.Index;
- AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
- }
- }
+
}
else if (IndexOf == 4)
{
- if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && OperationTimeHepler.Instance.InOperationTime(Operation.FairyCeremony))//绮剧伒鐩涘吀
+ bool Isopen = impactRankModel.IsInImpactRank;
+ if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//鍏ㄦ皯鍐叉
{
if (AnimationFadeOutDicLow.Count < 6)//------绗簩灞�
{
diff --git a/System/WindowJump/WindowJumpMgr.cs b/System/WindowJump/WindowJumpMgr.cs
index 3322f73..130ee97 100644
--- a/System/WindowJump/WindowJumpMgr.cs
+++ b/System/WindowJump/WindowJumpMgr.cs
@@ -338,6 +338,16 @@
}
}
break;
+ case JumpUIType.CeremonyRecharge:
+ case JumpUIType.CeremonyFire:
+ case JumpUIType.CeremonyPeopleToHi:
+ case JumpUIType.CeremonyOutof:
+ if (!OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FairyCeremony))
+ {
+ SysNotifyMgr.Instance.ShowTip("InOperationTimeError");
+ return;
+ }
+ break;
}
DebugEx.Log("WindowJumpTo" + jumpType);
@@ -773,6 +783,12 @@
dungeonModel.selectedTrialDungeon = dungeon;
SetJumpLogic<TrialDungeonEntranceWin>(_tagWinSearchModel.TABID);
break;
+ case JumpUIType.CeremonyRecharge:
+ case JumpUIType.CeremonyFire:
+ case JumpUIType.CeremonyPeopleToHi:
+ case JumpUIType.CeremonyOutof:
+ SetJumpLogic<FairylandCeremonyWin>(_tagWinSearchModel.TABID);
+ break;
case JumpUIType.FaBaoSoul_BenYuan:
case JumpUIType.FaBaoSoul_FengMo:
case JumpUIType.FaBaoSoul_Strength:
@@ -1108,6 +1124,7 @@
//Match curMatch = regex.Match("4**锛坅bc锛夛紵789Y0649");
}
+
}
@@ -1330,6 +1347,10 @@
EquipCompose2 = 236, //瑁呭鍚堟垚-榫欓瓊绾笁
EquipCompose3 = 237, //瑁呭鍚堟垚-鐏电懚绾簩
EquipCompose4 = 238, //瑁呭鍚堟垚-鐏电懚绾笁
+ CeremonyRecharge = 244, //浠欑晫鐩涘吀鍏呭�煎ぇ绀肩晫闈�
+ CeremonyFire = 245, //浠欑晫鐩涘吀鐑熻姳鐙傛鐣岄潰
+ CeremonyPeopleToHi = 246, //浠欑晫鐩涘吀鍏ㄦ皯鏉ュ棬鐣岄潰
+ CeremonyOutof = 247, //浠欑晫鐩涘吀缁濈増闄嶄复鐣岄潰
DhszTs = 1001,//瀹氭捣绁為拡鍔熸硶鎻愬崌鐣岄潰
HyqTs = 1002,//鐨撴湀鏋姛娉曟彁鍗囩晫闈�
GyzTs = 1003,//楝肩墮鍒冨姛娉曟彁鍗囩晫闈�
--
Gitblit v1.8.0