public static bool IsPrerequisiteUnlockPresent(Commander comm, Unlock unlock)
 {
     if (!string.IsNullOrEmpty(unlock.RequiredInstalledUnlockIDs))
     {
         var requiredUnlockIDs = unlock.RequiredInstalledUnlockIDs.Split(',').Select(int.Parse);
         if (!comm.CommanderModules.Any(x => requiredUnlockIDs.Contains(x.ModuleUnlockID)))
             return false;
     }
     return true;
 }
		//
		// GET: /My/

        public static bool IsUnlockValidForSlot(Unlock unlock, CommanderSlot slot)
        {
            if (slot.UnlockType == UnlockTypes.WeaponBoth)
            {
                if (unlock.UnlockType != UnlockTypes.Weapon && unlock.UnlockType != UnlockTypes.WeaponManualFire)
                    return false;
            }
            else if (unlock.UnlockType != slot.UnlockType)
                return false;

            if (unlock.MorphLevel > slot.MorphLevel) return false;

            return true;
        }
Exemplo n.º 3
0
 public static string GetIconPosition(Unlock decoration)
 {
     return(GetIconPosition(decoration.CommanderDecorationIcon));
 }
 public static string GetIconPosition(Unlock decoration)
 {
     return GetIconPosition(decoration.CommanderDecorationIcon);
 }