少年修仙传客户端代码仓库
client_linchunjie
2019-03-21 0780d6f78efd25030fdbb0701a14d43d73a0ebe2
Merge branch 'master' into Rune
12个文件已添加
22个文件已修改
1016 ■■■■ 已修改文件
Core/Camera/CameraController.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/DataToCtl/PackageRegedit.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/RealmConfig.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/RealmConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA521_tagCMTakeOutRealmExp.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA521_tagCMTakeOutRealmExp.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA327_tagMCRealmExpInfo.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA327_tagMCRealmExpInfo.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HA3_Function/HA327_tagMCRealmExpInfo.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HA3_Function/HA327_tagMCRealmExpInfo.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActorPlayerBase.cs 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Auction/AuctionHelpModel.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Auction/FullServiceAuctionWin.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Auction/FullServiceAuctioncell.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Equip/EquipModel.cs 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Equip/EquipSuitPropertyWidget.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Equip/RealmEquipWin.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipGem/EquipEvolutionWin.cs 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ItemTip/EquipTipUtility.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemLogicUtility.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemTipsModel.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/SelectBoxItemCell.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/SinglePack.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/ChatFrame.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmAnimationBehaviour.cs 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmLevelUpBehaviour.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmModel.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmPoolBehaviour.cs 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmPoolBehaviour.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmTakeExpWin.cs 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmTakeExpWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmTransitionWin.cs 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmTransitionWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmWin.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/Camera/CameraController.cs
@@ -103,6 +103,16 @@
        }
    }
    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;
Core/GameEngine/DataToCtl/PackageRegedit.cs
@@ -25,6 +25,7 @@
    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));
Core/GameEngine/Model/Config/RealmConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:           Fish
//    [  Date ]:           Thursday, March 14, 2019
//    [  Date ]:           Wednesday, March 20, 2019
//--------------------------------------------------------
using System.Collections.Generic;
@@ -21,6 +21,8 @@
    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;
@@ -65,19 +67,23 @@
            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)
        {
Core/GameEngine/Model/Config/RealmConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: d49ca04ff4a91bc4fb645c417f9ef0b3
timeCreated: 1552548022
timeCreated: 1553061533
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA521_tagCMTakeOutRealmExp.cs
New file
@@ -0,0 +1,16 @@
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 () {
    }
}
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA521_tagCMTakeOutRealmExp.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 60efa2ae65f837242a25ff4bbb5b456b
timeCreated: 1553064966
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA327_tagMCRealmExpInfo.cs
New file
@@ -0,0 +1,24 @@
//--------------------------------------------------------
//    [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);
    }
}
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA327_tagMCRealmExpInfo.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: bbfa3dbab2a4c2b4fae460fc3830c1a6
timeCreated: 1553065107
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/ServerPack/HA3_Function/HA327_tagMCRealmExpInfo.cs
New file
@@ -0,0 +1,21 @@
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);
    }
}
Core/NetworkPackage/ServerPack/HA3_Function/HA327_tagMCRealmExpInfo.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: cd9074b87c2c7b540b6dfa2ff01c3b0e
timeCreated: 1553065068
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Fight/GameActor/GActorPlayerBase.cs
@@ -591,9 +591,9 @@
            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)
@@ -602,15 +602,15 @@
            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;
            }
@@ -708,14 +708,15 @@
        {
            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)
@@ -724,15 +725,15 @@
            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;
            }
@@ -795,7 +796,7 @@
                }
            }
            if (m_EquipDict.ContainsKey((int)RoleEquipType.FashionWeapon2))
            if (apperance.fashionSecondary != 0)
            {
                SwitchHand(true);
            }
@@ -949,7 +950,7 @@
            return;
        }
        EquipInfo _equipInfo;
        var apperance = ModelCenter.Instance.GetModel<EquipModel>().GetAppearance();
        // 换装ID
        int _resID = JobSetup.BaseEquip[0];
@@ -961,15 +962,15 @@
            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;
            }
