Merge branch 'master' into Rune
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void PlayAnimationClipUnLimit(string name)
|
| | | {
|
| | | AnimationClip _clip = BuiltInLoader.LoadAnimationClip(name);
|
| | | if (_clip != null)
|
| | | {
|
| | | m_Animation.AddClip(_clip, "start_show");
|
| | | m_Animation.Play("start_show");
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnAnimationOver()
|
| | | {
|
| | | IsPlayingAnim = false;
|
| | |
| | | public static void Init()
|
| | | {
|
| | | // 登记相应的数据体及对应的数据转逻辑类
|
| | | Register(typeof(HA327_tagMCRealmExpInfo), typeof(DTCA327_tagMCRealmExpInfo));
|
| | | Register(typeof(HA40C_tagGCAllFamilyBossInfo), typeof(DTCA40C_tagGCAllFamilyBossInfo));
|
| | | Register(typeof(HA3B1_tagMCEquipPartStarInfo), typeof(DTCA3B1_tagMCEquipPartStarInfo));
|
| | | Register(typeof(HA816_tagMCMysticalShopInfo), typeof(DTCA816_tagMCMysticalShopInfo));
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Thursday, March 14, 2019 |
| | | // [ Date ]: Wednesday, March 20, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | public readonly int[] AddAttrType;
|
| | | public readonly int[] AddAttrNum;
|
| | | public readonly int BossID;
|
| | | public readonly long expRate;
|
| | | public readonly long expLimit;
|
| | | public readonly string Img;
|
| | | public readonly int Quality;
|
| | | public readonly int FightPower;
|
| | |
| | |
|
| | | int.TryParse(tables[7],out BossID);
|
| | |
|
| | | Img = tables[8];
|
| | | long.TryParse(tables[8],out expRate); |
| | |
|
| | | int.TryParse(tables[9],out Quality); |
| | | long.TryParse(tables[9],out expLimit); |
| | |
|
| | | int.TryParse(tables[10],out FightPower); |
| | | Img = tables[10];
|
| | |
|
| | | equipNameIcon = tables[11];
|
| | | int.TryParse(tables[11],out Quality); |
| | |
|
| | | equips = tables[12];
|
| | | int.TryParse(tables[12],out FightPower); |
| | |
|
| | | int.TryParse(tables[13],out effectId); |
| | | equipNameIcon = tables[13];
|
| | |
|
| | | int.TryParse(tables[14],out requireIconEffect); |
| | | equips = tables[14];
|
| | |
|
| | | int.TryParse(tables[15],out effectId); |
| | |
|
| | | int.TryParse(tables[16],out requireIconEffect); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d49ca04ff4a91bc4fb645c417f9ef0b3 |
| | | timeCreated: 1552548022 |
| | | timeCreated: 1553061533 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A5 21 境界修为池提取 #tagCMTakeOutRealmExp
|
| | |
|
| | | public class CA521_tagCMTakeOutRealmExp : GameNetPackBasic {
|
| | |
|
| | | public CA521_tagCMTakeOutRealmExp () {
|
| | | combineCmd = (ushort)0x03FE;
|
| | | _cmd = (ushort)0xA521;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 60efa2ae65f837242a25ff4bbb5b456b |
| | | timeCreated: 1553064966 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Wednesday, March 20, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using Snxxz.UI;
|
| | | public class DTCA327_tagMCRealmExpInfo : DtcBasic
|
| | | {
|
| | |
|
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | | {
|
| | | base.Done(vNetPack);
|
| | | var package = vNetPack as HA327_tagMCRealmExpInfo;
|
| | | ModelCenter.Instance.GetModel<RealmModel>().ReceivePackage(package);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: bbfa3dbab2a4c2b4fae460fc3830c1a6 |
| | | timeCreated: 1553065107 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A3 27 境界修为池信息 #tagMCRealmExpInfo
|
| | |
|
| | | public class HA327_tagMCRealmExpInfo : GameNetPackBasic {
|
| | | public uint BeginTime; //开始计时时间
|
| | | public uint CurExp; //当前总经验
|
| | | public uint CurExpPoint; //当前总经验点
|
| | |
|
| | | public HA327_tagMCRealmExpInfo () {
|
| | | _cmd = (ushort)0xA327;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out BeginTime, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out CurExp, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out CurExpPoint, vBytes, NetDataType.DWORD);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cd9074b87c2c7b540b6dfa2ff01c3b0e |
| | | timeCreated: 1553065068 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | return;
|
| | | }
|
| | |
|
| | | int _resID = JobSetup.BaseEquip[1];
|
| | | var apperance = ModelCenter.Instance.GetModel<EquipModel>().GetAppearance();
|
| | |
|
| | | EquipInfo _equipInfo;
|
| | | int _resID = JobSetup.BaseEquip[1];
|
| | |
|
| | | // 如果是套装位置
|
| | | if (index == (int)RoleEquipType.FashionWeapon)
|
| | |
| | | if (itemID == 0)
|
| | | {
|
| | | // 寻找原身上装备, 如果有的话就重置此次要换装的道具id
|
| | | if (m_EquipDict.TryGetValue((int)RoleEquipType.Weapon, out _equipInfo))
|
| | | if (apperance.weapon != 0)
|
| | | {
|
| | | itemID = _equipInfo.itemID;
|
| | | itemID = (uint)apperance.weapon;
|
| | | }
|
| | | }
|
| | | }
|
| | | else if (index == (int)RoleEquipType.Weapon)
|
| | | {
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.FashionWeapon))
|
| | | if (apperance.fashionWeapon != 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var apperance = ModelCenter.Instance.GetModel<EquipModel>().GetAppearance();
|
| | |
|
| | | int _baseHandResID = ModelResConfig.GetHandByClothesID((int)ClothesItemID);
|
| | | int _resID = _baseHandResID;
|
| | | if (JobSetup.Job == 2)
|
| | | {
|
| | | _resID = JobSetup.BaseEquip[2];
|
| | | }
|
| | |
|
| | | EquipInfo _equipInfo;
|
| | |
|
| | | // 如果是套装位置
|
| | | if (index == (int)RoleEquipType.FashionWeapon2)
|
| | |
| | | if (itemID == 0)
|
| | | {
|
| | | // 寻找原身上装备, 如果有的话就重置此次要换装的道具id
|
| | | if (m_EquipDict.TryGetValue((int)RoleEquipType.Weapon2, out _equipInfo))
|
| | | if (apperance.secondary != 0)
|
| | | {
|
| | | itemID = _equipInfo.itemID;
|
| | | itemID = (uint)apperance.secondary;
|
| | | }
|
| | | }
|
| | | }
|
| | | else if (index == (int)RoleEquipType.Weapon2)
|
| | | {
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.FashionWeapon2))
|
| | | if (apperance.fashionSecondary != 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.FashionWeapon2))
|
| | | if (apperance.fashionSecondary != 0)
|
| | | {
|
| | | SwitchHand(true);
|
| | | }
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | EquipInfo _equipInfo;
|
| | | var apperance = ModelCenter.Instance.GetModel<EquipModel>().GetAppearance();
|
| | |
|
| | | // 换装ID
|
| | | int _resID = JobSetup.BaseEquip[0];
|
| | |
| | | if (itemID == 0)
|
| | | {
|
| | | // 寻找原身上装备, 如果有的话就重置此次要换装的道具id
|
| | | if (m_EquipDict.TryGetValue((int)RoleEquipType.Clothes, out _equipInfo))
|
| | | if (apperance.clothes != 0)
|
| | | {
|
| | | itemID = _equipInfo.itemID;
|
| | | itemID = (uint)apperance.clothes;
|
| | | }
|
| | | }
|
| | | }
|
| | | else if (index == (int)RoleEquipType.Clothes)
|
| | | {
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.FashionClothes))
|
| | | if (apperance.fashionClothes != 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | // 决定副手逻辑
|
| | | // 如果当前是时装副手, 则装备时装手臂
|
| | | // 如果当前是普通副手, 则卸下手臂
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.FashionWeapon2))
|
| | | if (apperance.fashionSecondary != 0)
|
| | | {
|
| | | SwitchHand(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (!m_EquipDict.ContainsKey((int)RoleEquipType.Weapon2))
|
| | | if (apperance.fashionSecondary == 0)
|
| | | {
|
| | | SwitchHand(true);
|
| | | }
|
| | |
| | |
|
| | | if (onOrOff)
|
| | | {
|
| | | EquipInfo _equipInfo;
|
| | | var apperance = ModelCenter.Instance.GetModel<EquipModel>().GetAppearance();
|
| | |
|
| | | int _itemID = 7000;
|
| | |
|
| | | if (!m_EquipDict.TryGetValue((int)RoleEquipType.FashionClothes, out _equipInfo))
|
| | | if (apperance.fashionClothes == 0)
|
| | | {
|
| | | if (!m_EquipDict.TryGetValue((int)RoleEquipType.Clothes, out _equipInfo))
|
| | | if (apperance.clothes == 0)
|
| | | {
|
| | | _itemID = 7000;
|
| | | }
|
| | | }
|
| | |
|
| | | if (_equipInfo.itemID != 0)
|
| | | {
|
| | | _itemID = (int)_equipInfo.itemID;
|
| | | }
|
| | |
|
| | | int _resID = 7000;
|
| | |
| | | get { return wait; }
|
| | | set { wait = value; }
|
| | | }
|
| | | public bool isOpenPanel = true;
|
| | | public bool IsOpenPanel
|
| | | {
|
| | | get { return isOpenPanel; }
|
| | | set { isOpenPanel = value; }
|
| | | }
|
| | | public override void Init()
|
| | | {
|
| | | var AuctionTaxrateConfig = FuncConfigConfig.Get("AuctionTaxrate");
|
| | |
| | | bool isBool = false;
|
| | | string equipGuid = string.Empty;
|
| | | var equipSet = equipModel.GetEquipSet(equipLevel);
|
| | | if (equipSet == null)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | equipGuid = equipSet.GetEquip(equipPlace);
|
| | | isBool = !string.IsNullOrEmpty(equipGuid);
|
| | | return isBool;
|
| | |
| | | [SerializeField] Button m_TypeTipBtn;
|
| | | [SerializeField] Text m_JobTipText;
|
| | | [SerializeField] Text m_TypeTipText;
|
| | | List<AuctionItemClass> FullServiceAuctionListSort = new List<AuctionItemClass>();//全服拍品列表
|
| | | List<AuctionItemClass> FullServiceAuctionListSort = new List<AuctionItemClass>();//全服拍品列表
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
|
| | |
|
| | | private bool IsSendBool = true;
|
| | | private int Times = 0;
|
| | | protected override void BindController() |
| | | {
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell; |
| | |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | IsSendBool = true; |
| | | Times = 0;
|
| | | auctionHelpModel.isOpenPanel = true;
|
| | | IsSendBool = false;
|
| | | GlobalTimeEvent.Instance.secondEvent += secondEvent; |
| | | model.FullServiceAuctionUpdate += FullServiceAuctionUpdate;//数据请求刷新 |
| | | model.RefreshAuctionItemUpdate += RefreshAuctionItemUpdate;//刷新 |
| | | model.ClearAuctionUpdate += ClearAuctionUpdate;//清除 |
| | | model.BiddingItemInfoUpdate += BiddingItemInfoUpdate;//竞价物品信息刷新
|
| | | GlobalTimeEvent.Instance.secondEvent += secondEvent; |
| | | model.BiddingItemInfoUpdate += BiddingItemInfoUpdate;//竞价物品信息刷新 |
| | | Reset(); |
| | | CloseTip();
|
| | | ListSort(); |
| | | OnCreateGridLineCell(m_ScrollerController); |
| | | OnCreateGridLineCellJob(m_ScrollerControllerJob); |
| | | OnCreateGridLineCellType(m_ScrollerControllerType); |
| | | OnCreateGridLineCellType(m_ScrollerControllerType);
|
| | | OnCreateGridLineCellItem(m_ScrollerControllerItem); |
| | | SetTipText(); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | {
|
| | | |
| | |
|
| | |
|
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | |
| | | model.BiddingItemInfoUpdate -= BiddingItemInfoUpdate;//竞价物品信息刷新
|
| | | GlobalTimeEvent.Instance.secondEvent -= secondEvent; |
| | | }
|
| | | |
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | |
| | | |
| | | private void secondEvent()
|
| | | {
|
| | | Times += 1;
|
| | | if (Times >= 3 && auctionHelpModel.isOpenPanel)
|
| | | {
|
| | | auctionHelpModel.isOpenPanel = false;
|
| | | }
|
| | | if (IsSendBool)
|
| | | {
|
| | | IsSendBool = false;
|
| | |
| | | } |
| | | private void BiddingItemInfoUpdate()
|
| | | {
|
| | | |
| | |
|
| | | } |
| | | private void OnClickJobTipBtn()
|
| | | {
|
| | |
| | | } |
| | | private void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | | |
| | |
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < auctionHelpModel.FullServiceAuctionList.Count; i++)
|
| | | {
|
| | |
| | | if (index != -1)
|
| | | {
|
| | | var fullServiceAuction = auctionHelpModel.FullServiceAuctionList[index];
|
| | | if (fullServiceAuction.ChooseItem1 != null && fullServiceAuction.ChooseItem1.Length!=0)
|
| | | if (fullServiceAuction.ChooseItem1 != null && fullServiceAuction.ChooseItem1.Length != 0)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < fullServiceAuction.ChooseItem1.Length; i++)
|
| | |
| | | if (index != config.JobEntry)
|
| | | {
|
| | | auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].JobEntry = index;
|
| | | IsSendBool = true; |
| | | IsSendBool = true;
|
| | | SetTipText();
|
| | | }
|
| | | });
|
| | |
| | | if (index != -1)
|
| | | {
|
| | | var fullServiceAuction = auctionHelpModel.FullServiceAuctionList[index];
|
| | | if (fullServiceAuction.ChooseItem2 != null && fullServiceAuction.ChooseItem2.Length!=0)
|
| | | if (fullServiceAuction.ChooseItem2 != null && fullServiceAuction.ChooseItem2.Length != 0)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < fullServiceAuction.ChooseItem2.Length; i++)
|
| | |
| | | if (index != config.TypeEntry)
|
| | | {
|
| | | auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].TypeEntry = index;
|
| | | IsSendBool=true; |
| | | IsSendBool = true;
|
| | | SetTipText();
|
| | | }
|
| | | });
|
| | |
| | | else
|
| | | {
|
| | | model.LocationQuery = false;
|
| | | } |
| | | }
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i <FullServiceAuctionListSort.Count; i++)
|
| | | for (int i = 0; i < FullServiceAuctionListSort.Count; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | |
| | | {
|
| | | AuctionInquiry.Instance.SendQueryAuction(string.Empty, sendNumber, 1);
|
| | | }
|
| | | |
| | |
|
| | | } |
| | | private void CloseTip()
|
| | | {
|
| | | m_JobTip.SetActive(false);
|
| | | m_TypeTip.SetActive(false);
|
| | | } |
| | | private void SetTipText()
|
| | | private void SetTipText()
|
| | | {
|
| | | var selectedGenreNow = auctionHelpModel.SelectedGenreNow;
|
| | | if (auctionHelpModel.FullServiceAuctionDic.ContainsKey(selectedGenreNow))
|
| | |
| | | }
|
| | | } |
| | | |
| | | private void ListSort()
|
| | | private void ListSort()
|
| | | {
|
| | | FullServiceAuctionListSort.Clear();
|
| | | var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | |
| | | {
|
| | | FullServiceAuctionListSort.Add(vlaue);
|
| | | }
|
| | | } |
| | | }
|
| | | }
|
| | | FullServiceAuctionListSort.Sort(Compare);
|
| | | }
|
| | |
| | | if (havex1.CompareTo(havey1) != 0)//是否参与
|
| | | {
|
| | | return -havex1.CompareTo(havey1);
|
| | | } |
| | | }
|
| | | return 1;
|
| | | }
|
| | | private bool IsHighestPrice(string GUID)
|
| | |
| | | isBool = true;
|
| | | }
|
| | | return isBool;
|
| | | } |
| | | }
|
| | | } |
| | | |
| | | } |
| | |
| | | if (index < 5)
|
| | | {
|
| | | var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | | if (sendNumber != 0 && auctionHelpModel.Wait && model.QueryRemaining.UpBool)
|
| | | if (sendNumber != 0 && auctionHelpModel.Wait && model.QueryRemaining.UpBool && !auctionHelpModel.isOpenPanel)
|
| | | {
|
| | | AuctionInquiry.Instance.SendQueryAuction(fullServiceAuction.ItemGUID, sendNumber, 2);
|
| | | auctionHelpModel.Wait = false;
|
| | |
| | | else if (index >= model.FullServiceAuctionList.Count - 3)
|
| | | {
|
| | | var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | | if (sendNumber != 0 && auctionHelpModel.Wait && model.QueryRemaining.DownBool)
|
| | | if (sendNumber != 0 && auctionHelpModel.Wait && model.QueryRemaining.DownBool && !auctionHelpModel.isOpenPanel)
|
| | | {
|
| | | AuctionInquiry.Instance.SendQueryAuction(fullServiceAuction.ItemGUID, sendNumber, 1);
|
| | | auctionHelpModel.Wait = false;
|
| | |
| | | namespace Snxxz.UI |
| | | { |
| | | [XLua.LuaCallCSharp] |
| | | public class EquipModel : Model |
| | | public class EquipModel : Model, IAfterPlayerDataInitialize |
| | | { |
| | | public static readonly List<int> realmEquipTypes = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; |
| | | |
| | |
| | | get { return LocalSave.GetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "EquipSetUnLockHasShowed"), 1); } |
| | | set { LocalSave.SetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "EquipSetUnLockHasShowed"), value); } |
| | | } |
| | | |
| | | public readonly List<int> showedSuitPlaceEffect = new List<int>(); |
| | | public readonly List<int> showedSuitLevelEffect = new List<int>(); |
| | | |
| | | public readonly LogicInt selectedLevel = new LogicInt(); |
| | | public readonly LogicString selectedEquip = new LogicString(); |
| | |
| | | public readonly LogicBool isAppearanceLevel = new LogicBool(); |
| | | public readonly LogicList<int> suitPlaces = new LogicList<int>(); |
| | | public readonly LogicStruct<EquipSuitProperty> suitProperty = new LogicStruct<EquipSuitProperty>(); |
| | | |
| | | public readonly LogicList<int> suitPlaceCollectEffects = new LogicList<int>(); |
| | | public readonly LogicStruct<EquipSuitActive> suitActive = new LogicStruct<EquipSuitActive>(); |
| | | |
| | | static Dictionary<int, string> equipSetNames = new Dictionary<int, string>(); |
| | | Dictionary<int, EquipSet> equipSets = new Dictionary<int, EquipSet>(); |
| | |
| | | PlayerDatas.Instance.playerDataRefreshEvent -= OnPlayerDataRefresh; |
| | | } |
| | | |
| | | public void OnAfterPlayerDataInitialize() |
| | | { |
| | | var playerId = PlayerDatas.Instance.baseData.PlayerID; |
| | | |
| | | showedSuitPlaceEffect.Clear(); |
| | | var showedSuitPlaceEffectsRecord = LocalSave.GetIntArray(StringUtility.Contact(playerId, "_showedSuitPlaceEffect")); |
| | | if (showedSuitPlaceEffectsRecord != null) |
| | | { |
| | | showedSuitPlaceEffect.AddRange(showedSuitPlaceEffectsRecord); |
| | | } |
| | | |
| | | showedSuitLevelEffect.Clear(); |
| | | var showedSuitLevelEffectsRecord = LocalSave.GetIntArray(StringUtility.Contact(playerId, "_showedSuitLevelEffect")); |
| | | if (showedSuitLevelEffectsRecord != null) |
| | | { |
| | | showedSuitPlaceEffect.AddRange(showedSuitLevelEffectsRecord); |
| | | } |
| | | } |
| | | |
| | | public int GetLastestUnLockEquipSet() |
| | | { |
| | | for (int i = sortedLevels.Count - 1; i >= 0; i--) |
| | |
| | | } |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | public int GetFirstRedpointEquipSet() |
| | | { |
| | | for (int i = sortedLevels.Count - 1; i >= 0; i--) |
| | | { |
| | | var level = sortedLevels[i]; |
| | | if (equipSets[level].redpoint.state == RedPointState.Simple) |
| | | { |
| | | return level; |
| | | } |
| | | } |
| | | |
| | | return GetLastestUnLockEquipSet(); |
| | | } |
| | | |
| | | public void OneKeyPutOn(int level) |
| | |
| | | suitPlaces.Clear(); |
| | | candidateEquips.Clear(); |
| | | getWays.Clear(); |
| | | suitPlaceCollectEffects.Clear(); |
| | | suitActive.value = default(EquipSuitActive); |
| | | } |
| | | |
| | | private void RefreshCandidateEquips(int level) |
| | |
| | | return entry; |
| | | } |
| | | |
| | | public bool IsSuitPlaceEffectPlayed(Int2 equipPosition) |
| | | { |
| | | var place = EquipSet.ClientPlaceToServerPlace(equipPosition); |
| | | return showedSuitPlaceEffect.Contains(place); |
| | | } |
| | | |
| | | public void RecordSuitPlaceEffectPlay(Int2 equipPosition) |
| | | { |
| | | var place = EquipSet.ClientPlaceToServerPlace(equipPosition); |
| | | if (!showedSuitPlaceEffect.Contains(place)) |
| | | { |
| | | showedSuitPlaceEffect.Add(place); |
| | | var playerId = PlayerDatas.Instance.baseData.PlayerID; |
| | | LocalSave.SetIntArray(StringUtility.Contact(playerId, "_showedSuitPlaceEffect"), showedSuitPlaceEffect.ToArray()); |
| | | } |
| | | } |
| | | |
| | | public bool IsSuitLevelEffectPlayed(Int3 info) |
| | | { |
| | | var place = info.x * 100 + info.y * 10 + info.z; |
| | | return showedSuitLevelEffect.Contains(place); |
| | | } |
| | | |
| | | public void RecordSuitLevelEffectPlay(Int3 info) |
| | | { |
| | | var place = info.x * 100 + info.y * 10 + info.z; |
| | | if (!showedSuitLevelEffect.Contains(place)) |
| | | { |
| | | showedSuitLevelEffect.Add(place); |
| | | var playerId = PlayerDatas.Instance.baseData.PlayerID; |
| | | LocalSave.SetIntArray(StringUtility.Contact(playerId, "_showedSuitLevelEffect"), showedSuitLevelEffect.ToArray()); |
| | | } |
| | | } |
| | | |
| | | private void OnPlayerDataRefresh(PlayerDataType type) |
| | | { |
| | | switch (type) |
| | |
| | | { |
| | | case PackType.Item: |
| | | UpdateRedpoints(); |
| | | if (selectedLevel.value > 0) |
| | | { |
| | | RefreshCandidateEquips(selectedLevel.value); |
| | | } |
| | | break; |
| | | case PackType.Equip: |
| | | foreach (var set in equipSets.Values) |
| | |
| | | private void UpdateSuitPlaces(int level) |
| | | { |
| | | suitPlaces.Clear(); |
| | | suitPlaceCollectEffects.Clear(); |
| | | for (int i = 1; i <= 8; i++) |
| | | { |
| | | var equip = packModel.GetItemByGuid(GetEquip(new Int2(level, i))); |
| | |
| | | if (hasSuit) |
| | | { |
| | | suitPlaces.Add(i); |
| | | if (!IsSuitPlaceEffectPlayed(new Int2(level, i))) |
| | | { |
| | | suitPlaceCollectEffects.Add(i); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | var property = new EquipSuitProperty(); |
| | | |
| | | property.star = star; |
| | | property.twoSuit = GetEquipSuitEntry(level, star, EquipSuitType.TwoSuit); |
| | | property.fiveSuit = GetEquipSuitEntry(level, star, EquipSuitType.FiveSuit); |
| | | |
| | |
| | | property.eightActived = GetSuitLevel(level, EquipSuitType.EightSuit) >= star; |
| | | |
| | | this.suitProperty.value = property; |
| | | |
| | | var suitActive = new EquipSuitActive(); |
| | | suitActive.level = level; |
| | | suitActive.star = star; |
| | | if (property.twoSuit.actived && !IsSuitLevelEffectPlayed(new Int3(level, star, 2))) |
| | | { |
| | | suitActive.twoActived = true; |
| | | } |
| | | |
| | | if (property.fiveSuit.actived && !IsSuitLevelEffectPlayed(new Int3(level, star, 5))) |
| | | { |
| | | suitActive.fiveActived = true; |
| | | } |
| | | |
| | | if (property.eightActived && !IsSuitLevelEffectPlayed(new Int3(level, star, 8))) |
| | | { |
| | | suitActive.eightActived = true; |
| | | } |
| | | |
| | | this.suitActive.value = suitActive; |
| | | } |
| | | |
| | | private void ParseConfig() |
| | |
| | | |
| | | public struct EquipSuitProperty |
| | | { |
| | | public int star; |
| | | public EquipSuitPropertyEntry twoSuit; |
| | | public EquipSuitPropertyEntry fiveSuit; |
| | | public int eightSuitId; |
| | | public bool eightActived; |
| | | } |
| | | |
| | | public struct EquipSuitActive |
| | | { |
| | | public int level; |
| | | public int star; |
| | | |
| | | public bool twoActived; |
| | | public bool fiveActived; |
| | | public bool eightActived; |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | [SerializeField] Text m_SuitName; |
| | | [SerializeField] StarToggle[] m_StarToggles; |
| | | [SerializeField] Text[] m_SuitEquipNames; |
| | | [SerializeField] UIEffect[] m_SuitEquipEffects; |
| | | |
| | | [SerializeField] EquipSuitPropertyBar m_TwoSuit; |
| | | [SerializeField] EquipSuitPropertyBar m_FiveSuit; |
| | | [SerializeField] Text m_EightSuitTitle; |
| | | [SerializeField] Text m_EightSuitDescription; |
| | | [SerializeField] UIEffect[] m_SuitLevelEffects; |
| | | |
| | | EquipModel model { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | |
| | | int level; |
| | | |
| | | public void Init(int level) |
| | | { |
| | | this.level = level; |
| | | |
| | | m_SuitName.text = EquipSuitConfig.GetConfigs(PlayerDatas.Instance.baseData.Job, level, EquipSuitType.TwoSuit)[0].name; |
| | | var maxLevel = EquipStarModel.GetMaxStarLevel(level); |
| | | m_StarToggles[3].SetActive(maxLevel >= 9); |
| | |
| | | } |
| | | } |
| | | |
| | | public void DisplaySuitPlaceEffects(List<int> places) |
| | | { |
| | | foreach (var place in places) |
| | | { |
| | | m_SuitEquipEffects[place - 1].Play(); |
| | | model.RecordSuitPlaceEffectPlay(new Int2(this.level, place)); |
| | | } |
| | | } |
| | | |
| | | public void DisplayProperty(EquipSuitProperty property) |
| | | { |
| | | m_TwoSuit.Display(property.twoSuit); |
| | |
| | | m_EightSuitDescription.color = color; |
| | | } |
| | | |
| | | public void DisplaySuitLevelEffects(EquipSuitActive suitActive) |
| | | { |
| | | if (suitActive.twoActived) |
| | | { |
| | | m_SuitLevelEffects[0].Play(); |
| | | model.RecordSuitLevelEffectPlay(new Int3(suitActive.level, suitActive.star, 2)); |
| | | } |
| | | |
| | | if (suitActive.fiveActived) |
| | | { |
| | | m_SuitLevelEffects[1].Play(); |
| | | model.RecordSuitLevelEffectPlay(new Int3(suitActive.level, suitActive.star, 5)); |
| | | } |
| | | |
| | | if (suitActive.eightActived) |
| | | { |
| | | m_SuitLevelEffects[2].Play(); |
| | | model.RecordSuitLevelEffectPlay(new Int3(suitActive.level, suitActive.star, 8)); |
| | | } |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | |
| | |
| | | { |
| | | if (model.selectedLevel.value == 0) |
| | | { |
| | | model.SelectSet(model.GetLastestUnLockEquipSet()); |
| | | model.SelectSet(model.GetFirstRedpointEquipSet()); |
| | | } |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | m_SuitPropertyWidget.DisplaySuitPlaceEffects(model.suitPlaceCollectEffects.Fetch()); |
| | | m_SuitPropertyWidget.DisplaySuitLevelEffects(model.suitActive.Fetch()); |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | |
| | | { |
| | | DisplayAppearaneSign(model.isAppearanceLevel.Fetch()); |
| | | } |
| | | |
| | | if (this.windowState == WindowState.Opened && model.suitPlaceCollectEffects.dirty) |
| | | { |
| | | m_SuitPropertyWidget.DisplaySuitPlaceEffects(model.suitPlaceCollectEffects.Fetch()); |
| | | } |
| | | |
| | | if (this.windowState == WindowState.Opened && model.suitActive.dirty) |
| | | { |
| | | m_SuitPropertyWidget.DisplaySuitLevelEffects(model.suitActive.Fetch()); |
| | | } |
| | | } |
| | | |
| | | private void DisplayLevels() |
| | |
| | | [SerializeField] RichText m_TextAttributesA; |
| | | [SerializeField] RichText m_TextAttributesB; |
| | | [SerializeField] ItemCell m_ItemCell;
|
| | | [SerializeField] RichText m_ItemCount;
|
| | |
|
| | | [SerializeField] GameObject m_AdvancedObj;
|
| | | [SerializeField] GameObject m_FullLevelObj;
|
| | |
| | | #region Built-in |
| | | EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | int equipType; |
| | | protected override void BindController() |
| | | { |
| | |
| | | m_TextAttribute2.text = evolveNext.AttrName + "+" + evolveNext.AttrValue;
|
| | | ItemCellModel cellModel = new ItemCellModel(evolve.CostItemID, true, (ulong)1);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemCell.button.SetListener(()=> |
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(evolve.CostItemID, false, (ulong)1);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | string strItemCount = string.Empty;
|
| | | string strEquipLevel = string.Empty;
|
| | | string strNeedItemCount = string.Empty;
|
| | |
|
| | | int itemCount = 0;
|
| | | int equipLv = 0;
|
| | | int equipIndex = EquipPlaceMapConfig.GetServerPlace(strengthModel.SelectLevel, strengthModel.SelectEquipPlace);
|
| | | if (strengthModel.EquipStrengthDic.ContainsKey(equipIndex))//获取当前强化等级
|
| | | {
|
| | | equipLv = strengthModel.EquipStrengthDic[equipIndex].StrengthLevel;
|
| | | }
|
| | | |
| | | if (advancedLv == 0)
|
| | | {
|
| | | |
| | | m_TextAttributesA.text = Language.Get("ZBQH_05", evolveNext.NeedPlusLV);
|
| | | m_TextAttributesB.text = Language.Get("ZBQH_06", evolveNext.CostItemCount);
|
| | | itemCount = playerPack.GetItemCountByID(PackType.Item, evolveNext.CostItemID);
|
| | | strNeedItemCount = itemCount + "/" + evolveNext.CostItemCount;
|
| | | if (itemCount >= evolveNext.CostItemCount)
|
| | | {
|
| | | strItemCount = Language.Get("ZBQH_09", evolveNext.CostItemCount);
|
| | | strNeedItemCount = Language.Get("ZBQH_09", strNeedItemCount);
|
| | | }
|
| | | else
|
| | | {
|
| | | strItemCount = Language.Get("ZBQH_10", evolveNext.CostItemCount);
|
| | | strNeedItemCount = Language.Get("ZBQH_10", strNeedItemCount);
|
| | | }
|
| | | if (equipLv >= evolveNext.NeedPlusLV)
|
| | | {
|
| | | strEquipLevel = Language.Get("ZBQH_09", evolveNext.NeedPlusLV);
|
| | | }
|
| | | else
|
| | | {
|
| | | strEquipLevel = Language.Get("ZBQH_10", evolveNext.NeedPlusLV);
|
| | | }
|
| | |
|
| | | m_TextAttributesA.text = Language.Get("ZBQH_05", strEquipLevel);
|
| | | m_TextAttributesB.text = Language.Get("ZBQH_06", strItemCount);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_TextAttributesA.text = Language.Get("ZBQH_05", evolve.NeedPlusLV);
|
| | | m_TextAttributesB.text = Language.Get("ZBQH_06", evolve.CostItemCount);
|
| | | itemCount = playerPack.GetItemCountByID(PackType.Item, evolve.CostItemID);
|
| | | strNeedItemCount = itemCount + "/" + evolveNext.CostItemCount;
|
| | | if (itemCount >= evolve.CostItemCount)
|
| | | {
|
| | | strItemCount = Language.Get("ZBQH_09", evolve.CostItemCount);
|
| | | strNeedItemCount = Language.Get("ZBQH_09", strNeedItemCount);
|
| | | }
|
| | | else
|
| | | {
|
| | | strItemCount = Language.Get("ZBQH_10", evolve.CostItemCount);
|
| | | strNeedItemCount = Language.Get("ZBQH_10", strNeedItemCount);
|
| | | }
|
| | | if (equipLv >= evolve.NeedPlusLV)
|
| | | {
|
| | | strEquipLevel = Language.Get("ZBQH_09", evolve.NeedPlusLV);
|
| | | }
|
| | | else
|
| | | {
|
| | | strEquipLevel = Language.Get("ZBQH_10", evolve.NeedPlusLV);
|
| | | }
|
| | | m_TextAttributesA.text = Language.Get("ZBQH_05", strEquipLevel);
|
| | | m_TextAttributesB.text = Language.Get("ZBQH_06", strItemCount);
|
| | | }
|
| | |
|
| | | m_ItemCount.text = strNeedItemCount;
|
| | | } |
| | | private void FullLevel(int advancedLv)
|
| | | {
|
| | |
| | | return default(SuitInfo); |
| | | } |
| | | |
| | | var job = config.JobLimit / 100; |
| | | var job = config.JobLimit ; |
| | | var twoConfigs = EquipSuitConfig.GetConfigs(job, config.LV, EquipSuitType.TwoSuit); |
| | | |
| | | var name = twoConfigs[0].name; |
| | |
| | | return default(SuitInfo); |
| | | } |
| | | |
| | | var job = config.JobLimit / 100; |
| | | var job = config.JobLimit ; |
| | | var twoConfigs = EquipSuitConfig.GetConfigs(job, config.LV, EquipSuitType.TwoSuit); |
| | | |
| | | var name = twoConfigs[0].name; |
| | |
| | | private Dictionary<int, List<int>> betterEquipExceptDungeonDict; |
| | | |
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } |
| | | BuffModel buffDatas { get { return ModelCenter.Instance.GetModel<BuffModel>(); } } |
| | | MountModel mountDatas { get { return ModelCenter.Instance.GetModel<MountModel>(); } } |
| | | PetModel petDatas { get { return ModelCenter.Instance.GetModel<PetModel>(); } } |
| | |
| | | return; |
| | | } |
| | | |
| | | if (!IsSameJob(item.config.JobLimit)) |
| | | if (!IsJobCompatibleItem(item.itemId)) |
| | | { |
| | | return; |
| | | } |
| | |
| | | SetGetBetterEquipEvent(item); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | bool IsSameJob(int jobLimit) |
| | | { |
| | | return jobLimit == 0 || jobLimit / 100 == PlayerDatas.Instance.baseData.Job; |
| | | } |
| | | |
| | | private void SetGetBetterEquipEvent(ItemModel model) |
| | |
| | | public bool IsJobCompatibleItem(int itemId) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | return config != null && (config.JobLimit == 0 || config.JobLimit / 100 == PlayerDatas.Instance.baseData.Job); |
| | | return config != null && (config.JobLimit == 0 || config.JobLimit == PlayerDatas.Instance.baseData.Job); |
| | | } |
| | | |
| | | public bool IsEquip(int itemId)
|
| | | {
|
| | | if (ItemConfig.Has(itemId))
|
| | | if (!ItemConfig.Has(itemId))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
| | | |
| | | public bool IsWing(int itemId)
|
| | | {
|
| | | if (ItemConfig.Has(itemId))
|
| | | if (!ItemConfig.Has(itemId))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
| | | |
| | | public bool IsDogzEquip(int itemId)
|
| | | {
|
| | | if (ItemConfig.Has(itemId))
|
| | | if (!ItemConfig.Has(itemId))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | double job = Math.Floor((double)attrData.itemConfig.JobLimit / 100) * 100 + 1;
|
| | | SetJobName(attrData, int.Parse(playerJob), (int)job);
|
| | | SetJobName(attrData, int.Parse(playerJob), attrData.itemConfig.JobLimit);
|
| | | }
|
| | |
|
| | | return jobName;
|
| | |
| | | private void Awake()
|
| | | {
|
| | | ChooseItemWin.RefreshChooseCellAct += RefreshChooseImage;
|
| | |
|
| | | }
|
| | |
|
| | | public void InitModel(int id)
|
| | |
| | | var qualityValid = filterParams.qualitys == null || filterParams.qualitys.Contains(item.config.ItemColor); |
| | | var typeValid = filterParams.itemTypes == null || filterParams.itemTypes.Contains(item.config.Type); |
| | | var equipTypeValid = filterParams.equipTypes == null || filterParams.equipTypes.Contains(item.config.EquipPlace); |
| | | var jobValid = filterParams.job == 0 || filterParams.job == item.config.JobLimit / 100; |
| | | var jobValid = filterParams.job == 0 || filterParams.job == item.config.JobLimit; |
| | | var auctionValid = filterParams.isAuction == item.isAuction; |
| | | |
| | | if (levelValid && qualityValid && typeValid && equipTypeValid && jobValid && auctionValid) |
| | |
| | | }
|
| | | private void OnRealmButton()
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmWin>();
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<RealmTransitionWin>();
|
| | | //WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | }
|
| | |
|
| | | void MailButton()//邮件按钮
|
| | |
| | | }
|
| | | }
|
| | | m_EffectBoss.StopImediatly();
|
| | |
|
| | | StartLine(index);
|
| | |
|
| | |
|
| | | m_EffectLevelUp.StopImediatly();
|
| | |
| | | yield return WaitingForSecondConst.GetWaitForSeconds(effectTime);
|
| | | }
|
| | |
|
| | | if (index != -1)
|
| | | {
|
| | | m_EffectLines[index].Play();
|
| | | var animator = m_EffectLines[index].target.GetAnimator();
|
| | | animator.Play("open", 0, 0);
|
| | | yield return WaitingForSecondConst.WaitMS500;
|
| | | animator.Play("idle", 0);
|
| | | }
|
| | | var realmStage = GetRealmStageBeha(index + 1);
|
| | | if (realmStage != null)
|
| | | {
|
| | | realmStage.DisplayEffect(true);
|
| | | }
|
| | | yield return WaitingForSecondConst.WaitMS500;
|
| | |
|
| | | if (index == 3 && model.displayRealmLevel < model.realmMaxLevel)
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | void StartLine(int index)
|
| | | {
|
| | | if (index != -1)
|
| | | {
|
| | | StartCoroutine(Co_StartLine(index));
|
| | | }
|
| | | else
|
| | | {
|
| | | var realmStage = GetRealmStageBeha(index + 1);
|
| | | if (realmStage != null)
|
| | | {
|
| | | realmStage.DisplayEffect(true);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator Co_StartLine(int index)
|
| | | {
|
| | | m_EffectLines[index].Play();
|
| | | var animator = m_EffectLines[index].target.GetAnimator();
|
| | | animator.Play("open", 0, 0);
|
| | | yield return WaitingForSecondConst.WaitMS500;
|
| | | animator.Play("idle", 0);
|
| | |
|
| | | var realmStage = GetRealmStageBeha(index + 1);
|
| | | if (realmStage != null)
|
| | | {
|
| | | realmStage.DisplayEffect(true);
|
| | | }
|
| | | }
|
| | |
|
| | | void StartRotate()
|
| | | {
|
| | | rotating = true;
|
| | |
| | | StopCoroutine(m_RotateCoroutine);
|
| | | }
|
| | | m_RotateCoroutine = StartCoroutine(Co_Rotate());
|
| | | }
|
| | |
|
| | | public void StartBossEffectShow()
|
| | | {
|
| | | StartCoroutine(Co_BossEffectShow());
|
| | | }
|
| | |
|
| | | IEnumerator Co_BossEffectShow()
|
| | | {
|
| | | isPlayingBossEffect = true;
|
| | | m_EffectBoss.Play();
|
| | | m_EffectBossWord.Play();
|
| | | Animator animator = null;
|
| | | if (m_EffectBoss.target != null)
|
| | | {
|
| | | animator = m_EffectBoss.target.GetAnimator();
|
| | | animator.Play("Effect_JingJieBJ_02", 0, 0);
|
| | | }
|
| | |
|
| | | if (m_EffectBase.target != null)
|
| | | {
|
| | | var obj = m_EffectBase.target.transform.Find("GameObject/b/b (3)");
|
| | | if (obj != null)
|
| | | {
|
| | | obj.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | yield return WaitingForSecondConst.GetWaitForSeconds(m_CoverDisappearTime);
|
| | | if (m_EffectCover.IsPlaying)
|
| | | {
|
| | | m_EffectCover.StopImediatly();
|
| | | }
|
| | | yield return WaitingForSecondConst.GetWaitForSeconds(2f - m_CoverDisappearTime);
|
| | |
|
| | | isPlayingBossEffect = false;
|
| | |
|
| | | if (onBossAppearComplete != null)
|
| | | {
|
| | | onBossAppearComplete();
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator Co_Rotate()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void StartBossEffectShow()
|
| | | {
|
| | | StartCoroutine(Co_BossEffectShow());
|
| | | }
|
| | |
|
| | | IEnumerator Co_BossEffectShow()
|
| | | {
|
| | | isPlayingBossEffect = true;
|
| | | m_EffectBoss.Play();
|
| | | m_EffectBossWord.Play();
|
| | | Animator animator = null;
|
| | | if (m_EffectBoss.target != null)
|
| | | {
|
| | | animator = m_EffectBoss.target.GetAnimator();
|
| | | animator.Play("Effect_JingJieBJ_02", 0, 0);
|
| | | }
|
| | |
|
| | | if (m_EffectBase.target != null)
|
| | | {
|
| | | var obj = m_EffectBase.target.transform.Find("GameObject/b/b (3)");
|
| | | if (obj != null)
|
| | | {
|
| | | obj.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | yield return WaitingForSecondConst.GetWaitForSeconds(m_CoverDisappearTime);
|
| | | if (m_EffectCover.IsPlaying)
|
| | | {
|
| | | m_EffectCover.StopImediatly();
|
| | | }
|
| | | yield return WaitingForSecondConst.GetWaitForSeconds(2f - m_CoverDisappearTime);
|
| | |
|
| | | isPlayingBossEffect = false;
|
| | |
|
| | | if (onBossAppearComplete != null)
|
| | | {
|
| | | onBossAppearComplete();
|
| | | }
|
| | | }
|
| | |
|
| | | public void Dispose()
|
| | | {
|
| | | rotating = false;
|
| | |
| | | SysNotifyMgr.Instance.ShowTip("RealmLevelUpError_2");
|
| | | break;
|
| | | case 3:
|
| | | SysNotifyMgr.Instance.ShowTip("RealmLevelUpError_3");
|
| | | var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(config.NeedGood);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | List<List<int>> m_RealmStages = new List<List<int>>();
|
| | | public int realmMaxLevel { get; private set; }
|
| | | public bool isBossPass { get; private set; }
|
| | | public int realmExpTime { get; private set; }
|
| | | public long startExp { get; private set; }
|
| | |
|
| | | public long totalExp
|
| | | {
|
| | | get
|
| | | {
|
| | | var exp = startExp;
|
| | | var tick = (TimeUtility.ServerNow - expStartTime).Ticks;
|
| | | var singleTick = realmExpTime * TimeSpan.TicksPerSecond;
|
| | | var times = tick / singleTick;
|
| | |
|
| | | var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
|
| | | if (config != null && config.expRate != 0)
|
| | | {
|
| | | exp = times * config.expRate + startExp;
|
| | | exp = exp > config.expLimit ? config.expLimit : exp;
|
| | | }
|
| | |
|
| | | return exp;
|
| | | }
|
| | | }
|
| | |
|
| | | public DateTime expStartTime { get; private set; }
|
| | |
|
| | | public const int REALM_DUNGEON_ID = 31110;
|
| | |
|
| | |
| | | }
|
| | |
|
| | | public event Action selectRealmRefresh;
|
| | | public event Action realmExpRefresh;
|
| | |
|
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | |
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | isBossPass = false;
|
| | | expStartTime = DateTime.Now;
|
| | | startExp = 0;
|
| | | SysNotifyMgr.Instance.OnSystemNotifyEvent -= OnSystemNotifyEvent;
|
| | | }
|
| | |
|
| | |
| | | m_RealmPreviewEquips.Add(config.Lv, dict);
|
| | | }
|
| | | }
|
| | |
|
| | | var funcConfig = FuncConfigConfig.Get("RealmExpTime");
|
| | | realmExpTime = int.Parse(funcConfig.Numerical1);
|
| | | }
|
| | |
|
| | | public bool TryGetRealmProperty(int level, out Dictionary<int, int> propertyDict)
|
| | |
| | | RefreshRedpoint();
|
| | | }
|
| | |
|
| | | public void ReceivePackage(HA327_tagMCRealmExpInfo package)
|
| | | {
|
| | | expStartTime = TimeUtility.GetTime(package.BeginTime);
|
| | | startExp = (long)package.CurExpPoint * Constants.ExpPointValue + package.CurExp;
|
| | | if (realmExpRefresh != null)
|
| | | {
|
| | | realmExpRefresh();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage))
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<RealmWin>();
|
| | | WindowCenter.Instance.Open<RealmTransitionWin>();
|
| | | }
|
| | |
|
| | | void RefreshRedpoint()
|
| New file |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class RealmPoolBehaviour : MonoBehaviour
|
| | | {
|
| | | [SerializeField] ImageEx m_Bottom;
|
| | | [SerializeField] ImageEx m_Word;
|
| | | [SerializeField] Transform m_Lock;
|
| | | [SerializeField] Text m_Progress;
|
| | | [SerializeField] Button m_TakeExp;
|
| | |
|
| | | int realmLevel = 0;
|
| | |
|
| | | RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
|
| | |
|
| | | private void Awake()
|
| | | {
|
| | | m_TakeExp.AddListener(TakeExp);
|
| | | }
|
| | |
|
| | | public void Display(int realmLevel)
|
| | | {
|
| | | this.realmLevel = realmLevel;
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | var isOpen = config.expRate != 0;
|
| | | m_Bottom.gray = !isOpen;
|
| | | m_Word.gray = !isOpen;
|
| | | m_Lock.gameObject.SetActive(!isOpen);
|
| | | m_Progress.gameObject.SetActive(isOpen);
|
| | |
|
| | | if (isOpen)
|
| | | {
|
| | | DisplayProgress();
|
| | | }
|
| | |
|
| | | model.realmExpRefresh -= RealmExpRefresh;
|
| | | model.realmExpRefresh += RealmExpRefresh;
|
| | |
|
| | | GlobalTimeEvent.Instance.secondEvent -= PerSecond;
|
| | | GlobalTimeEvent.Instance.secondEvent += PerSecond;
|
| | |
|
| | | }
|
| | |
|
| | | public void DisplayProgress()
|
| | | {
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | var progress = Mathf.Clamp01((float)model.totalExp / config.expLimit);
|
| | | var progressInt = (int)(progress * 100);
|
| | | m_Progress.text = StringUtility.Contact(progressInt, "%");
|
| | | }
|
| | |
|
| | | private void TakeExp()
|
| | | {
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | var isOpen = config.expRate != 0;
|
| | | if (isOpen)
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmTakeExpWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | private void PerSecond()
|
| | | {
|
| | | DisplayProgress();
|
| | | }
|
| | |
|
| | | private void RealmExpRefresh()
|
| | | {
|
| | | DisplayProgress();
|
| | | }
|
| | |
|
| | | public void Dispose()
|
| | | {
|
| | | model.realmExpRefresh -= RealmExpRefresh;
|
| | | GlobalTimeEvent.Instance.secondEvent -= PerSecond;
|
| | | }
|
| | | }
|
| | | } |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b9403989db1c1064c883f333eee2dec5 |
| | | timeCreated: 1553052486 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Wednesday, March 20, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class RealmTakeExpWin : Window
|
| | | {
|
| | | [SerializeField] Text m_TotalExp;
|
| | | [SerializeField] Text m_ExpRate;
|
| | | [SerializeField] Button m_TakeExp;
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | RealmModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<RealmModel>(); }
|
| | | }
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_TakeExp.AddListener(TakeExp);
|
| | | m_Close.AddListener(CloseClick);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | Display();
|
| | | GlobalTimeEvent.Instance.secondEvent += PerSecond;
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent -= PerSecond;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | |
|
| | | void Display()
|
| | | {
|
| | | DisplayExp();
|
| | | DisplayRate();
|
| | | }
|
| | |
|
| | | void DisplayExp()
|
| | | {
|
| | | var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
|
| | | var expLabel = UIHelper.ReplaceLargeNum(model.totalExp);
|
| | | var expLimitLabel = UIHelper.ReplaceLargeNum(config.expLimit);
|
| | | m_TotalExp.text = StringUtility.Contact(expLabel, "/", expLimitLabel);
|
| | | }
|
| | |
|
| | | void DisplayRate()
|
| | | {
|
| | | var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
|
| | | m_ExpRate.text = Language.Get("RealmExpRate", model.realmExpTime, UIHelper.ReplaceLargeNum(config.expRate));
|
| | | }
|
| | |
|
| | | private void PerSecond()
|
| | | {
|
| | | DisplayExp();
|
| | | }
|
| | |
|
| | | private void TakeExp()
|
| | | {
|
| | | CA521_tagCMTakeOutRealmExp pak = new CA521_tagCMTakeOutRealmExp();
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 37d48d8cfc34fd04995fc93fbfdaf43a |
| | | timeCreated: 1553067471 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Wednesday, March 20, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class RealmTransitionWin : Window
|
| | | {
|
| | | [SerializeField] UIAlphaTween m_AlphaTween;
|
| | | [SerializeField] Transform m_ContainerProgress;
|
| | | [SerializeField] Image m_Progress;
|
| | | [SerializeField, Header("进度时长"), Range(0.1f, 5f)] float m_Duration = 0.8f;
|
| | |
|
| | | float timer = 0f;
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | timer = 0f;
|
| | | m_Progress.fillAmount = 0f;
|
| | | m_ContainerProgress.gameObject.SetActive(true);
|
| | | m_AlphaTween.SetStartState();
|
| | | WindowCenter.Instance.windowBeforeOpenEvent += WindowBeforeOpenEvent;
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | if (!CameraController.Instance.IsPlayingAnim)
|
| | | {
|
| | | CameraController.Instance.PlayAnimationClipUnLimit("RealmFuncOpen");
|
| | | }
|
| | | m_AlphaTween.Play(OnTweenComplete);
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | WindowCenter.Instance.windowBeforeOpenEvent -= WindowBeforeOpenEvent;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void LateUpdate()
|
| | | {
|
| | | base.LateUpdate();
|
| | | if (m_Progress.fillAmount <= 1f)
|
| | | {
|
| | | var progress = Mathf.Clamp01(timer / m_Duration);
|
| | | m_Progress.fillAmount = progress;
|
| | | }
|
| | | timer += Time.deltaTime;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | private void WindowBeforeOpenEvent(Window window)
|
| | | {
|
| | | if (window is RealmWin)
|
| | | {
|
| | | m_AlphaTween.Play(OnTweenBackComplete);
|
| | | m_AlphaTween.SetEndState();
|
| | | m_AlphaTween.reversal = true;
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnTweenBackComplete()
|
| | | {
|
| | | CloseImmediately();
|
| | | }
|
| | |
|
| | | private void OnTweenComplete()
|
| | | {
|
| | | m_ContainerProgress.gameObject.SetActive(false);
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<RealmWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 8ccced4a0d2a10b4e868fc8896afbcba |
| | | timeCreated: 1553060356 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | [SerializeField] Transform m_ContainerRealmUp;
|
| | | [SerializeField] RealmBriefBehaviour m_RealmBrief;
|
| | | [SerializeField] RealmLevelUpBehaviour m_RealmLevelUp;
|
| | | [SerializeField] RealmPoolBehaviour m_RealmPool;
|
| | | [SerializeField] RealmAnimationBehaviour m_RealmAnimation;
|
| | | [SerializeField] RealmStageBehaviour[] m_RealmStages;
|
| | | [SerializeField] Transform m_ContainerUnlockEquip;
|
| | |
| | | DisplayRealmLevelUp();
|
| | | DisplayRealmStages();
|
| | | DisplayRealmBrief();
|
| | | DisplayRealmPool();
|
| | | DisplayUnlockEquip();
|
| | | DisplayCover();
|
| | |
|
| | |
| | | m_RealmBriefTween.SetEndState();
|
| | | m_RealmLevelUpTween.Stop();
|
| | | m_RealmLevelUpTween.SetEndState();
|
| | | m_RealmPool.Dispose();
|
| | | model.displayRealms.Clear();
|
| | | foreach (var item in m_RealmStages)
|
| | | {
|
| | |
| | | void DisplayRealmBrief()
|
| | | {
|
| | | m_RealmBrief.Display(model.selectRealm);
|
| | | }
|
| | |
|
| | | void DisplayRealmPool()
|
| | | {
|
| | | m_RealmPool.Display(model.displayRealmLevel);
|
| | | }
|
| | |
|
| | | void DisplayUnlockEquip()
|
| | |
| | | model.displayRealms.Clear();
|
| | | model.selectRealm = PlayerDatas.Instance.baseData.realmLevel + 1;
|
| | | DisplayRealmStages();
|
| | | DisplayRealmPool();
|
| | | DisplayCover();
|
| | | DisplayEffectBoss();
|
| | | }
|
| | |
| | | {
|
| | | TryStartAnimation();
|
| | | }
|
| | |
|
| | | DisplayRealmPool();
|
| | | }
|
| | |
|
| | | private void OnLevelUpComplete()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | DisplayRealmPool();
|
| | |
|
| | | if (customUpPower > 0)
|
| | | {
|
| | | mainDateModel.CustomPowerUp((int)customUpPower);
|