Exemplo n.º 1
0
        private static bool CheckMaterialNum(GameWebAPI.RespDataMA_GetMonsterMS.MonsterM monsterM, List <HaveSoulData> almightyHsdL)
        {
            List <GameWebAPI.RespDataMA_GetMonsterEvolutionM.Evolution> monsterVersionUpList = ClassSingleton <EvolutionData> .Instance.GetMonsterVersionUpList(monsterM.monsterId);

            int  monsterEvolutionMaterialId = monsterVersionUpList[0].monsterEvolutionMaterialId;
            bool result = true;

            GameWebAPI.MonsterEvolutionMaterialMaster.Material evolutionMaterial = EvolutionMaterialData.GetEvolutionMaterial(monsterEvolutionMaterialId);
            for (int i = 1; i <= 7; i++)
            {
                string assetValue = evolutionMaterial.GetAssetValue(i);
                string assetNum   = evolutionMaterial.GetAssetNum(i);
                int    num        = assetNum.ToInt32();
                GameWebAPI.UserSoulData userSoulDataBySID = VersionUpMaterialData.GetUserSoulDataBySID(assetValue);
                int num2 = userSoulDataBySID.num.ToInt32();
                if (num > num2)
                {
                    HaveSoulData haveSoulData = null;
                    bool         flag         = VersionUpMaterialData.CanChangeToAlmighty(almightyHsdL, assetValue, num, ref haveSoulData);
                    if (!flag)
                    {
                        result = false;
                        break;
                    }
                }
            }
            return(result);
        }
Exemplo n.º 2
0
 public static bool CanChangeToAlmighty(List <HaveSoulData> hsdL, string soulId, int needNum, ref HaveSoulData selectAlMighty)
 {
     GameWebAPI.RespDataMA_GetSoulM       respDataMA_SoulM   = MasterDataMng.Instance().RespDataMA_SoulM;
     GameWebAPI.RespDataMA_GetSoulM.SoulM soulMasterBySoulId = VersionUpMaterialData.GetSoulMasterBySoulId(soulId);
     if (respDataMA_SoulM.IsVersionUpGroup(soulMasterBySoulId) && !respDataMA_SoulM.IsVersionUpAlMighty(soulMasterBySoulId))
     {
         for (int i = 0; i < hsdL.Count; i++)
         {
             if (hsdL[i].haveNum - hsdL[i].curUsedNum >= needNum)
             {
                 selectAlMighty = hsdL[i];
                 return(true);
             }
         }
     }
     return(false);
 }
Exemplo n.º 3
0
 public static void SetVersionUpCondition(List <HaveSoulData> almightyHsdL, GUIMonsterIcon monsterIcon, MonsterData monsterData, bool isOnlyDim = false)
 {
     if (VersionUpMaterialData.CanVersionUp(monsterData.monsterM, monsterData.userMonster, almightyHsdL))
     {
         if (isOnlyDim)
         {
             return;
         }
         monsterIcon.SortMess = StringMaster.GetString("CharaIcon-05");
         monsterIcon.SetSortMessageColor(ConstValue.DIGIMON_YELLOW);
     }
     else
     {
         monsterIcon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.NOTACTIVE);
         if (isOnlyDim)
         {
             return;
         }
         monsterIcon.SortMess = StringMaster.GetString("CharaIcon-06");
         monsterIcon.SetSortMessageColor(ConstValue.DIGIMON_BLUE);
     }
 }
Exemplo n.º 4
0
 public static bool CanVersionUpWithoutMaterial(GameWebAPI.RespDataMA_GetMonsterMS.MonsterM monsterM, GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList userMonster)
 {
     return(VersionUpMaterialData.IsMaxLevel(monsterM, userMonster) && VersionUpMaterialData.IsEnoughCluster(monsterM));
 }
Exemplo n.º 5
0
 public static bool CanVersionUp(GameWebAPI.RespDataMA_GetMonsterMS.MonsterM monsterM, GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList userMonster, List <HaveSoulData> almightyHsdL)
 {
     return(VersionUpMaterialData.IsMaxLevel(monsterM, userMonster) && VersionUpMaterialData.CheckMaterialNum(monsterM, almightyHsdL) && VersionUpMaterialData.IsEnoughCluster(monsterM));
 }