コード例 #1
0
    private void ReadNewBuff(EquipmentItem item, JSONNode N)
    {
        item.levelUpgraded = N["level"].AsInt;

        int _idRate = MappingData.ConvertIdBuffToAttribute(item.idItemInit);

        item.setValue(_idRate.ToString(), N["rate"].AsFloat);
    }
コード例 #2
0
 private void ReadNewAvatar(EquipmentItem item, JSONNode N)
 {
     item.levelUpgraded = N["level"].AsInt;
     //Thêm các dòng trắng
     item.setValue("97", N["hp"].AsFloat);
     item.setValue("98", N["physical_damage"].AsFloat);
     item.setValue("99", N["magical_damage"].AsFloat);
     item.setValue("100", N["physical_absorption"].AsFloat);
     item.setValue("101", N["magical_absorption"].AsFloat);
     item.setValue("999", N["maxlist"].AsInt);
 }
コード例 #3
0
    private void ShowResultUpgrade(string result)
    {
        if (result.StartsWith("Error"))
        {
            Debug.Log(result);
        }
        else
        {
            var    N = SimpleJSON.JSON.Parse(result);
            string _resultUpgrade   = N["result"].Value;
            int    _numberRunestone = int.Parse(_itemRunstone.getValue("quantity").ToString());
            _numberRunestone -= 1;
            if (_numberRunestone <= 0)
            {
                SplitDataFromServe._listGemInBag.Remove(_itemRunstone);
            }
            else
            {
                _itemRunstone.setValue("quantity", _numberRunestone);
            }

            _mainEquip.setValue("listidproperty", N["properties"].ToString());

            _itemInfor._myState = StateInforItem.None;
            _itemInfor.SetData(_mainEquip, _myItemUI._iconImg.sprite);
            _itemInfor.gameObject.SetActive(true);

            _myBag.UpdateEquipmentUpgraded();

            //reset MainEquip
            SetMainEquipment();
            ResetRuneStone();
        }
        isRollingInforce = false;
        _effectPatternUpgrade.EndRolling();
    }
コード例 #4
0
    public static void LoadCharacterMonster(CharacterPlayer monster, JSONNode dataMonster)
    {
        monster._baseProperties = new CharacterProperties(-1, "", -1, "", dataMonster["level"]
                                                          , dataMonster["exp"].AsDouble, 0, 0, 0, dataMonster["sp"].AsDouble, 0, 0, dataMonster["gold"], 0, 0, dataMonster["type"].AsInt, dataMonster["hp"].AsInt,
                                                          dataMonster["str"].AsInt, dataMonster["int"].AsInt, dataMonster["vit"].AsInt, 0, 0, 0,
                                                          0, 0, dataMonster["typemonster"].Value);
        EquipmentItem _weaponItemMonster = new EquipmentItem(-1, -1, TypeEquipmentCharacter.Weapon, ClassCharacterItem.None, -1, -1, "", -1, -1, -1, -1);

        _weaponItemMonster.setValue("1", dataMonster["phy_dmg_min"].AsFloat);
        _weaponItemMonster.setValue("2", dataMonster["phy_dmg_max"].AsFloat);
        _weaponItemMonster.setValue("3", dataMonster["mag_dmg_min"].AsFloat);
        _weaponItemMonster.setValue("4", dataMonster["mag_dmg_max"].AsFloat);
        _weaponItemMonster.setValue("5", dataMonster["crit_chance"].AsFloat);
        _weaponItemMonster.setValue("6", dataMonster["multicast_chance"].AsFloat);
        _weaponItemMonster.setValue("7", dataMonster["phy_rein_min"].AsFloat);
        _weaponItemMonster.setValue("8", dataMonster["phy_rein_max"].AsFloat);
        _weaponItemMonster.setValue("9", dataMonster["mag_rein_min"].AsFloat);
        _weaponItemMonster.setValue("10", dataMonster["mag_rein_max"].AsFloat);
        _weaponItemMonster.setValue("11", dataMonster["atk_rate_min"].AsFloat);
        _weaponItemMonster.setValue("12", dataMonster["atk_rate_max"].AsFloat);
        _weaponItemMonster.setValue("13", dataMonster["parry_rate_min"].AsFloat);
        _weaponItemMonster.setValue("14", dataMonster["parry_rate_max"].AsFloat);
        _weaponItemMonster.setValue("15", dataMonster["block"].AsFloat);
        _weaponItemMonster.setValue("16", dataMonster["block"].AsFloat);
        _weaponItemMonster.setValue("17", dataMonster["phy_def_min"].AsFloat);
        _weaponItemMonster.setValue("18", dataMonster["phy_def_max"].AsFloat);
        _weaponItemMonster.setValue("19", dataMonster["mag_def_min"].AsFloat);
        _weaponItemMonster.setValue("20", dataMonster["mag_def_max"].AsFloat);
        _weaponItemMonster.setValue("21", dataMonster["phy_red_min"].AsFloat);
        _weaponItemMonster.setValue("22", dataMonster["phy_red_max"].AsFloat);
        _weaponItemMonster.setValue("23", dataMonster["mag_red_min"].AsFloat);
        _weaponItemMonster.setValue("24", dataMonster["mag_red_max"].AsFloat);

        Equipment equipment = Equipment.convertToEquipment(_weaponItemMonster);

        monster.equipments[0]  = equipment;
        monster.characteristic = new Characteristic((Characteristic.CharacterType)dataMonster["type"].AsInt, Characteristic.CharacterClass.Assassin,
                                                    dataMonster["level"], dataMonster["str"].AsInt, dataMonster["int"].AsInt,
                                                    0, 0, dataMonster["vit"].AsInt, 0,
                                                    0, 0, 0);
        monster._baseProperties.hp = monster.characteristic.Max_Health;
        monster._actionPoints      = 0;
        monster._listAction        = new List <ActionHandle>();
        monster.idUserSocketIO     = "";
    }
