少年修仙传客户端代码仓库
client_Wu Xijin
2018-08-20 4cbd2c727f93280bdf181ea223873c7580537155
Merge branch 'master' into DogzDungeon
6个文件已修改
208 ■■■■■ 已修改文件
System/ClientVersion/VersionConfig.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/ActivateShow.cs 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmPropertyUpWin.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureCollectBriefInfoBehaviour.cs 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulModel.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ClientVersion/VersionConfig.cs
@@ -10,7 +10,7 @@
[CreateAssetMenu(menuName = "Config/VersionConfig")]
public class VersionConfig : ScriptableObject
{
    public const string VERSION_ALTERNATIVE = "1.0.15";
    public const string VERSION_ALTERNATIVE = "0.0.0";
    [SerializeField] public string m_AppId = string.Empty;
    public string appId { get { return m_AppId; } }
System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs
@@ -92,18 +92,11 @@
            if (m_Realm != null)
            {
                if (_realm > 0)
                {
                    m_Realm.gameObject.SetActive(true);
                    var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
                    if (realmConfig != null)
                    {
                        m_Realm.SetSprite(realmConfig.Img);
                    }
                }
                else
                {
                    m_Realm.gameObject.SetActive(false);
                }
            }
        }
System/Realm/ActivateShow.cs
@@ -14,6 +14,7 @@
        public static int currentLv { get; private set; }
        public static int beforeLv { get; private set; }
        public static int godWeaponType { get; private set; }
        public static int treasureSoulId { get; private set; }
        private static Dictionary<int, int> propertyUpDict = new Dictionary<int, int>();
@@ -177,6 +178,90 @@
        }
        public static void TreasureSoulGetReward(int id, int _beforeLevel, int _currentLevel)
        {
            activateType = ActivateFunc.TreasureSoul;
            treasureSoulId = id;
            propertyCompares.Clear();
            propertyUpDict.Clear();
            var model = ModelCenter.Instance.GetModel<TreasureSoulModel>();
            TreasureSpecialData special;
            if (model.TryGetTreasureSoul(treasureSoulId, out special))
            {
                switch (special.type)
                {
                    case TreasurePrivilege.StrengthenAdd:
                        var configs = ConfigManager.Instance.GetAllValues<ItemPlusSumAttrConfig>();
                        var before = -1;
                        var present = 0;
                        for (int i = 0; i < configs.Count; i++)
                        {
                            if (_beforeLevel >= configs[i].countNeed)
                            {
                                before = i;
                            }
                            if (_currentLevel >= configs[i].countNeed)
                            {
                                present = i;
                            }
                        }
                        ItemPlusSumAttrConfig _beforeConfig = null;
                        if (before >= 0 && before < configs.Count)
                        {
                            _beforeConfig = configs[before];
                        }
                        List<int> _beforeProperties = new List<int>();
                        if (_beforeConfig != null)
                        {
                            _beforeProperties.AddRange(_beforeConfig.attType);
                        }
                        var config = (present < 0 || present >= configs.Count) ? null : configs[present];
                        if (config == null)
                        {
                            return;
                        }
                        for (int i = 0; i < config.attType.Length; i++)
                        {
                            var _index = _beforeProperties.IndexOf(config.attType[i]);
                            if (_index == -1 || config.attValue[i] > _beforeConfig.attValue[_index])
                            {
                                propertyUpDict.Add(config.attType[i], config.attValue[i] -
                                    (_index == -1 ? 0 : _beforeConfig.attValue[_index]));
                                propertyCompares.Add(new PropertyCompare()
                                {
                                    key = config.attType[i],
                                    beforeValue = _index == -1 ? 0 : _beforeConfig.attValue[_index],
                                    currentValue = config.attValue[i]
                                });
                            }
                        }
                        break;
                    case TreasurePrivilege.DemonJarAtk:
                    case TreasurePrivilege.MountAtk:
                    case TreasurePrivilege.PetHp:
                    case TreasurePrivilege.Sp:
                        foreach (var _key in special.propertyDict.Keys)
                        {
                            var beforeValue = special.propertyDict[_key] * _beforeLevel / special.progress;
                            var nowValue = special.propertyDict[_key] * _currentLevel / special.progress;
                            propertyUpDict.Add(_key, nowValue - beforeValue);
                            propertyCompares.Add(new PropertyCompare()
                            {
                                key = _key,
                                beforeValue = beforeValue,
                                currentValue = nowValue
                            });
                        }
                        break;
                }
                fightPower = UIHelper.GetFightPower(propertyUpDict);
                if (!WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>())
                {
                    WindowCenter.Instance.Open<RealmPropertyUpWin>();
                }
            }
        }
        public static void PrepareSkillFly()
        {
            if (prepareFlySkillEvent != null)
@@ -198,6 +283,7 @@
            Realm,
            GodWeapon,
            Stove, //炼丹炉升级
            TreasureSoul,//法宝魂领取属性
        }
        public struct PropertyCompare
