public void UpgradeTroopsOrStarships(string uid, bool isStarship)
        {
            IDataController  dataController = Service.Get <IDataController>();
            IUpgradeableVO   upgradeableVO;
            InventoryStorage storage;

            if (isStarship)
            {
                upgradeableVO = dataController.Get <SpecialAttackTypeVO>(uid);
                this.Starships.SetLevel(upgradeableVO);
                storage = GameUtils.GetWorldOwner().Inventory.SpecialAttack;
            }
            else
            {
                upgradeableVO = dataController.Get <TroopTypeVO>(uid);
                this.Troops.SetLevel(upgradeableVO);
                TroopType type = ((TroopTypeVO)upgradeableVO).Type;
                if (type != TroopType.Hero)
                {
                    if (type != TroopType.Champion)
                    {
                        storage = GameUtils.GetWorldOwner().Inventory.Troop;
                    }
                    else
                    {
                        storage = GameUtils.GetWorldOwner().Inventory.Champion;
                    }
                }
                else
                {
                    storage = GameUtils.GetWorldOwner().Inventory.Hero;
                }
            }
            UnlockedLevelData.UpgradeTroopsOrStarshipsInventory(storage, isStarship, upgradeableVO.UpgradeGroup, upgradeableVO.Uid);
        }
 public unsafe static long $Invoke5(long instance, long *args)
 {
     UnlockedLevelData.UpgradeTroopsOrStarshipsInventory((InventoryStorage)GCHandledObjects.GCHandleToObject(*args), *(sbyte *)(args + 1) != 0, Marshal.PtrToStringUni(*(IntPtr *)(args + 2)), Marshal.PtrToStringUni(*(IntPtr *)(args + 3)));
     return(-1L);
 }