public void BuyItem() { StoreItemInfoUI storeItemUIInfo = nowTouchInfo.storeItemController.GetStoreItemInfo(nowTouchInfo.type); if (storeItemUIInfo.item_Type == Store_Item_Type.ChargeItem) { if (purchaseManager != null) { uint characterUniqueID = 0; if (AsGameMain.s_gameState == GAME_STATE.STATE_INGAME) characterUniqueID = AsUserInfo.Instance.GetCurrentUserCharacterInfo().nCharUniqKey; ShowLoadingIndigator(); prevStoreItemInfo = storeItemUIInfo; LockInput(true); purchaseManager.RequestItemRegisterKey(AsUserInfo.Instance.LoginUserUniqueKey, characterUniqueID, storeItemUIInfo.itemSlot, storeItemUIInfo.itemID); } } else { prevStoreItemInfo = storeItemUIInfo; isLockInput = true; #region -kor ver- if (false) AsCommonSender.SendRequestBuyCashItem(storeItemUIInfo.itemSlot, 1); #endregion AsCommonSender.SendRequestBuyCashItemJpn(storeItemUIInfo.itemSlot,int.Parse(storeItemUIInfo.itemID), 1, 0); } }
public void SetPrevStoreItemInfoUI(StoreItemInfoUI _info) { prevStoreItemInfo = _info; }
void OpenFreeGacha() { int freeGachaCoupon = (int)AsTableManager.Instance.GetTbl_GlobalWeight_Record("Gachare_ChargeItem").Value; List<RealItem> slotList = ItemMgr.HadItemManagement.Inven.GetHaveInvenItemsID(freeGachaCoupon); int slot = 0; if (AsCashStore.Instance.FreeGachaPoint <= 0) slot = slotList.Count == 0 ? 0 : slotList[0].getSlot; StoreItemInfoUI info = new StoreItemInfoUI(Store_Item_Type.GachaItem, listFilteredItem[0].ID.ToString(), listFilteredItem[0].Price.ToString(), listFilteredItem[0].Count, listFilteredItem[0].Key, string.Empty); if (AsHudDlgMgr.Instance.IsOpenCashStore == true) AsHudDlgMgr.Instance.cashStore.SetPrevStoreItemInfoUI(info); AsCommonSender.SendRequestBuyCashItemJpn(listFilteredItem[0].Key, listFilteredItem[0].ID, 1, slot); }
public void PrepareBuyItem( StoreItemInfoUI _storeItemInfo) { base.LockInput(true); if( _storeItemInfo.item_Type == Store_Item_Type.ChargeItem) { #region -for japan- /*GameObject objMsgBoxPrefab = ResourceLoad.LoadGameObject( "UI/AsGUI/GUI_MiraclePopup"); GameObject msgBox = GameObject.Instantiate( objMsgBoxPrefab) as GameObject; msgBox.transform.parent = transform; msgBox.transform.localPosition = Vector3.zero; askSendGiftMsgBox = msgBox.GetComponentInChildren<AskSendGiftMsgBox>(); foundFriendUniqueID = 0; askSendGiftMsgBox.Initilize( this, "Deal", "FindFriend", "Cancel");*/ #endregion Deal(); } else ShowAskDealMessageBox( AsTableManager.Instance.GetTbl_String(126), string.Format( AsTableManager.Instance.GetTbl_String(1411), _storeItemInfo.itemName, _storeItemInfo.itemPrice), "Deal"); }
public void Open( StoreItemInfoUI _info, int _itemMax, OkDelegateFromOut _okProcess, CancelDelegateFromOut _cancelProcess, GameObject _IconImg, Item.eGOODS_TYPE _goodsType) { quantityInfo = new StoreQuantityInfo( _info.itemName, _info.itemID, _info.itemPrice, _info.itemSlot, _itemMax); gameObject.SetActiveRecursively( true); itemCount = 1; itemMax = _itemMax; itemBunch = _info.itemBunch; tradeItemID = _info.tradeItemID; tradeItemCount = _info.tradeItemCount; textItemName.Text = _info.itemName; if (_info.tradeItemID == -1) textGold.Text = ( System.Convert.ToInt32( _info.itemPrice) * _info.itemBunch).ToString( "#,#0", CultureInfo.InvariantCulture); else textGold.Text = (_info.tradeItemCount).ToString("#,#0", CultureInfo.InvariantCulture); textCount.Text = "1"; OkProcessFromOut = _okProcess; CancelProcessFromOut = _cancelProcess; // add Icon if( objIconImg != null) GameObject.DestroyImmediate( objIconImg); // check goods if (_info.tradeItemID != -1) { goldSprite.Hide(true); if (objTradeIcon != null) { GameObject.Destroy(objTradeIcon); objTradeIcon = null; } GameObject objGoods = AsNpcStore.GetItemIcon(_info.tradeItemID.ToString(), 1); objGoods.transform.parent = goldSprite.transform.parent; objGoods.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f); objGoods.transform.localPosition = goldSprite.transform.localPosition; objTradeIcon = objGoods; } else { if (objTradeIcon != null) { GameObject.Destroy(objTradeIcon); objTradeIcon = null; } } if( goldSprite != null) { if( _goodsType == Item.eGOODS_TYPE.Gold) goldSprite.Hide( false); else goldSprite.Hide( true); } objIconImg = _IconImg; _IconImg.transform.parent = objectIconParent.transform; _IconImg.transform.localPosition = Vector3.zero; }
public void PrepareBuyItem( StoreItemInfoUI _storeItemInfo) { ItemData itemData = ItemMgr.ItemManagement.GetItem( System.Convert.ToInt32( _storeItemInfo.itemID)).ItemData; int itemOverrap = itemData.overlapCount; Item.eGOODS_TYPE goodsType = itemData.getGoodsType; if( itemOverrap == 1) BuyItemOnlyOne( _storeItemInfo.itemID, _storeItemInfo.itemName, _storeItemInfo.itemPrice, _storeItemInfo.itemSlot); else { GameObject objIcon = GetItemIcon( _storeItemInfo.itemID, _storeItemInfo.itemBunch); quantityMsgBox.Open( _storeItemInfo, ItemBuyMax, QuantityOK, Cancel, objIcon, goodsType); } }
public virtual void ClickMainListItemProcess(StoreItemInfoUI _storeItemInfoUI) { if (_storeItemInfoUI.item_Type == Store_Item_Type.NormalItem || _storeItemInfoUI.item_Type == Store_Item_Type.ChargeItem) return; Debug.LogWarning(_storeItemInfoUI.item_Type.ToString() + "Item = "+ _storeItemInfoUI.itemID + "("+_storeItemInfoUI.itemBunch+")"); Item item = ItemMgr.ItemManagement.GetItem(int.Parse(_storeItemInfoUI.itemID)); if (item != null) _storeItemInfoUI.itemName = AsTableManager.Instance.GetTbl_String(item.ItemData.nameId); AsCashStore.Instance.PrepareBuyItem(_storeItemInfoUI); }
public override void ClickMainListItemProcess(StoreItemInfoUI _storeItemInfoUI) { // only process hair item if (nowSubCatogory == eCashStoreSubCategory.HAIR) { if (null != AsHudDlgMgr.Instance.cashShopEntity) { if (eModelLoadingState.Finished != AsHudDlgMgr.Instance.cashShopEntity.CheckModelLoadingState()) return; } if (null != AsHudDlgMgr.Instance.cashStore) { AsHudDlgMgr.Instance.cashStore.LockInput(true); AsHudDlgMgr.Instance.cashStore.ShowLoadingIndigator(string.Empty); } CreateRenderTarget(userClass, AsEntityManager.Instance.UserEntity.GetProperty<eGENDER>(eComponentProperty.GENDER), int.Parse(_storeItemInfoUI.itemID)); } }
public void PrepareBuyNowTouchItem( StoreTouchInfo _touchInfo) { nowTouchInfo = _touchInfo; SelectStoreItem( nowTouchInfo); prevTouchInfo = nowTouchInfo; LockInput( true); isDownStoreOut = false; nowState = StoreState.QUANTITY_BUY; AsSoundManager.Instance.PlaySound( AsSoundPath.ButtonClick, Vector3.zero, false); nowStoreItemInfo = nowTouchInfo.storeItemController.GetStoreItemInfo( nowTouchInfo.type); PrepareBuyItemEvent( nowStoreItemInfo); }
public void SetTooltipClick() { LockInput( true); isDownStoreOut = false; nowState = StoreState.QUANTITY_BUY; nowStoreItemInfo = nowTouchInfo.storeItemController.GetStoreItemInfo( nowTouchInfo.type); PrepareBuyItemEvent( nowStoreItemInfo); }
protected void PlayItemSound( StoreItemInfoUI _storeItemInfo) { string szSoundPath = AsSoundPath.ButtonClick; if( _storeItemInfo.item_Type == Store_Item_Type.ChargeItem) { szSoundPath = AsSoundPath.CashItem_Miracle; } else if( _storeItemInfo.item_Type == Store_Item_Type.NormalItem) { Item item = ItemMgr.ItemManagement.GetItem( System.Convert.ToInt32( _storeItemInfo.itemID)); Item.eITEM_TYPE itemType = item.ItemData.GetItemType(); switch ( itemType) { case Item.eITEM_TYPE.UseItem: { Item.eUSE_ITEM useItemType = ( Item.eUSE_ITEM)item.ItemData.m_iSubType; if( useItemType == Item.eUSE_ITEM.Random || useItemType == Item.eUSE_ITEM.QuestRandom) szSoundPath = AsSoundPath.CashItem_RandomBox; else if( useItemType == Item.eUSE_ITEM.PrivateStore1 || useItemType == Item.eUSE_ITEM.PrivateStore2 || useItemType == Item.eUSE_ITEM.PrivateStore3 || useItemType == Item.eUSE_ITEM.PrivateStore4 || useItemType == Item.eUSE_ITEM.SkillReset) szSoundPath = AsSoundPath.CashItem_Etc; } break; case Item.eITEM_TYPE.EtcItem: { Item.eEtcItem etcItemType = ( Item.eEtcItem)item.ItemData.m_iSubType; if( etcItemType == Item.eEtcItem.Gold) szSoundPath = AsSoundPath.CashItem_Gold; else if( etcItemType == Item.eEtcItem.Strengthen) szSoundPath = AsSoundPath.CashItem_Jewel; } break; case Item.eITEM_TYPE.CosEquipItem: szSoundPath = AsSoundPath.CashItem_Costume; break; case Item.eITEM_TYPE.ActionItem: szSoundPath = AsSoundPath.CashItem_Use; break; } } if( szSoundPath != string.Empty) AsSoundManager.Instance.PlaySound( szSoundPath, Vector3.zero, false); }