System/Realm/RealmPropertyUpWin.cs
@@ -39,6 +39,10 @@
        [SerializeField] RectTransform m_ContainerNewGotFly;
        [SerializeField] RectTransform m_ContainerTreasureSoul;
        [SerializeField] Image m_TreasureSoulIcon;
        [SerializeField] Text m_TreasureSoulName;
        FunctionUnlockFlyObject flyObject;
        DateTime openTime = DateTime.Now;
@@ -55,12 +59,13 @@
        protected override void OnPreOpen()
        {
            m_ModelRawImage.gameObject.SetActive(true);
            m_ModelRawImage.gameObject.SetActive(false);
            m_ContainerSkill.gameObject.SetActive(false);
            m_ContainerProperty.gameObject.SetActive(false);
            m_ContainerLv.gameObject.SetActive(false);
            m_ContainerNewGotSkill.gameObject.SetActive(false);
            m_ContainerRealm.gameObject.SetActive(false);
            m_ContainerTreasureSoul.gameObject.SetActive(false);
            m_DisplayAlphaTween.SetStartState();
            flying = false;
            startFly = false;
@@ -141,6 +146,11 @@
                        DisplayNewGotSkill();
                    }
                    break;
                case ActivateShow.ActivateFunc.TreasureSoul:
                    DisplayTreasureSoul();
                    DisplayFightPower();
                    DisplayProperty();
                    break;
            }
        }
@@ -184,6 +194,7 @@
                    m_Properties[i].gameObject.SetActive(true);
                    switch (ActivateShow.activateType)
                    {
                        case ActivateShow.ActivateFunc.TreasureSoul:
                        case ActivateShow.ActivateFunc.Realm:
                            m_Properties[i].Display(ActivateShow.propertyCompares[i].key
                        , ActivateShow.propertyCompares[i].beforeValue, ActivateShow.propertyCompares[i].currentValue);
@@ -235,10 +246,12 @@
            switch (ActivateShow.activateType)
            {
                case ActivateShow.ActivateFunc.Realm:
                    m_ModelRawImage.gameObject.SetActive(true);
                    m_ModelRawImage.rectTransform.sizeDelta = new Vector2(680, 510);
                    UI3DModelExhibition.Instance.BeginShowPlayer(m_ModelRawImage, PlayerDatas.Instance.baseData.Job, RoleEquipType.retWing);
                    break;
                case ActivateShow.ActivateFunc.GodWeapon:
                    m_ModelRawImage.gameObject.SetActive(true);
                    m_ModelRawImage.rectTransform.sizeDelta = new Vector2(600, 600);
                    UI3DTreasureExhibition.Instance.BeginShowGodWeapon(ActivateShow.godWeaponType, m_ModelRawImage);
                    break;
@@ -256,6 +269,17 @@
            PrepareFly(ActivateShow.skills[0]);
        }
        void DisplayTreasureSoul()
        {
            var config = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(ActivateShow.treasureSoulId);
            if (config != null)
            {
                m_ContainerTreasureSoul.gameObject.SetActive(true);
                m_TreasureSoulIcon.SetSprite(config.Icon);
                m_TreasureSoulName.text = config.Name;
            }
        }
        void PrepareFly(int _skillId)
        {
            ActivateShow.PrepareSkillFly();
System/Treasure/TreasureCollectBriefInfoBehaviour.cs
@@ -189,17 +189,6 @@
                    return;
                }
                if (FuncOpen.Instance.IsFuncOpen(126))
                {
                    treasureId = GetTreasureSoulTreasure();
                    if (treasureId != 0)
                    {
                        this.displayTreasureId = treasureId;
                        displayState = DisplayState.TreasureSoul;
                        effectState = 0;
                        return;
                    }
                    treasureId = GetNextChallengeTreasure();
                    if (treasureId != 0)
                    {
@@ -207,27 +196,6 @@
                        displayState = DisplayState.WaitUnLock;
                        effectState = 0;
                        return;
                    }
                }
                else
                {
                    treasureId = GetNextChallengeTreasure();
                    if (treasureId != 0)
                    {
                        this.displayTreasureId = treasureId;
                        displayState = DisplayState.WaitUnLock;
                        effectState = 0;
                        return;
                    }
                    treasureId = GetTreasureSoulTreasure();
                    if (treasureId != 0)
                    {
                        this.displayTreasureId = treasureId;
                        displayState = DisplayState.TreasureSoul;
                        effectState = 0;
                        return;
                    }
                }
            }
