Exemplo n.º 1
0
    void OnRefreshPopupOk(StoreConfirmParam parm)
    {
        if (Network.Instance.CheckGoods(parm.refresh_goods.goods_type, parm.refresh_goods.goods_value) == false)
        {
            return;
        }

        switch (CurrentStoreInfo.ID)
        {
        case "Items":
        case "Mileage":
        case "Boss":
        case "Arena":
        {
            C2G.StoreItemsRefresh packet = new C2G.StoreItemsRefresh();
            packet.clear_map_id = MapClearDataManager.Instance.GetLastClearedMapID();
            packet.store_id     = CurrentStoreInfo.ID;
            packet.exclude_ids  = ItemManager.Instance.NotInventoryItems.Select(i => i.Info.ID).ToList();
            Network.GameServer.JsonAsync <C2G.StoreItemsRefresh, C2G.StoreItemsGetAck>(packet, OnStoreItemRefresh);
        }
        break;

        default:
            Tooltip.Instance.ShowMessageKey("Invaild OnRefresh");
            break;
        }
    }
Exemplo n.º 2
0
 void OnStoreItemRefresh(C2G.StoreItemsRefresh packet, C2G.StoreItemsGetAck ack)
 {
     Network.PlayerInfo.UseGoods(ack.use_goods);
     GameMain.Instance.UpdatePlayerInfo();
     InitStoreStuffItems(ack);
 }