void OnEquipEnchant(C2G.EquipEnchant packet, C2G.EquipEnchantAck 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); //Tooltip.Instance.ShowMessageKey("EquipEnchantSuccess"); GameMain.Instance.UpdateMenu(); GameMain.Instance.UpdatePlayerInfo(); GameMain.Instance.UpdateNotify(false); PlayEnchantEffect(); }
void OnEquipEnchant(C2G.EquipEnchant packet, C2G.EquipEnchantAck ack) { ItemManager.Instance.Reset(ack.item); CreatureManager.Instance.UpdateEquip(m_Creature, ack.equip); Network.PlayerInfo.UseGoods(ack.use_gold); Tooltip.Instance.ShowMessageKey("EquipEnchantSuccess"); m_ParticleEnchant.Play(); GameMain.Instance.UpdateMenu(); GameMain.Instance.UpdatePlayerInfo(); GameMain.Instance.UpdateNotify(false); //Reinit(); OnEquipEnchantCallback(); }
void OnEquipEnchant(Equip equip) { C2G.EquipEnchant packet = new C2G.EquipEnchant(); packet.equip_idx = equip.EquipIdx; packet.creature_idx = equip.CreatureIdx; packet.equip_id = equip.Info.ID; packet.enchant_level = equip.EnchantLevel; 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.equip_enchant = packet; Network.GameServer.JsonAsync <C2G.TutorialState, C2G.TutorialStateAck>(tutorial_packet, OnTutorialEquipEnchant); } else { Network.GameServer.JsonAsync <C2G.EquipEnchant, C2G.EquipEnchantAck>(packet, OnEquipEnchant); } }