少年修仙传客户端代码仓库
client_Hale
2018-09-28 2bf2e287e29d1bb870b714b2682334fd684d438a
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
3个文件已修改
241 ■■■■ 已修改文件
System/Strengthening/GodBeastAttributes.cs 149 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/GodBeastModel.cs 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/GodBeastSlidingList.cs 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/GodBeastAttributes.cs
@@ -68,6 +68,7 @@
            if (m_DoubleToggle.isOn)
            {
                m_DoubleToggle.isOn = false;
                godBeastModel.IsToggleBool = false;
            }
            GodBeastReinforcementWin.ChooseToModify += ChooseToModify;
            godBeastModel.AbsorbEvent += AbsorbEvent;
@@ -92,6 +93,7 @@
        private void OnClickToggle(bool Isbool)
        {
            godBeastModel.IsToggleBool = Isbool;
            if (GodBeastNumber != 0 && GodBeastPart != 0)
            {
                AttributeAssignment();
@@ -110,49 +112,120 @@
            }
            if (m_DoubleToggle.isOn)//双倍强化
            {
                if (ListIndex.Count <= 0)
                {
                    return;
                }
                if (NeedFairyJade <= 0)
                {
                    dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, ListIndex, ListCount, 0);
                }
                else
                {
                    int Gold = (int)UIHelper.GetMoneyCnt(1);//仙玉
                    string strNull = string.Format(Language.Get("DogzDoubleRemind"), NeedFairyJade);
                    ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), strNull, (bool isOk) =>
                     {
                         if (isOk)
                         {
                             if (Gold >= NeedFairyJade)
                             {
                                 dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, ListIndex, ListCount, 1);
                             }
                             else
                             {
                                 if (VersionConfig.Get().isBanShu)
                                 {
                                     SysNotifyMgr.Instance.ShowTip("GoldErr");
                                     return;
                                 }
                                 WindowCenter.Instance.Open<RechargeTipWin>();
                             }
                         }
                     });
                }
                DoubleStrength(ListIndex, ListCount);
            }
            else//单倍强化
            {
                if (ListIndex.Count <= 0)
                {
                    return;
                }
                dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, ListIndex, ListCount, 0);
                SingleStrength(ListIndex, ListCount);//单倍强化
            }
        }
        private void SingleStrength(List<int> ListIndex, List<int> ListCount)//单倍强化
        {
            if (ListIndex.Count <= 0)
            {
                return;
            }
            if (godBeastModel.IsNeedEquipment())
            {
                ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("DogzStrengConfirm"), (bool isOk) =>
                {
                    if (isOk)
                    {
                        dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, ListIndex, ListCount, 0);
                    }
                });
            }
            else
            {
                dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, ListIndex, ListCount, 0);
            }
        }
        private void DoubleStrength(List<int> ListIndex, List<int> ListCount)//双倍强化
        {
            if (ListIndex.Count <= 0)
            {
                return;
            }
            if (NeedFairyJade <= 0)//所需仙玉为0时
            {
                if (godBeastModel.IsNeedEquipment())
                {
                    ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("DogzStrengConfirm"), (bool isOk) =>
                    {
                        if (isOk)
                        {
                            dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, ListIndex, ListCount, 0);
                        }
                    });
                }
                else
                {
                    dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, ListIndex, ListCount, 0);
                }
            }
            else//所需仙玉不为0时
            {
                int Gold = (int)UIHelper.GetMoneyCnt(1);//仙玉
                string strNull = string.Format(Language.Get("DogzDoubleRemind"), NeedFairyJade);
                if (godBeastModel.IsNeedEquipment())
                {
                    ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("DogzStrengConfirm"), (bool isOk) =>
                    {
                        if (isOk)
                        {
                            ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), strNull, (bool is_Ok) =>
                            {
                                if (is_Ok)
                                {
                                    if (Gold >= NeedFairyJade)
                                    {
                                        dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, ListIndex, ListCount, 1);
                                    }
                                    else
                                    {
                                        if (VersionConfig.Get().isBanShu)
                                        {
                                            SysNotifyMgr.Instance.ShowTip("GoldErr");
                                            return;
                                        }
                                        WindowCenter.Instance.Open<RechargeTipWin>();
                                    }
                                }
                            });
                        }
                    });
                }
                else
                {
                    ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), strNull, (bool isOk) =>
                    {
                        if (isOk)
                        {
                            if (Gold >= NeedFairyJade)
                            {
                                dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, ListIndex, ListCount, 1);
                            }
                            else
                            {
                                if (VersionConfig.Get().isBanShu)
                                {
                                    SysNotifyMgr.Instance.ShowTip("GoldErr");
                                    return;
                                }
                                WindowCenter.Instance.Open<RechargeTipWin>();
                            }
                        }
                    });
                }
            }
        }
        private void ChooseToModify(int locationMarker)
        {
            GetGodBeastLocationMarker(locationMarker);
@@ -308,7 +381,7 @@
                        if (IudetDogzEquipPlus != null)
                        {
                            SingleProficiency += IudetDogzEquipPlus[1];
                            DoubleProficiency += itemModel.chinItemModel.EffectValueA1;
                            DoubleProficiency += IudetDogzEquipPlus[1]+ itemModel.chinItemModel.EffectValueA1;
                        }
                        else
                        {
System/Strengthening/GodBeastModel.cs
@@ -162,10 +162,10 @@
        return SiteEnhancementAttributeDic;
    }
    public int DogZBagIndex = 0;
    public int DogZBagIndex = 0;//当前强化的装备下标
    public bool IsToggleBool = false;
    public bool IsFullLevel()//是都满级能够继续吸收
    {
        bool IsBool = false;
        int DogZLV = 0;//获取当前神兽等级
        int DogProficiency = 0;//当前神兽的熟练度
        int SingleProficiency = 0;//单倍熟练度
@@ -175,7 +175,7 @@
        {
            return false;
        }
        int lv = QualityLimit[itemModel.chinItemModel.ItemColor];
        int lv = QualityLimit[itemModel.chinItemModel.ItemColor];//获取最大强化等级
        var DogzEquipMaxConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(itemModel.chinItemModel.EquipPlace, lv);
        var IudetDogzEquipPlus = itemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
@@ -183,6 +183,10 @@
        {
            DogZLV = IudetDogzEquipPlus[0];
            DogProficiency = IudetDogzEquipPlus[1];
        }
        if (DogZLV >= lv)
        {
            return true;
        }
        foreach (var key in Absorption_Dic.Keys)
        {
@@ -196,7 +200,7 @@
                    if (_IudetDogzEquipPlus != null)
                    {
                        SingleProficiency += _IudetDogzEquipPlus[1];
                        DoubleProficiency += item_Model.chinItemModel.EffectValueA1;
                        DoubleProficiency += item_Model.chinItemModel.EffectValueA1+ _IudetDogzEquipPlus[1];
                    }
                    else
                    {
@@ -205,26 +209,26 @@
                }
            }
        }
        if (true)
        if (IsToggleBool)//双倍熟练度
        {
            if (DogProficiency + DoubleProficiency >= DogzEquipMaxConfig.upExpTotal)
            {
                return true;
                return true;//已满
            }
            else
            {
                return false;
                return false;//未满
            }
        }
        else
        else//单倍熟练度
        {
            if (DogProficiency + SingleProficiency >= DogzEquipMaxConfig.upExpTotal)
            {
                return true;
                return true;//已满
            }
            else
            {
                return false;
                return false;//未满
            }
        }
    }