@@ -332,21 +300,6 @@
                        }
                        m_Description.text = Language.Get("FabaoState_Text_4", Mathf.RoundToInt(progress * 100f));
                        break;
                    case DisplayState.TreasureSoul:
                        if (treasure != null)
                        {
                            var privilege = treasure.unLockPrivilege;
                            if (privilege != 0)
                            {
                                var privilegeConfig = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(privilege);
                                m_Description.text = Language.Get("FabaoState_Text_8", privilegeConfig.Name);
                            }
                            else
                            {
                                m_Description.text = Language.Get("FabaoState_Text_8", config.Name);
                            }
                        }
                        break;
                    case DisplayState.WaitUnLock:
                        Achievement achievement = null;
@@ -484,24 +437,6 @@
         );
        }
        private int GetTreasureSoulTreasure()
        {
            return humanTreasures.Find((x) =>
            {
                Treasure treasure;
                if (model.TryGetTreasure(x, out treasure))
                {
                    var humanTreasure = treasure as HumanTreasure;
                    return humanTreasure != null && humanTreasure.humanState == HumanTreasureState.CastSoul;
                }
                else
                {
                    return false;
                }
            }
             );
        }
        private int GetNextChallengeTreasure()
        {
            for (int i = 0; i < humanTreasures.Count; i++)
@@ -606,7 +541,6 @@
            AwakenAble,//可觉醒
            CollectSoul,//可集魂
            AwakenUnderway,//觉醒进行中
            TreasureSoul,//法宝魂觉醒中
            WaitUnLock,//等待解封
            PotentialUp,//潜力提升进行中
            PotentialUpAble,//潜力可提升
System/Treasure/TreasureSoulModel.cs
@@ -268,6 +268,9 @@
                    }
                    continue;
                }
                int beforeFinishCount = special.presentFinishCount;
                special.presentFinishCount = (int)_data.GotValue;
                special.presentGetCount = (int)_data.CurValue;
                special.itemGet = _data.ItemAwardState == 1;
@@ -276,6 +279,14 @@
                if (treasureSoulEvent != null)
                {
                    treasureSoulEvent((int)_data.PriID);
                }
                if (beforeFinishCount < special.presentFinishCount && serverInited && special.active
                    && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>()
                    && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
                    && !WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>())
                {
                    ActivateShow.TreasureSoulGetReward((int)_data.PriID, beforeFinishCount, special.presentFinishCount);
                }
            }
        }
@@ -290,13 +301,23 @@
                    if (treasureSoulDict.ContainsKey((int)TreasurePrivilege.StrengthenAdd))
                    {
                        var _specialData = treasureSoulDict[(int)TreasurePrivilege.StrengthenAdd];
                        int beforeFinishCount = _specialData.presentFinishCount;
                        _specialData.presentFinishCount = (int)_data.Cnt;
                        UpdateRedpoint((int)TreasurePrivilege.StrengthenAdd);
                        if (beforeFinishCount < _specialData.presentFinishCount && serverInited && _specialData.active
                             && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>()
                             && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
                             && !WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>())
                        {
                            ActivateShow.TreasureSoulGetReward((int)TreasurePrivilege.StrengthenAdd,
                                beforeFinishCount, _specialData.presentFinishCount);
                        }
                    }
                    if (treasureSoulEvent != null)
                    {
                        treasureSoulEvent((int)TreasurePrivilege.StrengthenAdd);
                    }
                }
            }
        }