Ejemplo n.º 1
0
 void OnUnequipConfirm(StoreConfirmParam param)
 {
     C2G.RuneUnequip packet = new C2G.RuneUnequip();
     packet.rune_idx   = param.rune_item.RuneIdx;
     packet.rune_grade = param.rune_item.Info.Grade;
     Network.GameServer.JsonAsync <C2G.RuneUnequip, C2G.RuneUnequipAck>(packet, OnRuneUnequip);
 }
Ejemplo n.º 2
0
    void OnRuneUnequip(C2G.RuneUnequip packet, C2G.RuneUnequipAck ack)
    {
        RuneManager.Instance.UnEquipRune(packet.rune_idx);
        RuneItem item = m_HeroRunes.Find(r => r.Rune != null && r.Rune.RuneIdx == packet.rune_idx);
        Rune     rune = item.Rune;


        ++m_RuneCount;
        RemoveHeroRune(item);

        RuneItem new_item = runeItemPrefabManager.GetNewObject <RuneItem>(m_RuneGrid.transform, Vector3.zero);

        new_item.Init(rune, false, OnClickRune);
        m_Runes.Add(new_item);

        OnSorted();

        Network.PlayerInfo.UseGoods(ack.use_goods);
        GameMain.Instance.UpdatePlayerInfo();
        RefreshInfo();
    }