@@ -291,6 +295,24 @@
            }
        }
    }
    public bool  IsNeedEquipment()//是否有极品装备需要弹框
    {
        bool IsBool = false;
        foreach (var key in Absorption_Dic.Keys)
        {
            ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptDogzItem, key);
            if (itemModel != null)
            {
                if (itemModel.chinItemModel.EquipPlace > 0 && itemModel.chinItemModel.ItemColor >= 5)
                {
                    IsBool = true;
                }
            }
        }
        return IsBool;
    }
}
System/Strengthening/GodBeastSlidingList.cs
@@ -21,6 +21,7 @@
        public int Proficiency;//熟练度
        public int EquipScore;//装备评分
        public int Part;//装备位
        public int Count;//数量
    }
    public class GodBeastSlidingList : MonoBehaviour
@@ -55,8 +56,8 @@
                {
                    m_ToggleAll.isOn = false;
                }
                GetGodBeastBag();
                FilterQuality();
                GetGodBeastBag();//获取神兽背包数据排序
                FilterQuality();//分类筛选
                godBeastModel.AbsorbEventUpdate();
                m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
            });
@@ -67,8 +68,8 @@
                {
                    m_ToggleAll.isOn = false;
                }
                GetGodBeastBag();
                FilterQuality();
                GetGodBeastBag();//获取神兽背包数据排序
                FilterQuality();//分类筛选
                godBeastModel.AbsorbEventUpdate();
                m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
            });