コード例 #5
0
    public static EquipmentItem CreateEquipmentItem(string data)
    {
        //Debug.Log(data);
        var    N                 = SimpleJSON.JSON.Parse(data);
        int    tempIdItem        = N["ide"].AsInt;
        int    tempIdInitItem    = N["idie"].AsInt;
        string tempnameItem      = N["name"].Value.ToString();
        int    templevelRequired = N["levelrequired"].AsInt;
        int    templevelUpgrade  = N["levelupgraded"].AsInt;
        int    tempidSet         = N["idsuit"].AsInt;

        int typeEquipped = N["typequipped"].AsInt;
        int typeChild    = N["childtype"].AsInt;
        ClassCharacterItem _classCharacterItem = ClassCharacterItem.None;

        switch (typeEquipped)
        {
        case 12: _classCharacterItem = ClassCharacterItem.HeavyArmor; break;

        case 13: _classCharacterItem = ClassCharacterItem.SoftArmor; break;

        case 14: _classCharacterItem = ClassCharacterItem.ClothArmor; break;

        default: _classCharacterItem = ClassCharacterItem.None; break;
        }
        TypeEquipmentCharacter tempType = MappingData.ConvertIdItemToType(typeEquipped, typeChild, _heroCurrentPLay.idclass, false);


        int priceItem = N["sellprice"].AsInt;
        int rare      = N["rateitem"].AsInt;

        EquipmentItem item = new EquipmentItem(tempIdItem, tempIdInitItem, tempType, _classCharacterItem, typeEquipped, tempidSet, tempnameItem, templevelRequired, templevelUpgrade, priceItem, rare);

        item.setValue("1", N["mindamage"].AsFloat);
        item.setValue("2", N["maxdamage"].AsFloat);
        item.setValue("3", N["minmagic"].AsFloat);
        item.setValue("4", N["maxmagic"].AsFloat);
        item.setValue("5", N["critmax"].AsFloat);
        item.setValue("6", N["multicastmax"].AsFloat);
        item.setValue("7", N["min_incrdamage"].AsFloat);
        item.setValue("8", N["max_incrdamage"].AsFloat);
        item.setValue("9", N["min_incrmagic"].AsFloat);
        item.setValue("10", N["max_incrmagic"].AsFloat);
        item.setValue("11", N["min_rate"].AsFloat);
        item.setValue("12", N["max_rate"].AsFloat);
        item.setValue("13", N["minparryrate"].AsFloat);
        item.setValue("14", N["maxparryrate"].AsFloat);
        item.setValue("15", N["min_block"].AsFloat);
        item.setValue("16", N["max_block"].AsFloat);
        item.setValue("17", N["minphydef"].AsFloat);
        item.setValue("18", N["maxphydef"].AsFloat);
        item.setValue("19", N["minmagicdef"].AsFloat);
        item.setValue("20", N["maxmagicdef"].AsFloat);
        item.setValue("21", N["minphyreduction"].AsFloat);
        item.setValue("22", N["maxphyreduction"].AsFloat);
        item.setValue("23", N["minmagicreduction"].AsFloat);
        item.setValue("24", N["maxmagicreduction"].AsFloat);
        item.setValue("25", N["minphyabsorb"].AsFloat);
        item.setValue("26", N["maxphyabsorb"].AsFloat);
        item.setValue("27", N["minmagicabsorb"].AsFloat);
        item.setValue("28", N["maxmagicabsorb"].AsFloat);

        item.setValue("listidproperty", N["listidproperty"].Value.ToString());
        return(item);
    }
