private void OpenUpgradeDialog() { FacilityM facilityMaster = FarmDataManager.GetFacilityMaster(this.farmObject.facilityID); UserFacility userFacility = Singleton <UserDataMng> .Instance.GetUserFacility(this.farmObject.userFacilityID); if (userFacility != null && !string.IsNullOrEmpty(userFacility.completeTime)) { return; } if (int.Parse(facilityMaster.maxLevel) <= userFacility.level) { return; } int level = userFacility.level + 1; FacilityUpgradeM facilityUpgradeMaster = FarmDataManager.GetFacilityUpgradeMaster(userFacility.facilityId, level); MasterDataMng.AssetCategory assetCategory = (MasterDataMng.AssetCategory)facilityUpgradeMaster.upgradeAssetCategoryId1.ToInt32(); if (assetCategory == MasterDataMng.AssetCategory.TIP) { CMD_UpgradeConfirmation cmd_UpgradeConfirmation = GUIMain.ShowCommonDialog(null, "CMD_UpgradeConfirmation", null) as CMD_UpgradeConfirmation; cmd_UpgradeConfirmation.SetUserFacility(userFacility); } else { CMD_UpgradeConfirmationDigistone cmd_UpgradeConfirmationDigistone = GUIMain.ShowCommonDialog(null, "CMD_UpgradeConfirm_STONE", null) as CMD_UpgradeConfirmationDigistone; cmd_UpgradeConfirmationDigistone.SetUserFacility(userFacility); } }
public static void GetUrlPickUpPage(this GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo, out string title, out string url) { MasterDataMng.AssetCategory prizeAssetsCategory = gashaInfo.GetPrizeAssetsCategory(); if (prizeAssetsCategory != MasterDataMng.AssetCategory.CHIP) { if (prizeAssetsCategory != MasterDataMng.AssetCategory.DUNGEON_TICKET) { if (prizeAssetsCategory != MasterDataMng.AssetCategory.MONSTER) { title = string.Empty; url = string.Empty; } else { title = StringMaster.GetString("GashaLineupCaution"); url = WebAddress.EXT_ADR_GASHA_INCIDENCE + gashaInfo.gachaId; } } else { title = StringMaster.GetString("TicketGashaLineupCaution"); url = WebAddress.EXT_ADR_TICKET_GASHA_INCIDENCE + gashaInfo.gachaId; } } else { title = StringMaster.GetString("ChipGashaLineupCaution"); url = WebAddress.EXT_ADR_CHIP_GASHA_INCIDENCE + gashaInfo.gachaId; } }
private static bool IsOnlyCutScene(MasterDataMng.AssetCategory costCategory) { int num = (costCategory != MasterDataMng.AssetCategory.DIGI_STONE) ? 1 : 4; int monsterNum = ClassSingleton <MonsterUserDataMng> .Instance.GetMonsterNum(); return(monsterNum >= num); }
private static string GetInfoText(MasterDataMng.AssetCategory category, int payValue, int gashaCount) { string result = string.Empty; string arg = string.Empty; GameWebAPI.RespDataMA_GetAssetCategoryM respDataMA_AssetCategoryM = MasterDataMng.Instance().RespDataMA_AssetCategoryM; if (respDataMA_AssetCategoryM != null) { GameWebAPI.RespDataMA_GetAssetCategoryM respDataMA_GetAssetCategoryM = respDataMA_AssetCategoryM; int num = (int)category; GameWebAPI.RespDataMA_GetAssetCategoryM.AssetCategoryM assetCategory = respDataMA_GetAssetCategoryM.GetAssetCategory(num.ToString()); if (assetCategory != null) { arg = assetCategory.assetTitle; } } if (category == MasterDataMng.AssetCategory.DIGI_STONE || category != MasterDataMng.AssetCategory.LINK_POINT) { result = string.Format(StringMaster.GetString("GashaDigistone"), arg, payValue, gashaCount); } else { result = string.Format(StringMaster.GetString("GashaLinkpoint"), arg, payValue, gashaCount); } return(result); }
public void DialogDataSet(GameWebAPI.RespDataGA_ExecGacha.GachaRewardsData[] RewardsData) { this.titleLabel.text = StringMaster.GetString("CaptureBonusTitle"); this.presentBoxLabel.text = StringMaster.GetString("CaptureBonusText"); this.captureBonusItem.gameObject.SetActive(true); int num = (this.maxColumnNum + 1 >= RewardsData.Length) ? RewardsData.Length : (this.maxColumnNum + 1); float num2 = this.captureBonusItem.GetComponent <BoxCollider>().size.x + this.iconMergine; float num3 = num2 / 2f * (float)(num - 1); List <string> list = new List <string>(); for (int i = 0; i < RewardsData.Length; i++) { CaptureBonusItem captureBonusItem = UnityEngine.Object.Instantiate <CaptureBonusItem>(this.captureBonusItem); captureBonusItem.transform.parent = base.gameObject.transform; captureBonusItem.transform.localScale = this.captureBonusItem.transform.localScale; captureBonusItem.transform.localRotation = this.captureBonusItem.transform.localRotation; captureBonusItem.transform.localPosition = new Vector3(this.captureBonusItem.transform.localPosition.x - num3 + num2 * (float)i, this.captureBonusItem.transform.localPosition.y, this.captureBonusItem.transform.localPosition.z); if (i >= this.maxColumnNum) { captureBonusItem.ActivateMore(); list.Add(StringMaster.GetString("ItemTruncated")); break; } GameWebAPI.RespDataMA_GetAssetCategoryM.AssetCategoryM assetCategory = MasterDataMng.Instance().RespDataMA_AssetCategoryM.GetAssetCategory(RewardsData[i].assetCategoryId); MasterDataMng.AssetCategory assetCategoryId = (MasterDataMng.AssetCategory) int.Parse(RewardsData[i].assetCategoryId); list.Add(captureBonusItem.DialogDataSet(assetCategory, assetCategoryId, RewardsData[i])); } this.captureBonusItem.gameObject.SetActive(false); this.itemDetileLabel.text = string.Join("\n", list.ToArray()); }
public void DrawDropIcon(bool isSkip = false, Action callback = null) { MasterDataMng.AssetCategory assetCategoryId = this.data.assetCategoryId; if (assetCategoryId != MasterDataMng.AssetCategory.ITEM) { NGUITools.SetActiveSelf(this.boxIcons.gameObject, false); } else { this.boxIcons.spriteName = "Common02_item_flame"; this.boxIcons.depth = this.dropItemItems.depth - 1; } this.isPlayIconAnimation = true; this.data.isEndOpenAnimation = true; if (isSkip) { NGUITools.SetActiveSelf(this.dropItemItems.gameObject, true); if (callback != null) { callback(); } } else { this.SetFade(this.dropItemItems.gameObject, callback); this.ShowParticle(); } }
public static CMD CreateDialog(MasterDataMng.AssetCategory category, string assetsValue, string title, int assetsNumber, int payValue, Action OnPushedYes, int gashaCount, object useDetail) { CMD result; if (category != MasterDataMng.AssetCategory.DIGI_STONE) { if (category != MasterDataMng.AssetCategory.LINK_POINT) { } CMD_ChangePOP cmd_ChangePOP = GUIMain.ShowCommonDialog(null, "CMD_ChangePOP", null) as CMD_ChangePOP; cmd_ChangePOP.Title = title; cmd_ChangePOP.OnPushedYesAction = OnPushedYes; cmd_ChangePOP.Info = FactoryPayConfirmNotice.GetInfoText(category, payValue, gashaCount); cmd_ChangePOP.SetPoint(assetsNumber, payValue); cmd_ChangePOP.SetUseDetail(useDetail); cmd_ChangePOP.SetAsset(category, assetsValue); result = cmd_ChangePOP; } else { CMD_ChangePOP_STONE cmd_ChangePOP_STONE = GUIMain.ShowCommonDialog(null, "CMD_ChangePOP_STONE", null) as CMD_ChangePOP_STONE; cmd_ChangePOP_STONE.Title = title; cmd_ChangePOP_STONE.OnPushedYesAction = OnPushedYes; cmd_ChangePOP_STONE.Info = FactoryPayConfirmNotice.GetInfoText(category, payValue, gashaCount); cmd_ChangePOP_STONE.SetDigistone(assetsNumber, payValue); cmd_ChangePOP_STONE.SetUseDetail(useDetail); result = cmd_ChangePOP_STONE; } return(result); }
public void SetParam(GameWebAPI.RespDataMA_GetAssetCategoryM.AssetCategoryM data) { MasterDataMng.AssetCategory assetCategory = (MasterDataMng.AssetCategory) int.Parse(data.assetCategoryId); if (assetCategory != MasterDataMng.AssetCategory.DIGI_STONE) { if (assetCategory != MasterDataMng.AssetCategory.LINK_POINT) { if (assetCategory == MasterDataMng.AssetCategory.TIP) { this.titleLabel.text = data.assetTitle; this.textLabel.text = StringMaster.GetString("TipDetileText"); this.iconSprite.spriteName = "Common02_LB_Chip"; } } else { this.titleLabel.text = data.assetTitle; this.textLabel.text = StringMaster.GetString("LinkPointDetileText"); this.iconSprite.spriteName = "Common02_LB_Link"; } } else { this.titleLabel.text = data.assetTitle; this.textLabel.text = StringMaster.GetString("DigistoneDetileText"); this.iconSprite.spriteName = "Common02_LB_Stone"; } this.iconSprite.depth = this.iconTexture.depth; this.iconSprite.gameObject.SetActive(true); this.iconTexture.gameObject.SetActive(false); }
public static void CalculateNumber(MasterDataMng.AssetCategory category, string assetsValue, int value) { if (category != MasterDataMng.AssetCategory.DIGI_STONE) { if (category != MasterDataMng.AssetCategory.LINK_POINT) { if (category == MasterDataMng.AssetCategory.ITEM) { int itemId = 0; if (int.TryParse(assetsValue, out itemId)) { Singleton <UserDataMng> .Instance.UpdateUserItemNum(itemId, -value); Debug.Assert(0 <= Singleton <UserDataMng> .Instance.GetUserItemNumByItemId(itemId), "アイテム所持数が負の値になりました"); } } } else if (DataMng.Instance().RespDataUS_PlayerInfo != null && DataMng.Instance().RespDataUS_PlayerInfo.playerInfo != null) { int num = 0; if (int.TryParse(DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.friendPoint, out num)) { num -= value; DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.friendPoint = num.ToString(); Debug.Assert(0 <= num, "リンクポイントが負の値になりました"); } } } else if (DataMng.Instance().RespDataUS_PlayerInfo != null && DataMng.Instance().RespDataUS_PlayerInfo.playerInfo != null) { DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.point -= value; Debug.Assert(0 <= DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.point, "デジストーンが負の値になりました"); } }
public void SetAsset(MasterDataMng.AssetCategory category, string assetsValue) { this.assetsNumberIcon.SetAssetsCategory(category, assetsValue); this.assetsNumberIcon.SetIcon(); this.assetsCostIcon.SetAssetsCategory(category, assetsValue); this.assetsCostIcon.SetIcon(); }
private string GetSpriteName(MasterDataMng.AssetCategory assetCategoryId) { string result = string.Empty; switch (assetCategoryId) { case MasterDataMng.AssetCategory.DIGI_STONE: result = "Common02_LB_Stone"; break; case MasterDataMng.AssetCategory.LINK_POINT: result = "Common02_LB_Link"; break; case MasterDataMng.AssetCategory.TIP: result = "Common02_LB_Chip"; break; case MasterDataMng.AssetCategory.EXP: result = "Common02_Drop_Exp"; break; default: if (assetCategoryId == MasterDataMng.AssetCategory.MEAT) { result = "Common02_item_meat"; } break; } return(result); }
public void SetAssets(MasterDataMng.AssetCategory category, string assetsValue, string price) { this.assetsIcon.SetAssetsCategory(category, assetsValue); this.assetsIcon.SetIcon(); this.assetsNumber.SetNumber(price); this.playPrice = price; }
public static ExecGashaBase CreateExecGasha(GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo, bool isTutorial) { ExecGashaBase execGashaBase = null; MasterDataMng.AssetCategory prizeAssetsCategory = gashaInfo.GetPrizeAssetsCategory(); if (prizeAssetsCategory != MasterDataMng.AssetCategory.MONSTER) { if (prizeAssetsCategory != MasterDataMng.AssetCategory.CHIP) { if (prizeAssetsCategory == MasterDataMng.AssetCategory.DUNGEON_TICKET) { execGashaBase = new ExecGashaTicket(); } } else { execGashaBase = new ExecGashaChip(); } } else if (isTutorial && FactoryExecGasha.IsOnlyCutScene(gashaInfo.priceType.GetCostAssetsCategory())) { execGashaBase = new ExecGashaMonsterCutSceneOnly(); } else { execGashaBase = new ExecGashaMonster(); } Debug.Assert(null != execGashaBase, "ガシャ実行機能の作成に失敗."); execGashaBase.SetGashaInfo(gashaInfo); return(execGashaBase); }
private string GetPresentName(GameWebAPI.RespDataMA_GetAssetCategoryM.AssetCategoryM masterAssetCategory, string objectId) { string result = StringMaster.GetString("Present-10"); if (masterAssetCategory != null) { result = masterAssetCategory.assetTitle; } MasterDataMng.AssetCategory assetCategory = (MasterDataMng.AssetCategory)masterAssetCategory.assetCategoryId.ToInt32(); switch (assetCategory) { case MasterDataMng.AssetCategory.FACILITY_KEY: { FacilityKeyM facilityKeyMaster = FarmDataManager.GetFacilityKeyMaster(objectId); if (facilityKeyMaster != null) { result = facilityKeyMaster.facilityKeyName; } break; } default: if (assetCategory != MasterDataMng.AssetCategory.MONSTER) { if (assetCategory == MasterDataMng.AssetCategory.ITEM) { GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(objectId); if (itemM != null) { result = itemM.name; } } } else { GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple = MonsterMaster.GetMonsterMasterByMonsterId(objectId).Simple; if (simple != null) { GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = MonsterMaster.GetMonsterMasterByMonsterGroupId(simple.monsterGroupId).Group; if (group != null) { result = group.monsterName; } } } break; case MasterDataMng.AssetCategory.DUNGEON_TICKET: { GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM dungeonTicketM = MasterDataMng.Instance().RespDataMA_DungeonTicketMaster.dungeonTicketM.FirstOrDefault((GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM x) => objectId == x.dungeonTicketId); if (dungeonTicketM != null) { result = dungeonTicketM.name; } break; } } return(result); }
public DropAssetPattern(float MinRange, float MaxRange, DropBoxType DropBoxType, MasterDataMng.AssetCategory DropAssetType, int DropNumber) { this._minRange = MinRange; this._maxRange = MaxRange; this._dropBoxType = DropBoxType; this._dropAssetType = DropAssetType; this._dropNumber = DropNumber; }
public void SetGashaPriceType(GameWebAPI.RespDataGA_GetGachaInfo.PriceType priceType) { MasterDataMng.AssetCategory costAssetsCategory = priceType.GetCostAssetsCategory(); string costAssetsValue = priceType.GetCostAssetsValue(); this.SetAssets(this.leftAssetsIcon, this.leftAssetsNumber, costAssetsCategory, costAssetsValue); this.rightAssets.SetActive(false); }
private void SetAssetIcon(string assetCategoryId, string assetValue, UIAssetsIcon icon) { int num; if (int.TryParse(assetCategoryId, out num)) { MasterDataMng.AssetCategory category = (MasterDataMng.AssetCategory)num; icon.SetAssetsCategory(category, assetValue); icon.SetIcon(); } }
public static MasterDataMng.AssetCategory GetPrizeAssetsCategory(this GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo) { MasterDataMng.AssetCategory assetCategory = MasterDataMng.AssetCategory.NO_DATA_ID; int num = 0; if (int.TryParse(gashaInfo.prize, out num)) { assetCategory = (MasterDataMng.AssetCategory)num; } Debug.Assert(MasterDataMng.AssetCategory.NO_DATA_ID != assetCategory, "ガシャ景品のアセットカテゴリーの取得失敗."); return(assetCategory); }
public static MasterDataMng.AssetCategory GetCostAssetsCategory(this GameWebAPI.RespDataGA_GetGachaInfo.PriceType priceType) { MasterDataMng.AssetCategory assetCategory = MasterDataMng.AssetCategory.NO_DATA_ID; int num = 0; if (int.TryParse(priceType.category, out num)) { assetCategory = (MasterDataMng.AssetCategory)num; } Debug.Assert(MasterDataMng.AssetCategory.NO_DATA_ID != assetCategory, "支払うアセットカテゴリーIDの取得に失敗."); return(assetCategory); }
public void SetGashaInfo(GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo, bool isTutorial) { this.gashaInfo = gashaInfo; this.isTutorial = isTutorial; MasterDataMng.AssetCategory costAssetsCategory = gashaInfo.priceType.GetCostAssetsCategory(); string costAssetsValue = gashaInfo.priceType.GetCostAssetsValue(); for (int i = 0; i < gashaInfo.details.Length; i++) { this.buttonList[i].SetAssets(costAssetsCategory, costAssetsValue, gashaInfo.details[i].GetPrice()); this.buttonList[i].SetPopText(gashaInfo, gashaInfo.details[i], isTutorial); } }
public void SetButtonAppearance(MasterDataMng.AssetCategory category, string assetsValue, int number, string gashaPlayPrice) { int num = 0; int.TryParse(gashaPlayPrice, out num); if (num <= number || category == MasterDataMng.AssetCategory.DIGI_STONE) { this.background.spriteName = this.activeButtonSpriteName; this.guiCollider.activeCollider = true; } else { this.DisableButton(); } }
public static int GetNumberExceptProtectedAssets(MasterDataMng.AssetCategory category, string assetsValue) { int num = -1; if (category != MasterDataMng.AssetCategory.MONSTER) { if (category != MasterDataMng.AssetCategory.CHIP) { num = UserInventory.GetNumber(category, assetsValue); } else if (ChipDataMng.userChipData != null && ChipDataMng.userChipData.userChipList != null) { if (string.IsNullOrEmpty(assetsValue) || "0" == assetsValue) { num = 0; for (int i = 0; i < ChipDataMng.userChipData.userChipList.Length; i++) { if (ChipDataMng.userChipData.userChipList[i].userMonsterId == 0) { num++; } } } else { int num2 = 0; if (int.TryParse(assetsValue, out num2)) { num = 0; for (int j = 0; j < ChipDataMng.userChipData.userChipList.Length; j++) { GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList = ChipDataMng.userChipData.userChipList[j]; if (userChipList.chipId == num2 && userChipList.userMonsterId == 0) { num++; } } } } } } else { Debug.LogError("未実装"); } Debug.Assert(-1 != num, "アセット所持数の取得に失敗."); return(num); }
public static void CreateDialog(MasterDataMng.AssetCategory category, LimitOverNoticeType type) { if (category != MasterDataMng.AssetCategory.MONSTER) { if (category == MasterDataMng.AssetCategory.CHIP) { CMD_UpperlimitChip cmd_UpperlimitChip = GUIMain.ShowCommonDialog(null, "CMD_UpperlimitChip", null) as CMD_UpperlimitChip; cmd_UpperlimitChip.SetNoticeMessage(type); } } else { CMD_UpperLimit cmd_UpperLimit = GUIMain.ShowCommonDialog(null, "CMD_Upperlimit", null) as CMD_UpperLimit; cmd_UpperLimit.SetNoticeMessage(type); } }
private void OpenExchangedItemModalMessage(ExchangeItem exchangeItem) { MasterDataMng.AssetCategory assetCategory = (MasterDataMng.AssetCategory) int.Parse(exchangeItem.exchangeItemData.assetCategoryId); switch (assetCategory) { case MasterDataMng.AssetCategory.DIGI_STONE: DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.point -= int.Parse(this.consumeNum); break; default: if (assetCategory == MasterDataMng.AssetCategory.MEAT) { int num = int.Parse(DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.meatNum) - int.Parse(this.consumeNum); DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.meatNum = num.ToString(); } break; case MasterDataMng.AssetCategory.TIP: { int num2 = int.Parse(DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.gamemoney) - int.Parse(this.consumeNum); DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.gamemoney = num2.ToString(); break; } case MasterDataMng.AssetCategory.ITEM: { GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(exchangeItem.exchangeItemData.assetValue); if (itemM != null && int.Parse(itemM.itemId) == 2) { Singleton <UserDataMng> .Instance.UpdateUserItemNum(2, -int.Parse(this.consumeNum)); } break; } } int num3 = int.Parse(exchangeItem.exchangeDetailNum, NumberStyles.AllowThousands); string exchangeDetailName = exchangeItem.exchangeDetailName; string arg = StringFormat.Cluster(num3 * exchangeItem.numCounter); string info = string.Format(StringMaster.GetString("ExchangeSuccessInfo"), exchangeDetailName, arg); CMD_ModalMessage cmd_ModalMessage = GUIMain.ShowCommonDialog(new Action <int>(this.RunReExchangeInfoLogicAPI), "CMD_ModalMessage", null) as CMD_ModalMessage; cmd_ModalMessage.Title = StringMaster.GetString("ExchangeSuccessTitle"); cmd_ModalMessage.Info = info; GUIPlayerStatus.RefreshParams_S(true); }
private string GetTexturePath(MasterDataMng.AssetCategory assetCategoryId, string objectId) { string result = string.Empty; switch (assetCategoryId) { case MasterDataMng.AssetCategory.SOUL: result = ClassSingleton <EvolutionData> .Instance.GetEvolveItemIconPathByID(objectId); break; default: if (assetCategoryId == MasterDataMng.AssetCategory.ITEM) { GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(objectId); if (itemM != null) { result = itemM.GetLargeImagePath(); } } break; case MasterDataMng.AssetCategory.FACILITY_KEY: { FacilityConditionM[] facilityCondition = FarmDataManager.GetFacilityCondition(objectId); FacilityConditionM facilityConditionM = facilityCondition.FirstOrDefault((FacilityConditionM x) => int.Parse(x.conditionType) == 1); FacilityM facilityMasterByReleaseId = FarmDataManager.GetFacilityMasterByReleaseId(facilityConditionM.releaseId); result = facilityMasterByReleaseId.GetIconPath(); break; } case MasterDataMng.AssetCategory.DUNGEON_TICKET: { GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM dungeonTicketM = MasterDataMng.Instance().RespDataMA_DungeonTicketMaster.dungeonTicketM.FirstOrDefault((GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM x) => objectId == x.dungeonTicketId); if (dungeonTicketM != null) { result = dungeonTicketM.img; } break; } } return(result); }
private string CreateLoginRewardMessage(string format, GameWebAPI.RespDataCM_LoginBonus.LoginReward reward) { int num = int.Parse(reward.assetCategoryId); string arg = string.Empty; MasterDataMng.AssetCategory assetCategory = (MasterDataMng.AssetCategory)num; switch (assetCategory) { case MasterDataMng.AssetCategory.GATHA_TICKET: arg = StringMaster.GetString("SystemCountSheets"); goto IL_86; case MasterDataMng.AssetCategory.MULTI_ITEM: case MasterDataMng.AssetCategory.MEAT: case MasterDataMng.AssetCategory.SOUL: case MasterDataMng.AssetCategory.NO_DATA_ID: break; default: switch (assetCategory) { case MasterDataMng.AssetCategory.MONSTER: arg = StringMaster.GetString("SystemCountBody"); goto IL_86; case MasterDataMng.AssetCategory.DIGI_STONE: case MasterDataMng.AssetCategory.ITEM: break; case MasterDataMng.AssetCategory.LINK_POINT: case MasterDataMng.AssetCategory.TIP: case MasterDataMng.AssetCategory.EXP: goto IL_86; default: goto IL_86; } break; } arg = StringMaster.GetString("SystemCountNumber"); IL_86: return(string.Format(format, DataMng.Instance().GetAssetTitle(reward.assetCategoryId, reward.assetValue), reward.assetNum, arg)); }
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()); }
private bool SetSprite(MasterDataMng.AssetCategory category, UISprite sprite) { bool result = true; switch (category) { case MasterDataMng.AssetCategory.DIGI_STONE: sprite.spriteName = "Common02_LB_Stone"; break; case MasterDataMng.AssetCategory.LINK_POINT: sprite.spriteName = "Common02_LB_Link"; break; case MasterDataMng.AssetCategory.TIP: sprite.spriteName = "Common02_LB_Chip"; break; case MasterDataMng.AssetCategory.EXP: sprite.spriteName = "Common02_Drop_Exp"; break; default: if (category != MasterDataMng.AssetCategory.MEAT) { if (category != MasterDataMng.AssetCategory.TITLE) { result = false; } else { sprite.spriteName = "Common02_item_title"; } } else { sprite.spriteName = "Common02_item_meat"; } break; } return(result); }
public void SetAssetsCategory(MasterDataMng.AssetCategory category, string assetsValue) { this.assetsCategory = category; this.assetValue = assetsValue; if (this.IsSprite(category)) { this.iconSprite.enabled = true; this.iconTexture.enabled = false; } else if (this.IsTexture(category)) { this.iconTexture.enabled = true; this.iconSprite.enabled = false; } else { this.iconSprite.enabled = false; this.iconTexture.enabled = false; } }
private string GetTexturePath(MasterDataMng.AssetCategory assetCategoryId, string objectId) { string result = string.Empty; if (assetCategoryId != MasterDataMng.AssetCategory.ITEM) { if (assetCategoryId == MasterDataMng.AssetCategory.SOUL) { result = ClassSingleton <EvolutionData> .Instance.GetEvolveItemIconPathByID(objectId); } } else { GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(objectId); if (itemM != null) { result = itemM.GetLargeImagePath(); } } return(result); }