@@ -79,8 +80,8 @@
                {
                    m_ToggleAll.isOn = false;
                }
                GetGodBeastBag();
                FilterQuality();
                GetGodBeastBag();//获取神兽背包数据排序
                FilterQuality();//分类筛选
                godBeastModel.AbsorbEventUpdate();
                m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见    
            });
@@ -91,8 +92,8 @@
                {
                    m_ToggleAll.isOn = false;
                }
                GetGodBeastBag();
                FilterQuality();
                GetGodBeastBag();//获取神兽背包数据排序
                FilterQuality();//分类筛选
                godBeastModel.AbsorbEventUpdate();
                m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
            });
@@ -103,8 +104,8 @@
                {
                    m_ToggleAll.isOn = false;
                }
                GetGodBeastBag();
                FilterQuality();
                GetGodBeastBag();//获取神兽背包数据排序
                FilterQuality();//分类筛选
                godBeastModel.AbsorbEventUpdate();
                m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
            });
@@ -117,7 +118,7 @@
            playerPack.ItemCntAddAct += RefreshItemCountAct;
        }
        private void OnDisable()
        {
@@ -126,7 +127,7 @@
            playerPack.ItemCntAddAct -= RefreshItemCountAct;
        }
        public void Init()
        {
@@ -156,7 +157,7 @@
        {
            if ((int)obj.MakeType == (int)MakeType.Def_mitDogzEquipPlus)
            {
            }
        }
        private void RefreshItemCountAct(PackType arg1, int arg2, int arg3)
@@ -203,6 +204,7 @@
                godBeastBagClass.Star = itemModel.chinItemModel.StarLevel;
                godBeastBagClass.EquipScore = itemModel.equipScore;
                godBeastBagClass.Part = itemModel.EquipPlace;
                godBeastBagClass.Count = itemModel.itemInfo.ItemCount;
                var IudetDogzEquipPlus = itemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
                if (IudetDogzEquipPlus == null)
                {
@@ -284,7 +286,25 @@
            {
                for (int k = 0; k < GodBeastBagList.Count; k++)
                {
                    godBeastModel.Absorption_Dic.Add(GodBeastBagList[k].Index, 1);
                    for (int j = 0; j < GodBeastBagList[k].Count; j++)
                    {
                        if (!godBeastModel.IsFullLevel())
                        {
                            if (!godBeastModel.Absorption_Dic.ContainsKey(GodBeastBagList[k].Index))
                            {
                                godBeastModel.Absorption_Dic.Add(GodBeastBagList[k].Index, 1);
                            }
                            else
                            {
                                int Type = j + 1;
                                godBeastModel.Absorption_Dic[GodBeastBagList[k].Index] = Type;
                            }
                        }
                        else
                        {
                            return;
                        }
                    }
                }
            }
        }
@@ -389,7 +409,7 @@
                    }
                    GodBeastChildNodes.GetGodBeastIndex(godBeastBagClass.Index);
                    GodBeastChildNodes.ButtonDown.AddListener(() =>
                    {
                    {
                        if (itemModel.EquipPlace > 0)//选中的物品为装备
                        {
                            if (godBeastModel.Absorption_Dic.ContainsKey(godBeastBagClass.Index))