コード例 #6
0
    public static void ReadDetailDataHeroEnemyPlay(string data)
    {
        var N = SimpleJSON.JSON.Parse(data);

        _heroEnemyPlay = JsonUtility.FromJson <HeroCurrentPlay>(N["hero"].ToString());

        int        numberItemEquip    = N["equipped"].Count;
        List <int> listIdWearEquipped = new List <int>();

        for (int i = 0; i < N["wear_equipped"].Count; i++)
        {
            if (N["wear_equipped"][i].AsInt != 0)
            {
                listIdWearEquipped.Add(N["wear_equipped"][i].AsInt);
            }
        }
        List <EquipmentItem> _listEquippedInHero = new List <EquipmentItem>();

        for (int i = 0; i < numberItemEquip; i++)
        {
            if (listIdWearEquipped.Contains(N["equipped"][i]["ide"].AsInt))
            {
                int    tempIdItem        = N["equipped"][i]["ide"].AsInt;
                int    tempIdInitItem    = N["equipped"][i]["idie"].AsInt;
                string tempnameItem      = N["equipped"][i]["name"].Value;
                int    templevelRequired = N["equipped"][i]["levelrequired"].AsInt;
                int    templevelUpgrade  = N["equipped"][i]["levelupgraded"].AsInt;
                int    tempidSet         = N["equipped"][i]["idsuit"].AsInt;

                int temTypeEquipped = N["equipped"][i]["typequipped"].AsInt;
                int temChildType    = N["equipped"][i]["childtype"].AsInt;

                //TypeEquipmentCharacter tempType = GetSlotWearEquipped(data, tempIdItem, _heroEnemyPlay.idclass);

                int priceItem = N["equipped"][i]["sellprice"].AsInt;
                int rareItem  = N["equipped"][i]["rateitem"].AsInt;

                int typeEquipped = N["equipped"][i]["typequipped"].AsInt;
                int typeChild    = N["equipped"][i]["childtype"].AsInt;
                ClassCharacterItem _classCharacterItem = ClassCharacterItem.None;
                switch (typeEquipped)
                {
                case 12: _classCharacterItem = ClassCharacterItem.HeavyArmor; break;

                case 13: _classCharacterItem = ClassCharacterItem.SoftArmor; break;

                case 14: _classCharacterItem = ClassCharacterItem.ClothArmor; break;

                default: _classCharacterItem = ClassCharacterItem.None; break;
                }

                TypeEquipmentCharacter tempType = MappingData.ConvertIdItemToType(typeEquipped, typeChild, _heroCurrentPLay.idclass, listIdWearEquipped.Contains(tempIdItem));

                if (N["wear_equipped"]["ide_weapon"].AsInt == tempIdItem)
                {
                    tempType = TypeEquipmentCharacter.Weapon;
                }
                else if (N["wear_equipped"]["ide_shield"].AsInt == tempIdItem)
                {
                    if (_heroCurrentPLay.idclass == 1 || _heroCurrentPLay.idclass == 5 || _heroCurrentPLay.idclass == 7)
                    {
                        tempType = TypeEquipmentCharacter.OffhandWeapon;
                    }
                    else
                    {
                        tempType = TypeEquipmentCharacter.Shield;
                    }
                }



                EquipmentItem item = new EquipmentItem(tempIdItem, tempIdInitItem, tempType, _classCharacterItem, typeEquipped, tempidSet, tempnameItem, templevelRequired, templevelUpgrade, priceItem, rareItem);
                item.setValue("1", N["equipped"][i]["mindamage"].AsFloat);
                item.setValue("2", N["equipped"][i]["maxdamage"].AsFloat);
                item.setValue("3", N["equipped"][i]["minmagic"].AsFloat);
                item.setValue("4", N["equipped"][i]["maxmagic"].AsFloat);
                item.setValue("5", N["equipped"][i]["critmax"].AsFloat);
                item.setValue("6", N["equipped"][i]["multicastmax"].AsFloat);
                item.setValue("7", N["equipped"][i]["min_incrdamage"].AsFloat);
                item.setValue("8", N["equipped"][i]["max_incrdamage"].AsFloat);
                item.setValue("9", N["equipped"][i]["min_incrmagic"].AsFloat);
                item.setValue("10", N["equipped"][i]["max_incrmagic"].AsFloat);
                item.setValue("11", N["equipped"][i]["min_rate"].AsFloat);
                item.setValue("12", N["equipped"][i]["max_rate"].AsFloat);
                item.setValue("13", N["equipped"][i]["minparryrate"].AsFloat);
                item.setValue("14", N["equipped"][i]["maxparryrate"].AsFloat);
                item.setValue("15", N["equipped"][i]["min_block"].AsFloat);
                item.setValue("16", N["equipped"][i]["max_block"].AsFloat);
                item.setValue("17", N["equipped"][i]["minphydef"].AsFloat);
                item.setValue("18", N["equipped"][i]["maxphydef"].AsFloat);
                item.setValue("19", N["equipped"][i]["minmagicdef"].AsFloat);
                item.setValue("20", N["equipped"][i]["maxmagicdef"].AsFloat);
                item.setValue("21", N["equipped"][i]["minphyreduction"].AsFloat);
                item.setValue("22", N["equipped"][i]["maxphyreduction"].AsFloat);
                item.setValue("23", N["equipped"][i]["minmagicreduction"].AsFloat);
                item.setValue("24", N["equipped"][i]["maxmagicreduction"].AsFloat);
                item.setValue("25", N["equipped"][i]["minphyabsorb"].AsFloat);
                item.setValue("26", N["equipped"][i]["maxphyabsorb"].AsFloat);
                item.setValue("27", N["equipped"][i]["minmagicabsorb"].AsFloat);
                item.setValue("28", N["equipped"][i]["maxmagicabsorb"].AsFloat);

                item.setValue("listidproperty", N["equipped"][i]["maxmagicabsorb"].Value.ToString());

                _listEquippedInHero.Add(item);
            }
        }

        _equipmentCurrentEnemy = new EquipmentsCharacter(_listEquippedInHero);
    }
