예제 #1
0
    void OnRunesSaleHandler(C2G.RunesSale send, C2G.RunesSaleAck recv)
    {
        foreach (long rune_idx in send.rune_idxes)
        {
            RuneManager.Instance.RemoveRune(rune_idx);
            RuneItem item = m_Runes.Find(r => r.Rune.RuneIdx == rune_idx);
            if (item == null)
            {
                item = m_HeroRunes.Find(r => r.Rune.RuneIdx == rune_idx);
                if (item == null)
                {
                    continue;
                }
            }

            RemoveRune(item);
        }
        m_selected_runes.Clear();
        Network.PlayerInfo.AddGoods(recv.add_goods);
        GameMain.Instance.UpdatePlayerInfo();
        RefreshInfo();
        //InitRuneItem();
        InitBatchLabel();

        Tooltip.Instance.ShowMessageKey("RuneSaleSuccess");
    }
예제 #2
0
    void OnSaleConfirm(StoreConfirmParam param)
    {
        C2G.RunesSale packet = new C2G.RunesSale();
        packet.rune_idxes  = new List <long>();
        packet.rune_grades = new List <long>();
        packet.rune_idxes.Add(param.rune_item.RuneIdx);
        packet.rune_grades.Add(param.rune_item.Info.Grade);

        Network.GameServer.JsonAsync <C2G.RunesSale, C2G.RunesSaleAck>(packet, OnRunesSaleHandler);
    }
예제 #3
0
    public void OnClickBatchSellConfirm()
    {
        C2G.RunesSale packet = new C2G.RunesSale();
        packet.rune_idxes  = new List <long>();
        packet.rune_grades = new List <long>();
        foreach (RuneItem item in m_selected_runes)
        {
            packet.rune_grades.Add(item.Rune.Info.Grade);
            packet.rune_idxes.Add(item.Rune.RuneIdx);
        }

        if (packet.rune_idxes.Count > 0)
        {
            Network.GameServer.JsonAsync <C2G.RunesSale, C2G.RunesSaleAck>(packet, OnRunesSaleHandler);
        }
        else
        {
            InitBatchLabel();
        }
    }