Exemplo n.º 1
0
    void OnUpgradeConfirm(bool is_ok)
    {
        if (is_ok == false)
        {
            return;
        }
        C2G.RuneUpgrade packet = new C2G.RuneUpgrade();
        packet.material_grade = m_UpgradeMaterials[0].Rune.Info.Grade;
        packet.material_idxes = new List <long>();

        m_UpgradeMaterials.ForEach(item => packet.material_idxes.Add(item.Rune.RuneIdx));

        Network.GameServer.JsonAsync <C2G.RuneUpgrade, C2G.RuneUpgradeAck>(packet, OnRuneUpgradeAckHandler);
    }
Exemplo n.º 2
0
    void OnRuneUpgradeAckHandler(C2G.RuneUpgrade send, C2G.RuneUpgradeAck recv)
    {
        Network.PlayerInfo.UseGoods(recv.use_goods);
        GameMain.Instance.UpdatePlayerInfo();
        m_UpgradeRune.Init(null, false, null);
        m_UpgradeMaterials.ForEach(item => { RuneManager.Instance.RemoveRune(item.Rune); item.Init(null, false, null); });

        RuneManager.Instance.Add(recv.rune_info);

        Popup.Instance.Show(ePopupMode.LootItem, new LootItemInfo(recv.rune_info.rune_idn, 1));

        RefreshInfo();
        InitRuneItem();
        InitBatchLabel();
        ReloadBlockCheckRunes();
    }