コード例 #7
0
    public static void ReadDetailDataHeroCurrentPlay(string data)
    {
        //Debug.Log(data);
        var N = SimpleJSON.JSON.Parse(data);

        _heroCurrentPLay = JsonUtility.FromJson <HeroCurrentPlay>(N["hero"].ToString());

        int        numberItemEquip    = N["equipped"].Count;
        List <int> listIdWearEquipped = new List <int>();

        for (int i = 0; i < N["wear_equipped"].Count; i++)
        {
            if (N["wear_equipped"][i].AsInt != 0)
            {
                listIdWearEquipped.Add(N["wear_equipped"][i].AsInt);
            }
        }
        List <EquipmentItem> _listEquippedInHero = new List <EquipmentItem>();

        for (int i = 0; i < numberItemEquip; i++)
        {
            int    tempIdItem        = N["equipped"][i]["ide"].AsInt;
            int    tempIdInitItem    = N["equipped"][i]["idie"].AsInt;
            string tempnameItem      = N["equipped"][i]["name"].Value;
            int    templevelRequired = N["equipped"][i]["levelrequired"].AsInt;
            int    templevelUpgrade  = N["equipped"][i]["levelupgraded"].AsInt;
            int    tempidSet         = N["equipped"][i]["idsuit"].AsInt;
            int    temTypeEquipped   = N["equipped"][i]["typequipped"].AsInt;
            int    temChildType      = N["equipped"][i]["childtype"].AsInt;

            int typeEquipped = N["equipped"][i]["typequipped"].AsInt;
            int typeChild    = N["equipped"][i]["childtype"].AsInt;
            ClassCharacterItem _classCharacterItem = ClassCharacterItem.None;
            switch (typeEquipped)
            {
            case 12: _classCharacterItem = ClassCharacterItem.HeavyArmor; break;

            case 13: _classCharacterItem = ClassCharacterItem.SoftArmor; break;

            case 14: _classCharacterItem = ClassCharacterItem.ClothArmor; break;

            default: _classCharacterItem = ClassCharacterItem.None; break;
            }

            TypeEquipmentCharacter tempType = MappingData.ConvertIdItemToType(typeEquipped, typeChild, _heroCurrentPLay.idclass, listIdWearEquipped.Contains(tempIdItem));

            if (N["wear_equipped"]["ide_weapon"].AsInt == tempIdItem)
            {
                tempType = TypeEquipmentCharacter.Weapon;
            }
            else if (N["wear_equipped"]["ide_shield"].AsInt == tempIdItem)
            {
                if (_heroCurrentPLay.idclass == 1 || _heroCurrentPLay.idclass == 5 || _heroCurrentPLay.idclass == 7)
                {
                    tempType = TypeEquipmentCharacter.OffhandWeapon;
                }
                else
                {
                    tempType = TypeEquipmentCharacter.Shield;
                }
            }

            int priceItem = N["equipped"][i]["sellprice"].AsInt;
            int rare      = N["equipped"][i]["rateitem"].AsInt;

            EquipmentItem item = new EquipmentItem(tempIdItem, tempIdInitItem, tempType, _classCharacterItem, typeEquipped, tempidSet, tempnameItem, templevelRequired, templevelUpgrade, priceItem, rare);
            item.setValue("1", N["equipped"][i]["mindamage"].AsFloat);
            item.setValue("2", N["equipped"][i]["maxdamage"].AsFloat);
            item.setValue("3", N["equipped"][i]["minmagic"].AsFloat);
            item.setValue("4", N["equipped"][i]["maxmagic"].AsFloat);
            item.setValue("5", N["equipped"][i]["critmax"].AsFloat);
            item.setValue("6", N["equipped"][i]["multicastmax"].AsFloat);
            item.setValue("7", N["equipped"][i]["min_incrdamage"].AsFloat);
            item.setValue("8", N["equipped"][i]["max_incrdamage"].AsFloat);
            item.setValue("9", N["equipped"][i]["min_incrmagic"].AsFloat);
            item.setValue("10", N["equipped"][i]["max_incrmagic"].AsFloat);
            item.setValue("11", N["equipped"][i]["min_rate"].AsFloat);
            item.setValue("12", N["equipped"][i]["max_rate"].AsFloat);
            item.setValue("13", N["equipped"][i]["minparryrate"].AsFloat);
            item.setValue("14", N["equipped"][i]["maxparryrate"].AsFloat);
            item.setValue("15", N["equipped"][i]["min_block"].AsFloat);
            item.setValue("16", N["equipped"][i]["max_block"].AsFloat);
            item.setValue("17", N["equipped"][i]["minphydef"].AsFloat);
            item.setValue("18", N["equipped"][i]["maxphydef"].AsFloat);
            item.setValue("19", N["equipped"][i]["minmagicdef"].AsFloat);
            item.setValue("20", N["equipped"][i]["maxmagicdef"].AsFloat);
            item.setValue("21", N["equipped"][i]["minphyreduction"].AsFloat);
            item.setValue("22", N["equipped"][i]["maxphyreduction"].AsFloat);
            item.setValue("23", N["equipped"][i]["minmagicreduction"].AsFloat);
            item.setValue("24", N["equipped"][i]["maxmagicreduction"].AsFloat);
            item.setValue("25", N["equipped"][i]["minphyabsorb"].AsFloat);
            item.setValue("26", N["equipped"][i]["maxphyabsorb"].AsFloat);
            item.setValue("27", N["equipped"][i]["minmagicabsorb"].AsFloat);
            item.setValue("28", N["equipped"][i]["maxmagicabsorb"].AsFloat);
            item.priceItem = N["equipped"][i]["sellprice"].AsInt;
            string _valueProperty = N["equipped"][i]["listidproperty"].Value;
            item.setValue("listidproperty", _valueProperty);

            if (_valueProperty.Equals("null") || _valueProperty.Equals("[]") || string.IsNullOrEmpty(_valueProperty))
            {
            }
            else
            {
                try
                {
                    var M = CoreLib.JSON.Parse(_valueProperty);
                    foreach (KeyValuePair <string, CoreLib.JSONNode> _temp in M.AsObject)
                    {
                        //Debug.Log(_temp.Key.ToString());
                        item.setValue(_temp.Key.ToString(), float.Parse(_temp.Value.AsFloat.ToString()));
                    }
                }
                catch (Exception e)
                {
                    Debug.Log(e);
                    Debug.Log(tempIdItem + " " + _valueProperty);
                }
            }

            //Debug.Log(item.typeItem);
            if (listIdWearEquipped.Contains(tempIdItem))
            {
                _listEquippedInHero.Add(item);
            }
            else
            {
                _listEquipmentInBag.Add(item);
            }
        }

        int numberAvatar = N["avatar"].Count;

        for (int i = 0; i < numberAvatar; i++)
        {
            int tempIdItem = N["avatar"][i]["idha"].AsInt;

            //int tempIdInitItem = N["avatar"][i]["idia"].AsInt;
            string        tempnameItem      = N["avatar"][i]["name"].Value.ToString();
            int           templevelRequired = 1;
            int           templevelUpgrade  = int.Parse(N["avatar"][i]["level"].Value.ToString());
            int           tempidSet         = 0;
            int           priceItem         = 0;
            int           rare = 0;
            EquipmentItem item = new EquipmentItem(tempIdItem, 1, TypeEquipmentCharacter.Avatar, ClassCharacterItem.None, 0, tempidSet, tempnameItem, templevelRequired, templevelUpgrade, priceItem, rare);

            //Thêm các dòng trắng
            item.setValue("97", float.Parse(N["avatar"][i]["hp"].Value.ToString()));
            item.setValue("98", float.Parse(N["avatar"][i]["physical_damage"].Value.ToString()));
            item.setValue("99", float.Parse(N["avatar"][i]["magical_damage"].Value.ToString()));
            item.setValue("100", float.Parse(N["avatar"][i]["physical_absorption"].Value.ToString()));
            item.setValue("101", float.Parse(N["avatar"][i]["magical_absorption"].Value.ToString()));
            item.setValue("999", N["avatar"][i]["maxlist"].AsInt);
            item.setValue("listidproperty", N["avatar"][i]["listidproperty"].Value.ToString());
            try
            {
                var M = SimpleJSON.JSON.Parse(N["avatar"][i]["listidproperty"].Value.ToString());
                foreach (KeyValuePair <string, SimpleJSON.JSONNode> _temp in M.AsObject)
                {
                    //Debug.Log(_temp.Key.ToString());
                    item.setValue(_temp.Key.ToString(), float.Parse(_temp.Value.AsFloat.ToString()));
                }
            }
            catch (Exception e)
            {
            }
            //check trong túi hay người
            if (listIdWearEquipped.Contains(tempIdItem))
            {
                _listEquippedInHero.Add(item);
            }
            else
            {
                _listEquipmentInBag.Add(item);
            }
        }

        int numberBuff = N["buff"].Count;

        for (int i = 0; i < numberBuff; i++)
        {
            int           tempIdItem        = N["buff"][i]["idbf"].AsInt;
            int           tempIdInit        = N["buff"][i]["idibf"].AsInt;
            string        tempnameItem      = N["buff"][i]["name"].Value.ToString();
            int           templevelRequired = 1;
            int           templevelUpgrade  = int.Parse(N["buff"][i]["level"].Value.ToString());
            int           tempidSet         = 0;
            int           priceItem         = N["buff"][i]["sellprice"].AsInt;
            int           rare = 0;
            EquipmentItem item = new EquipmentItem(tempIdItem, tempIdInit, TypeEquipmentCharacter.Buff, ClassCharacterItem.None, 0, tempidSet, tempnameItem, templevelRequired, templevelUpgrade, priceItem, rare);

            float _rate   = N["buff"][i]["rate"].AsFloat;
            int   _idRate = MappingData.ConvertIdBuffToAttribute(tempIdInit);
            item.setValue(_idRate.ToString(), _rate);
            //check trong túi hay người
            if (listIdWearEquipped.Contains(tempIdItem))
            {
                _listEquippedInHero.Add(item);
            }
            else
            {
                _listEquipmentInBag.Add(item);
            }
        }
        _equipmentCurrentHero = new EquipmentsCharacter(_listEquippedInHero);
    }
