少年修仙传客户端代码仓库
client_Zxw
2018-09-10 d54b47dc0b8488ae938ac85e4dbe8f125d30bbed
2614 前端 神兽开发
1个文件已修改
36 ■■■■ 已修改文件
System/Strengthening/GodBeastModel.cs 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/GodBeastModel.cs
@@ -19,6 +19,8 @@
    public ItemModel Crystal_ItemModel;
    DogzModel Dogz_model;
    DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } }
    PlayerPackModel _playerPack;
    PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } }
    public override void Init()
    {
@@ -86,33 +88,29 @@
        return AllEnhancedPropertiesDic;
    }
    private Dictionary<int, int> SiteEnhancementAttributeDic = new Dictionary<int, int>();//key:为属性编号,value是属性值
    public Dictionary<int, int> SiteEnhancementAttribute(int GodBeastNumber, int GodBeastPart)//获取某只神兽身上某个装备属性值
    public Dictionary<int, int> SiteEnhancementAttribute(PackType PackTypeGodBeast, int GodBeastIndex)//获取某只神兽身上某个装备属性值
    {
        SiteEnhancementAttributeDic.Clear();
        List<ItemModel> itemModel = dogz_model.GetDogzEquips(GodBeastNumber);
        if (itemModel == null)
        ItemModel item = playerPack.GetItemModelByIndex(PackTypeGodBeast, GodBeastIndex);
        if (item == null)
        {
            return SiteEnhancementAttributeDic;
        }
        for (int i = 0; i < itemModel.Count; i++)
        var IudetDogzEquipPlus = item.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
        if (IudetDogzEquipPlus != null && IudetDogzEquipPlus[0] > 0)
        {
            ItemModel item = itemModel[i];
            var IudetDogzEquipPlus = item.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
            if (IudetDogzEquipPlus != null && item.EquipPlace == GodBeastPart && IudetDogzEquipPlus[0] > 0)
            var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(item.EquipPlace, IudetDogzEquipPlus[0]);
            int[] AttType = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attType);
            int[] AttValue = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attValue);
            for (int j = 0; j < AttType.Length; j++)
            {
                var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(item.EquipPlace, IudetDogzEquipPlus[0]);
                int[] AttType = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attType);
                int[] AttValue = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attValue);
                for (int j = 0; j < AttType.Length; j++)
                if (SiteEnhancementAttributeDic.ContainsKey(AttType[j]))
                {
                    if (SiteEnhancementAttributeDic.ContainsKey(AttType[j]))
                    {
                        SiteEnhancementAttributeDic[(AttType[j])] = AttValue[j];
                    }
                    else
                    {
                        SiteEnhancementAttributeDic.Add(AttType[j], AttValue[j]);
                    }
                    SiteEnhancementAttributeDic[(AttType[j])] = AttValue[j];
                }
                else
                {
                    SiteEnhancementAttributeDic.Add(AttType[j], AttValue[j]);
                }
            }
        }