Пример #1
0
    void OnCreatureEvolve(C2G.CreatureEvolve packet, C2G.CreatureEvolveAck ack)
    {
        if (m_EnchantMaterial != null)
        {
            m_EnchantMaterial.m_toggle_dummy.value = false;
        }

        CreatureManager.Instance.Remove(packet.material_creature_idx);
        CreatureManager.Instance.Update(ack.creature_data);

        Network.PlayerInfo.UseGoodsValue(pe_GoodsType.token_gold, ack.use_gold);

        GameMain.Instance.BackMenu(false);
        GameMain.Instance.BackMenu(false);

        Popup.Instance.Show(ePopupMode.LootCharacter, packet.creature_idx, true, true);

        GameMain.Instance.UpdatePlayerInfo();
    }
Пример #2
0
    void EnchantConfirm(bool confirm)
    {
        if (confirm == false)
        {
            return;
        }

        if (m_ToggleMix.value)
        {
            C2G.CreatureMix packet = new C2G.CreatureMix();
            packet.creature_idx          = m_EnchantBase.Creature.Idx;
            packet.creature_grade        = m_EnchantBase.Creature.Grade;
            packet.material_creature_idx = m_EnchantMaterial.Creature.Idx;

            if (Tutorial.Instance.Completed == false)
            {
                C2G.TutorialState tutorial_packet = new C2G.TutorialState();
                tutorial_packet.tutorial_state      = (short)Tutorial.Instance.CurrentState;
                tutorial_packet.next_tutorial_state = (short)Tutorial.Instance.NextState;
                tutorial_packet.creature_mix        = packet;
                Network.GameServer.JsonAsync <C2G.TutorialState, C2G.TutorialStateAck>(tutorial_packet, OnTutorialCreatureMix);
            }
            else
            {
                Network.GameServer.JsonAsync <C2G.CreatureMix, C2G.CreatureMixAck>(packet, OnCreatureMix);
            }
        }
        else
        {
            C2G.CreatureEvolve packet = new C2G.CreatureEvolve();
            packet.creature_idx          = m_EnchantBase.Creature.Idx;
            packet.creature_grade        = m_EnchantBase.Creature.Grade;
            packet.material_creature_idx = m_EnchantMaterial.Creature.Idx;
            Network.GameServer.JsonAsync <C2G.CreatureEvolve, C2G.CreatureEvolveAck>(packet, OnCreatureEvolve);
        }
    }