private int CalcAbleCount() { int result = 0; int numberExceptProtectedAssets = UserInventory.GetNumberExceptProtectedAssets(this.gashaInfo.priceType.GetCostAssetsCategory(), this.gashaInfo.priceType.GetCostAssetsValue()); GameWebAPI.RespDataGA_GetGachaInfo.Detail detail = this.gashaInfo.details.GetDetail(1); if (detail != null) { result = detail.GetOnceRemainingPlayCount(numberExceptProtectedAssets); } return(result); }
public int GetUserInventoryNumber(int assetsCategory, string assetsValue) { global::Debug.Assert(assetsCategory != 0, "アセットカテゴリーIDが設定されていません"); int result; if (string.IsNullOrEmpty(assetsValue)) { result = UserInventory.GetNumber((MasterDataMng.AssetCategory)assetsCategory); } else if (this.countProtectedAssets) { result = UserInventory.GetNumber((MasterDataMng.AssetCategory)assetsCategory, assetsValue); } else { result = UserInventory.GetNumberExceptProtectedAssets((MasterDataMng.AssetCategory)assetsCategory, assetsValue); } return(result); }
public void SetUserInventoryNumber(MasterDataMng.AssetCategory assetsCategory, string assetsValue) { global::Debug.Assert(assetsCategory != MasterDataMng.AssetCategory.NONE, "アセットカテゴリーIDが設定されていません"); int num; if (string.IsNullOrEmpty(assetsValue)) { num = UserInventory.GetNumber(assetsCategory); } else if (this.countProtectedAssets) { num = UserInventory.GetNumber(assetsCategory, assetsValue); } else { num = UserInventory.GetNumberExceptProtectedAssets(assetsCategory, assetsValue); } this.SetNumber(num.ToString()); }