コード例 #1
0
 internal void SetMainEquipment()
 {
     _mainEquip      = _myBag.GetEquipmentSelected();
     _levelEquipment = (_mainEquip.levelRequired - 1) / 10 + 1;
     _myItemUI.gameObject.SetActive(true);
     _myItemUI.SetData(0, _mainEquip.idItemInit, _mainEquip.levelUpgraded, _mainEquip.rarelyItem,
                       (_mainEquip.typeItem == TypeEquipmentCharacter.Buff ? 1 : (_mainEquip.typeItem == TypeEquipmentCharacter.Avatar ? 2 : 0)));
     _imgMainSlot.color = new Color32(255, 255, 255, 10);
     CalculateGroupRunestone();
     _newEquipAfterUpgrade = new EquipmentItem(_mainEquip);
 }
コード例 #2
0
    internal void SetMainEquipment()
    {
        _mainEquip = _myBag.GetEquipmentSelected();

        _myItemUI.gameObject.SetActive(true);
        _myItemUI.SetData(0, _mainEquip.idItemInit, _mainEquip.levelUpgraded, _mainEquip.rarelyItem,
                          (_mainEquip.typeItem == TypeEquipmentCharacter.Buff ? 1 : (_mainEquip.typeItem == TypeEquipmentCharacter.Avatar ? 2 : 0)));
        _imgMainSlot.color = new Color32(255, 255, 255, 10);

        _itemAlchemyMaterial   = null;
        _numberAlchemyMaterial = 0;
        if (_mainEquip.typeItem == TypeEquipmentCharacter.Avatar || _mainEquip.typeItem == TypeEquipmentCharacter.Buff)
        {
            isSpecialUpgrade = true;

            for (int i = 0; i < SplitDataFromServe._listGemInBag.Count; i++)
            {
                if (SplitDataFromServe._listGemInBag[i].GetTypeItem() == ITEMTYPE.RUNESTONE_SPECIALALCHEMY)
                {
                    _itemAlchemyMaterial   = SplitDataFromServe._listGemInBag[i];
                    _numberAlchemyMaterial = int.Parse(_itemAlchemyMaterial.getValue("quantity").ToString());
                }
            }
            _txtNumberAlchemyMaterial.text = string.Format("{0}/1", _numberAlchemyMaterial);
            StartCoroutine(LoadIconRunestone(25, _alchemyMaterialImg));
            if (_groupLevelEquipment != 0)
            {
                ResetMatertialLucky();
            }
            _groupLevelEquipment = 0;
        }
        else
        {
            isSpecialUpgrade = false;
            for (int i = 0; i < SplitDataFromServe._listGemInBag.Count; i++)
            {
                if (SplitDataFromServe._listGemInBag[i].GetTypeItem() == ITEMTYPE.RUNESTONE_MASTERIALALCHEMY)
                {
                    _itemAlchemyMaterial   = SplitDataFromServe._listGemInBag[i];
                    _numberAlchemyMaterial = int.Parse(_itemAlchemyMaterial.getValue("quantity").ToString());
                }
            }
            _txtNumberAlchemyMaterial.text = string.Format("{0}/1", _numberAlchemyMaterial);
            StartCoroutine(LoadIconRunestone(23, _alchemyMaterialImg));
            int newGroup = (_mainEquip.levelRequired - 1) / 10 + 1;
            if (newGroup != _groupLevelEquipment)
            {
                ResetMatertialLucky();
            }
            _groupLevelEquipment = newGroup;
        }
        _newEquipAfterUpgrade = new EquipmentItem(_mainEquip);
    }
コード例 #3
0
    internal void SetMainEquipment()
    {
        _mainEquip = _myBag.GetEquipmentSelected();

        _myItemUI.gameObject.SetActive(true);
        _myItemUI.SetData(0, _mainEquip.idItemInit, _mainEquip.levelUpgraded, _mainEquip.rarelyItem,
                          (_mainEquip.typeItem == TypeEquipmentCharacter.Buff ? 1 : (_mainEquip.typeItem == TypeEquipmentCharacter.Avatar ? 2 : 0)));
        _imgMainSlot.color = new Color32(255, 255, 255, 10);

        _levelEquipmentID = (_mainEquip.levelRequired - 1) / 10 + 1;
        _rareEquipmentID  = _mainEquip.rarelyItem;

        //CaculateDismantle();
    }