void OnSelectSaleConfirm(bool is_confirm) { if (is_confirm) { m_SelectConfirmItem.SetSelect(true); m_SaleSelected.Add(m_SelectConfirmItem); UpdateSalePrice(m_SalePrice + m_SelectConfirmItem.Creature.SalePrice); } }
void OnSelectCharacter(HeroesInfoItem item) { if (m_HeroSalePanel.activeSelf == false) { MenuParams menu = new MenuParams(); menu.AddParam("Creature", item.Creature); menu.AddParam("Creatures", m_Creatures); GameMain.Instance.ChangeMenu(GameMenu.HeroInfoDetail, menu); } else { if (item.m_SpriteSelected.gameObject.activeSelf == true) { item.SetSelect(false); m_SaleSelected.Remove(item); UpdateSalePrice(m_SalePrice - item.Creature.SalePrice); } else {//select if (item.Creature.IsLock) { Popup.Instance.ShowMessageKey("HeroSaleConfirmTeamLocked"); return; } if (TeamDataManager.Instance.CheckTeam(item.Creature.Idx, PacketEnums.pe_Team.PVP_Defense) == true) { m_SelectConfirmItem = item; Popup.Instance.ShowMessageKey("HeroSaleConfirmTeamPVPDefense"); return; } if (TeamDataManager.Instance.CheckTeam(item.Creature.Idx) != PacketEnums.pe_Team.Invalid) { m_SelectConfirmItem = item; Popup.Instance.ShowConfirmKey(new PopupConfirm.Callback(OnSelectSaleConfirm), "HeroSaleConfirmTeam"); return; } if (item.Creature.Enchant > 0) { m_SelectConfirmItem = item; Popup.Instance.ShowConfirmKey(new PopupConfirm.Callback(OnSelectSaleConfirm), "SelectCreatureConfirmEnchanted"); return; } if (item.Creature.Armor.EnchantLevel > 0 || item.Creature.Weapon.EnchantLevel > 0) { m_SelectConfirmItem = item; Popup.Instance.ShowConfirmKey(new PopupConfirm.Callback(OnSelectSaleConfirm), "SelectCreatureConfirmEquipEnchanted"); return; } if (item.Creature.Runes.Count > 0) { m_SelectConfirmItem = item; Popup.Instance.ShowConfirmKey(new PopupConfirm.Callback(OnSelectSaleConfirm), "SelectCreatureConfirmEquipRune"); return; } item.SetSelect(true); m_SaleSelected.Add(item); UpdateSalePrice(m_SalePrice + item.Creature.SalePrice); } } }