void OnTab(StoreInfo info) { Debug.LogFormat("OnTab : {0}", info.ID); CurrentStoreInfo = info; UpdateMileage(); switch (info.ID) { case "Loot": { C2G.StoreLootInfoGet packet = new C2G.StoreLootInfoGet(); packet.store_id = info.ID; Network.GameServer.JsonAsync <C2G.StoreLootInfoGet, C2G.StoreLootInfoGetAck>(packet, OnStoreLootInfoGet); } break; case "Gem": case "Gold": case "Energy": { C2G.StoreLimitInfoGet packet = new C2G.StoreLimitInfoGet(); packet.store_id = info.ID; Network.GameServer.JsonAsync <C2G.StoreLimitInfoGet, C2G.StoreLimitInfoGetAck>(packet, OnStoreLimitInfoGet); } break; default: //case "Items": //case "Mileage": //case "Boss": { C2G.StoreItemsGet packet = new C2G.StoreItemsGet(); packet.clear_map_id = MapClearDataManager.Instance.GetLastClearedMapID(); packet.store_id = info.ID; packet.exclude_ids = ItemManager.Instance.NotInventoryItems.Select(i => i.Info.ID).ToList(); Network.GameServer.JsonAsync <C2G.StoreItemsGet, C2G.StoreItemsGetAck>(packet, OnStoreItemGet); } break; } }
void OnStoreLimitInfoGet(C2G.StoreLimitInfoGet packet, C2G.StoreLimitInfoGetAck ack) { InitStoreItem(CurrentStoreInfo, ack); }