Ejemplo n.º 1
0
    void OnEquipUpgradeCallback(Equip equip)
    {
        C2G.EquipUpgrade packet = new C2G.EquipUpgrade();
        packet.creature_idx = m_Creature.Idx;
        packet.equip_idx    = equip.EquipIdx;
        packet.equip_grade  = equip.Info.Grade;
        packet.equip_id     = equip.Info.ID;

        Network.GameServer.JsonAsync <C2G.EquipUpgrade, C2G.EquipUpgradeAck>(packet, OnEquipUpgrade);
    }
Ejemplo n.º 2
0
    void OnEquipUpgradeCallback()
    {
        m_BtnUpgrade.GetComponent <BoxCollider2D>().enabled = false;
        C2G.EquipUpgrade packet = new C2G.EquipUpgrade();
        packet.creature_idx = m_Equip.CreatureIdx;
        packet.equip_idx    = m_Equip.EquipIdx;
        packet.equip_grade  = m_Equip.Info.Grade;
        packet.equip_id     = m_Equip.Info.ID;

        Network.GameServer.JsonAsync <C2G.EquipUpgrade, C2G.EquipUpgradeAck>(packet, OnEquipUpgrade);
    }
Ejemplo n.º 3
0
    void OnEquipUpgrade(C2G.EquipUpgrade packet, C2G.EquipUpgradeAck ack)
    {
        ItemManager.Instance.Reset(ack.item);
        var creature = CreatureManager.Instance.GetInfoByIdx(m_Equip.CreatureIdx);

        CreatureManager.Instance.UpdateEquip(creature, ack.equip);
        Network.PlayerInfo.UseGoods(ack.use_gold);

        GameMain.Instance.UpdateNotify(false);
        GameMain.Instance.UpdateMenu();
        GameMain.Instance.UpdatePlayerInfo();

        PlayEnchantEffect();
    }
Ejemplo n.º 4
0
    void OnEquipUpgrade(C2G.EquipUpgrade packet, C2G.EquipUpgradeAck ack)
    {
        ItemManager.Instance.Reset(ack.item);
        CreatureManager.Instance.UpdateEquip(m_Creature, ack.equip);
        Network.PlayerInfo.UseGoods(ack.use_gold);

        Tooltip.Instance.ShowMessageKey("EquipUpgradeSuccess");

        m_ParticleUpgrade.Play();

        GameMain.Instance.UpdateNotify(false);
        GameMain.Instance.UpdateMenu();
        GameMain.Instance.UpdatePlayerInfo();
        Reinit();
        OnEquipEnchantCallback();
    }