@@ -1134,13 +1135,13 @@
        // 决定副手逻辑
        // 如果当前是时装副手, 则装备时装手臂
        // 如果当前是普通副手, 则卸下手臂
        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);
            }
@@ -1306,20 +1307,16 @@
        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;
System/Auction/AuctionHelpModel.cs
@@ -48,6 +48,12 @@
            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");
@@ -186,6 +192,10 @@
            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;
System/Auction/FullServiceAuctionWin.cs
@@ -26,11 +26,12 @@
        [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;
@@ -48,25 +49,28 @@
        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()
@@ -77,7 +81,7 @@
            model.BiddingItemInfoUpdate -= BiddingItemInfoUpdate;//竞价物品信息刷新
            GlobalTimeEvent.Instance.secondEvent -= secondEvent;
        }
        protected override void OnAfterClose()
        {
        }
@@ -85,6 +89,11 @@
        private void secondEvent()
        {
            Times += 1;
            if (Times >= 3 && auctionHelpModel.isOpenPanel)
            {
                auctionHelpModel.isOpenPanel = false;
            }
            if (IsSendBool)
            {
                IsSendBool = false;
@@ -105,7 +114,7 @@
        }
        private void BiddingItemInfoUpdate()
        {
        }
        private void OnClickJobTipBtn()
        {
@@ -118,7 +127,7 @@
        }
        private void OnCreateGridLineCell(ScrollerController gridCtrl)
        {
            gridCtrl.Refresh();
            for (int i = 0; i < auctionHelpModel.FullServiceAuctionList.Count; i++)
            {
@@ -172,7 +181,7 @@
            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++)
@@ -200,7 +209,7 @@
                    if (index != config.JobEntry)
                    {
                        auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].JobEntry = index;
                        IsSendBool = true;
                        IsSendBool = true;
                        SetTipText();
                    }
                });
@@ -217,7 +226,7 @@
            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++)
@@ -245,7 +254,7 @@
                    if (index != config.TypeEntry)
                    {
                        auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].TypeEntry = index;
                        IsSendBool=true;
                        IsSendBool = true;
                        SetTipText();
                    }
                });
@@ -271,9 +280,9 @@
            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);
            }
@@ -297,14 +306,14 @@
            {
                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))
@@ -323,7 +332,7 @@
            }
        }
        private void  ListSort()
        private void ListSort()
        {
            FullServiceAuctionListSort.Clear();
            var sendNumber = AuctionInquiry.Instance.GetSendNumber();
@@ -343,7 +352,7 @@
                    {
                        FullServiceAuctionListSort.Add(vlaue);
                    }
                }
                }
            }
            FullServiceAuctionListSort.Sort(Compare);
        }
@@ -360,7 +369,7 @@
            if (havex1.CompareTo(havey1) != 0)//是否参与
            {
                return -havex1.CompareTo(havey1);
            }
            }
            return 1;
        }
        private bool IsHighestPrice(string GUID)
@@ -383,7 +392,7 @@
                isBool = true;
            }
            return isBool;
        }
        }
    }
}
System/Auction/FullServiceAuctioncell.cs
@@ -55,7 +55,7 @@
            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;
@@ -64,7 +64,7 @@
            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;
System/Equip/EquipModel.cs
@@ -7,7 +7,7 @@
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 };
@@ -15,6 +15,9 @@
            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();
@@ -26,6 +29,9 @@
        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>();
@@ -52,6 +58,25 @@
            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--)
@@ -64,6 +89,20 @@
            }
            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)
@@ -146,6 +185,8 @@
            suitPlaces.Clear();
            candidateEquips.Clear();
            getWays.Clear();
            suitPlaceCollectEffects.Clear();
            suitActive.value = default(EquipSuitActive);
        }
        private void RefreshCandidateEquips(int level)
@@ -419,6 +460,40 @@
            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)