コード例 #8
0
 private void ReadNewAttributes(EquipmentItem item, JSONNode N)
 {
     item.levelUpgraded = N["levelupgraded"].AsInt;
     item.setValue("1", float.Parse(N["mindamage"].Value.ToString()));
     item.setValue("2", float.Parse(N["maxdamage"].Value.ToString()));
     item.setValue("3", float.Parse(N["minmagic"].Value.ToString()));
     item.setValue("4", float.Parse(N["maxmagic"].Value.ToString()));
     item.setValue("5", float.Parse(N["critmax"].Value.ToString()));
     item.setValue("6", float.Parse(N["multicastmax"].Value.ToString()));
     item.setValue("7", float.Parse(N["min_incrdamage"].Value.ToString()));
     item.setValue("8", float.Parse(N["max_incrdamage"].Value.ToString()));
     item.setValue("9", float.Parse(N["min_incrmagic"].Value.ToString()));
     item.setValue("10", float.Parse(N["max_incrmagic"].Value.ToString()));
     item.setValue("11", float.Parse(N["min_rate"].Value.ToString()));
     item.setValue("12", float.Parse(N["max_rate"].Value.ToString()));
     item.setValue("13", float.Parse(N["minparryrate"].Value.ToString()));
     item.setValue("14", float.Parse(N["maxparryrate"].Value.ToString()));
     item.setValue("15", float.Parse(N["min_block"].Value.ToString()));
     item.setValue("16", float.Parse(N["max_block"].Value.ToString()));
     item.setValue("17", float.Parse(N["minphydef"].Value.ToString()));
     item.setValue("18", float.Parse(N["maxphydef"].Value.ToString()));
     item.setValue("19", float.Parse(N["minmagicdef"].Value.ToString()));
     item.setValue("20", float.Parse(N["maxmagicdef"].Value.ToString()));
     item.setValue("21", float.Parse(N["minphyreduction"].Value.ToString()));
     item.setValue("22", float.Parse(N["maxphyreduction"].Value.ToString()));
     item.setValue("23", float.Parse(N["minmagicreduction"].Value.ToString()));
     item.setValue("24", float.Parse(N["maxmagicreduction"].Value.ToString()));
     item.setValue("25", float.Parse(N["minphyabsorb"].Value.ToString()));
     item.setValue("26", float.Parse(N["maxphyabsorb"].Value.ToString()));
     item.setValue("27", float.Parse(N["minmagicabsorb"].Value.ToString()));
     item.setValue("28", float.Parse(N["maxmagicabsorb"].Value.ToString()));
     item.setValue("listidproperty", N["listidproperty"].ToString());
 }