using System.Collections.Generic; using MoleMole.Config; using UnityEngine; using UnityEngine.UI; using proto; namespace MoleMole { public class ShopPageContext : BasePageContext { private const string TAB_SELECT_BG_PATH = "SpriteOutput/GeneralUI/TabDialogSelected"; private const string TAB_UNSELECT_BG_PATH = "SpriteOutput/GeneralUI/TabDialogUnselected"; private const string StoreTab = "ShopTab"; private UIShopType _currentShopType; public ShopPageContext(UIShopType shopType = UIShopType.SHOP_NORMAL) { config = new ContextPattern { contextName = "ShopPageContext", viewPrefabPath = "UI/Menus/Page/Shop/ShopOverviewPage", cacheType = ViewCacheType.AlwaysCached }; showSpaceShip = false; _currentShopType = shopType; } public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 202: return OnGetShopListRsp(pkt.getData()); case 204: return OnBuyGoodsRsp(pkt.getData()); case 206: return OnManualRefreshShopRsp(pkt.getData()); case 11: return OnGetMainDataRsp(pkt.getData()); case 216: return OnBuyGachaTicket(pkt.getData()); default: return false; } } public override bool OnNotify(Notify ntf) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown if (ntf.type == NotifyTypes.SelectStoreGoodsItem) { return OnSelectStoreGoodsItem((Goods)ntf.body); } return false; } protected override void BindViewCallbacks() { BindViewCallback(base.view.transform.Find("CartInfoPanel/BuyBtn").GetComponent