@@ -441,6 +516,10 @@
            {
                case PackType.Item:
                    UpdateRedpoints();
                    if (selectedLevel.value > 0)
                    {
                        RefreshCandidateEquips(selectedLevel.value);
                    }
                    break;
                case PackType.Equip:
                    foreach (var set in equipSets.Values)
@@ -591,6 +670,7 @@
        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)));
@@ -598,6 +678,10 @@
                if (hasSuit)
                {
                    suitPlaces.Add(i);
                    if (!IsSuitPlaceEffectPlayed(new Int2(level, i)))
                    {
                        suitPlaceCollectEffects.Add(i);
                    }
                }
            }
        }
@@ -606,6 +690,7 @@
        {
            var property = new EquipSuitProperty();
            property.star = star;
            property.twoSuit = GetEquipSuitEntry(level, star, EquipSuitType.TwoSuit);
            property.fiveSuit = GetEquipSuitEntry(level, star, EquipSuitType.FiveSuit);
@@ -621,6 +706,26 @@
            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()
@@ -714,11 +819,22 @@
    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;
    }
}
System/Equip/EquipSuitPropertyWidget.cs
@@ -15,14 +15,22 @@
        [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);
@@ -41,6 +49,15 @@
            }
        }
        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);
@@ -51,6 +68,27 @@
            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()
        {
System/Equip/RealmEquipWin.cs
@@ -50,12 +50,14 @@
        {
            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()
@@ -129,6 +131,16 @@
            {
                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()
System/EquipGem/EquipEvolutionWin.cs
@@ -25,6 +25,7 @@
        [SerializeField] RichText m_TextAttributesA;
        [SerializeField] RichText m_TextAttributesB;
        [SerializeField] ItemCell m_ItemCell;
        [SerializeField] RichText m_ItemCount;
        [SerializeField] GameObject m_AdvancedObj;
        [SerializeField] GameObject m_FullLevelObj;
@@ -33,6 +34,7 @@
        #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()
        {
@@ -91,18 +93,75 @@
            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)
        {
System/ItemTip/EquipTipUtility.cs
@@ -377,7 +377,7 @@
                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;
@@ -409,7 +409,7 @@
                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;
System/KnapSack/Logic/ItemLogicUtility.cs
@@ -22,7 +22,6 @@
        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>(); } }
@@ -701,7 +700,7 @@
                return;
            }
            if (!IsSameJob(item.config.JobLimit))
            if (!IsJobCompatibleItem(item.itemId))
            {
                return;
            }
@@ -736,11 +735,6 @@
                    SetGetBetterEquipEvent(item);
                    break;
            }
        }
        bool IsSameJob(int jobLimit)
        {
            return jobLimit == 0 || jobLimit / 100 == PlayerDatas.Instance.baseData.Job;
        }
        private void SetGetBetterEquipEvent(ItemModel model)
@@ -1422,12 +1416,12 @@
        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;
            }
@@ -1438,7 +1432,7 @@
        public bool IsWing(int itemId)
        {
            if (ItemConfig.Has(itemId))
            if (!ItemConfig.Has(itemId))
            {
                return false;
            }
@@ -1448,7 +1442,7 @@
        public bool IsDogzEquip(int itemId)
        {
            if (ItemConfig.Has(itemId))
            if (!ItemConfig.Has(itemId))
            {
                return false;
            }
System/KnapSack/Logic/ItemTipsModel.cs
@@ -461,8 +461,7 @@
            }
            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;
System/KnapSack/Logic/SelectBoxItemCell.cs
@@ -25,7 +25,6 @@
        private void Awake()
        {
            ChooseItemWin.RefreshChooseCellAct += RefreshChooseImage;
        }
        public void InitModel(int id)
System/KnapSack/Logic/SinglePack.cs
@@ -108,7 +108,7 @@
                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)
System/MainInterfacePanel/ChatFrame.cs
@@ -330,8 +330,8 @@
        }
        private void OnRealmButton()
        {
            WindowCenter.Instance.Open<RealmWin>();
            WindowCenter.Instance.Close<MainInterfaceWin>();
            WindowCenter.Instance.Open<RealmTransitionWin>();
            //WindowCenter.Instance.Close<MainInterfaceWin>();
        }
        void MailButton()//邮件按钮
