Ejemplo n.º 1
0
 public void BtnAddingRunestone()
 {
     if (isRollingInforce)
     {
         return;
     }
     if (_mainEquip != null && _itemRunstone != null)
     {
         isRollingInforce = true;
         _timeRolling     = _effectPatternUpgrade._timeRolling;;
         isHaveResult     = false;
         _resultUpgrade   = string.Empty;
         _effectPatternUpgrade.StartRolling();
         if (_mainEquip.typeItem == TypeEquipmentCharacter.Avatar)
         {
             StartCoroutine(ServerAdapter.UpgradeAddingRunestoneAvatar(CharacterInfo._instance._baseProperties.idHero, CharacterInfo._instance._baseProperties.idCodeHero,
                                                                       _mainEquip.idItem, int.Parse(_itemRunstone.getValue("idhg").ToString()),
                                                                       result =>
             {
                 isHaveResult   = true;
                 _resultUpgrade = result;
             }));
         }
         else
         {
             StartCoroutine(ServerAdapter.UpgradeAddingRunestone(CharacterInfo._instance._baseProperties.idHero, CharacterInfo._instance._baseProperties.idCodeHero,
                                                                 _mainEquip.idItem, int.Parse(_itemRunstone.getValue("idhg").ToString()),
                                                                 result =>
             {
                 isHaveResult   = true;
                 _resultUpgrade = result;
             }));
         }
     }
 }