void OnSkillEnchantAllMax(C2G.SkillEnchantAllMax packet, C2G.SkillEnchantAck ack) { Network.PlayerInfo.UseGoods(ack.use_gold); m_Items.ForEach(i => i.PlayEffectSkillEnchantAll()); m_Creature.SkillEnchantAllMax(); Init(); GameMain.Instance.UpdatePlayerInfo(); OnSkillEnchantCallback(); }
void OnSkillEnchant(C2G.SkillEnchantLevel packet, C2G.SkillEnchantAck ack) { if (Network.PlayerInfo.UseGoods(ack.use_gold) == false) { Popup.Instance.Show(ePopupMode.MoveStore, pe_GoodsType.token_gold); return; } m_ParticleContainer.Play(); string tooptip = m_Skill.GetLevelupTooltip(packet.add_level); string[] tooltips = tooptip.Split(new char[] { '\n' }); float delay = 0f; foreach (string tip in tooltips) { if (string.IsNullOrEmpty(tip)) { continue; } var levelup = m_LevelupContainer.GetNewObject <SkillEnchantItemLevelup>(transform, Vector3.zero); levelup.Init(delay, tip, OnFinishLevelup); delay += 0.3f; } CreatureManager.Instance.SkillLevelUP(m_Skill.Creature, packet.skill_index, packet.add_level); Init(m_Skill, m_LevelupContainer); GameMain.Instance.UpdatePlayerInfo(); if (m_Skill.Creature.AvailableSkillEnchant == false) { CreatureManager.Instance.UpdateNotify(); } if (_OnSkillEnchant != null) { _OnSkillEnchant(); } //InitSkillEnchantValue(); }