少年修仙传客户端代码仓库
client_Wu Xijin
2019-03-20 6a7dd7ee0be86d7fc523f3c9e7f3058bdfbec1df
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
12个文件已修改
8个文件已添加
582 ■■■■ 已修改文件
Core/Camera/CameraController.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/DataToCtl/PackageRegedit.cs 1 ●●●● 补丁 | 查看 | 原始文档 | 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 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Auction/FullServiceAuctionWin.cs 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Auction/FullServiceAuctioncell.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmAnimationBehaviour.cs 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmLevelUpBehaviour.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmModel.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmPoolBehaviour.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmTakeExpWin.cs 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmTakeExpWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmTransitionWin.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | 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/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");
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,7 +49,10 @@
        protected override void OnPreOpen()
        {
            IsSendBool = false;
            Times = 0;
            auctionHelpModel.isOpenPanel = true;
            IsSendBool = false;
            GlobalTimeEvent.Instance.secondEvent += secondEvent;
            model.FullServiceAuctionUpdate += FullServiceAuctionUpdate;//数据请求刷新
            model.RefreshAuctionItemUpdate += RefreshAuctionItemUpdate;//刷新
            model.ClearAuctionUpdate += ClearAuctionUpdate;//清除
@@ -58,14 +62,15 @@
            ListSort();
            OnCreateGridLineCell(m_ScrollerController);
            OnCreateGridLineCellJob(m_ScrollerControllerJob);
            OnCreateGridLineCellType(m_ScrollerControllerType);
            OnCreateGridLineCellType(m_ScrollerControllerType);
            OnCreateGridLineCellItem(m_ScrollerControllerItem);
            SetTipText();
        }
        protected override void OnAfterOpen()
        {
            GlobalTimeEvent.Instance.secondEvent += secondEvent;
        }
        protected override void OnPreClose()
@@ -76,7 +81,7 @@
            model.BiddingItemInfoUpdate -= BiddingItemInfoUpdate;//竞价物品信息刷新
            GlobalTimeEvent.Instance.secondEvent -= secondEvent;
        }
        protected override void OnAfterClose()
        {
        }
@@ -84,6 +89,11 @@
        private void secondEvent()
        {
            Times += 1;
            if (Times >= 3 && auctionHelpModel.isOpenPanel)
            {
                auctionHelpModel.isOpenPanel = false;
            }
            if (IsSendBool)
            {
                IsSendBool = false;
@@ -104,7 +114,7 @@
        }
        private void BiddingItemInfoUpdate()
        {
        }
        private void OnClickJobTipBtn()
        {
@@ -117,7 +127,7 @@
        }
        private void OnCreateGridLineCell(ScrollerController gridCtrl)
        {
            gridCtrl.Refresh();
            for (int i = 0; i < auctionHelpModel.FullServiceAuctionList.Count; i++)
            {
@@ -171,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++)
@@ -199,7 +209,7 @@
                    if (index != config.JobEntry)
                    {
                        auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].JobEntry = index;
                        IsSendBool = true;
                        IsSendBool = true;
                        SetTipText();
                    }
                });
@@ -216,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++)
@@ -244,7 +254,7 @@
                    if (index != config.TypeEntry)
                    {
                        auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].TypeEntry = index;
                        IsSendBool=true;
                        IsSendBool = true;
                        SetTipText();
                    }
                });
@@ -270,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);
            }
@@ -296,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))
@@ -322,7 +332,7 @@
            }
        }
        private void  ListSort()
        private void ListSort()
        {
            FullServiceAuctionListSort.Clear();
            var sendNumber = AuctionInquiry.Instance.GetSendNumber();
@@ -342,7 +352,7 @@
                    {
                        FullServiceAuctionListSort.Add(vlaue);
                    }
                }
                }
            }
            FullServiceAuctionListSort.Sort(Compare);
        }
@@ -359,7 +369,7 @@
            if (havex1.CompareTo(havey1) != 0)//是否参与
            {
                return -havex1.CompareTo(havey1);
            }
            }
            return 1;
        }
        private bool IsHighestPrice(string GUID)
@@ -382,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/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))
System/Realm/RealmPoolBehaviour.cs
@@ -1,4 +1,5 @@
using System.Collections;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
@@ -11,12 +12,72 @@
        [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/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
@@ -17,7 +17,7 @@
        [SerializeField] UIAlphaTween m_AlphaTween;
        [SerializeField] Transform m_ContainerProgress;
        [SerializeField] Image m_Progress;
        [SerializeField, Header("进入时间"), Range(0.1f, 5f)] float m_Duration = 1f;
        [SerializeField, Header("进度时长"), Range(0.1f, 5f)] float m_Duration = 0.8f;
        float timer = 0f;
        #region Built-in
@@ -41,7 +41,11 @@
        protected override void OnActived()
        {
            base.OnActived();
            StartCoroutine(Co_Enter());
            if (!CameraController.Instance.IsPlayingAnim)
            {
                CameraController.Instance.PlayAnimationClipUnLimit("RealmFuncOpen");
            }
            m_AlphaTween.Play(OnTweenComplete);
        }
        protected override void OnAfterOpen()
@@ -51,7 +55,6 @@
        protected override void OnPreClose()
        {
            WindowCenter.Instance.windowBeforeOpenEvent -= WindowBeforeOpenEvent;
            StopAllCoroutines();
        }
        protected override void OnAfterClose()
@@ -61,7 +64,7 @@
        protected override void LateUpdate()
        {
            base.LateUpdate();
            if (m_Progress.fillAmount <= m_Duration)
            if (m_Progress.fillAmount <= 1f)
            {
                var progress = Mathf.Clamp01(timer / m_Duration);
                m_Progress.fillAmount = progress;
@@ -69,13 +72,6 @@
            timer += Time.deltaTime;
        }
        #endregion
        IEnumerator Co_Enter()
        {
            yield return WaitingForSecondConst.GetWaitForSeconds(m_Duration);
            CameraController.Instance.PlayAnimationClip("RealmFuncOpen");
            m_AlphaTween.Play(OnTweenComplete);
        }
        private void WindowBeforeOpenEvent(Window window)
        {
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);