System/Realm/RealmAnimationBehaviour.cs
@@ -123,6 +123,8 @@
                }
            }
            m_EffectBoss.StopImediatly();
            StartLine(index);
            
            m_EffectLevelUp.StopImediatly();
@@ -145,19 +147,6 @@
                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)
@@ -192,6 +181,37 @@
            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;
@@ -200,46 +220,6 @@
                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()
@@ -308,6 +288,46 @@
            }
        }
        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;
System/Realm/RealmLevelUpBehaviour.cs
@@ -91,7 +91,8 @@
                    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;
            }
        }
System/Realm/RealmModel.cs
@@ -15,6 +15,30 @@
        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;
@@ -57,6 +81,7 @@
        }
        public event Action selectRealmRefresh;
        public event Action realmExpRefresh;
        EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
        PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
@@ -73,6 +98,8 @@
        public void OnBeforePlayerDataInitialize()
        {
            isBossPass = false;
            expStartTime = DateTime.Now;
            startExp = 0;
            SysNotifyMgr.Instance.OnSystemNotifyEvent -= OnSystemNotifyEvent;
        }
@@ -148,6 +175,9 @@
                    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)
@@ -321,6 +351,16 @@
            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))
@@ -397,7 +437,7 @@
            {
                return;
            }
            WindowCenter.Instance.Open<RealmWin>();
            WindowCenter.Instance.Open<RealmTransitionWin>();
        }
        void RefreshRedpoint()
System/Realm/RealmPoolBehaviour.cs
New file
@@ -0,0 +1,84 @@
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;
        }
    }
}
System/Realm/RealmPoolBehaviour.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b9403989db1c1064c883f333eee2dec5
timeCreated: 1553052486
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Realm/RealmTakeExpWin.cs
New file
@@ -0,0 +1,94 @@
//--------------------------------------------------------
//    [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);
        }
    }
}
System/Realm/RealmTakeExpWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 37d48d8cfc34fd04995fc93fbfdaf43a
timeCreated: 1553067471
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Realm/RealmTransitionWin.cs
New file
@@ -0,0 +1,103 @@
//--------------------------------------------------------
//    [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>();
        }
    }
}
System/Realm/RealmTransitionWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 8ccced4a0d2a10b4e868fc8896afbcba
timeCreated: 1553060356
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Realm/RealmWin.cs
@@ -17,6 +17,7 @@
        [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;
@@ -171,6 +172,7 @@
            DisplayRealmLevelUp();
            DisplayRealmStages();
            DisplayRealmBrief();
            DisplayRealmPool();
            DisplayUnlockEquip();
            DisplayCover();
@@ -196,6 +198,7 @@
            m_RealmBriefTween.SetEndState();
            m_RealmLevelUpTween.Stop();
            m_RealmLevelUpTween.SetEndState();
            m_RealmPool.Dispose();
            model.displayRealms.Clear();
            foreach (var item in m_RealmStages)
            {
@@ -251,6 +254,11 @@
        void DisplayRealmBrief()
        {
            m_RealmBrief.Display(model.selectRealm);
        }
        void DisplayRealmPool()
        {
            m_RealmPool.Display(model.displayRealmLevel);
        }
        void DisplayUnlockEquip()
@@ -402,6 +410,7 @@
                model.displayRealms.Clear();
                model.selectRealm = PlayerDatas.Instance.baseData.realmLevel + 1;
                DisplayRealmStages();
                DisplayRealmPool();
                DisplayCover();
                DisplayEffectBoss();
            }
@@ -445,6 +454,8 @@
            {
                TryStartAnimation();
            }
            DisplayRealmPool();
        }
        private void OnLevelUpComplete()
@@ -473,6 +484,8 @@
                }
            }
            DisplayRealmPool();
            if (customUpPower > 0)
            {
                mainDateModel.CustomPowerUp((int)customUpPower);