| | |
| | | BuffModel Buffmodel { get { return ModelCenter.Instance.GetModel<BuffModel>(); } } |
| | | FairyModel fairyModel { get { return ModelCenter.Instance.GetModel<FairyModel>(); } } |
| | | BoxGetItemModel BoxModel { get { return ModelCenter.Instance.GetModel<BoxGetItemModel>(); } } |
| | | PlayerSuitModel suitModel { get { return ModelCenter.Instance.GetModel<PlayerSuitModel>(); } } |
| | | DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } } |
| | | |
| | | #region 装备 |
| | |
| | | return true; |
| | | } |
| | | |
| | | public void CheckSuitReplaceInfo(int equipPlace, ItemModel item) |
| | | { |
| | | if (item == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var replaceDic = suitModel.SetReplaceSuitModel(item.itemId, equipPlace); |
| | | var replaceTip = string.Empty; |
| | | var isReplace = false; |
| | | var equipPlaceName = UIHelper.GetEquipPlaceName(equipPlace); |
| | | var lowSuitResult = replaceDic[SuitType.LowSuit]; |
| | | var highSuitResult = replaceDic[SuitType.HighSuit]; |
| | | |
| | | if (lowSuitResult.isNoEffect && !highSuitResult.isNoEffect) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt102", equipPlaceName, Language.Get("EquipSuitNormal2")); |
| | | isReplace = true; |
| | | } |
| | | else if (lowSuitResult.isPerfect && highSuitResult.isNoEffect) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt102", equipPlaceName, Language.Get("EquipSuitHigh")); |
| | | isReplace = true; |
| | | return; |
| | | } |
| | | else if (lowSuitResult.isNoEffect && highSuitResult.isNoEffect) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt104", equipPlaceName); |
| | | isReplace = true; |
| | | } |
| | | else if (lowSuitResult.effectLv > 0 && highSuitResult.effectLv <= 0 |
| | | && !highSuitResult.isNoEffect) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt101", equipPlaceName, Language.Get("EquipSuitNormal2"), lowSuitResult.effectLv); |
| | | isReplace = true; |
| | | } |
| | | else if (highSuitResult.effectLv > 0 && lowSuitResult.effectLv <= 0) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt101", equipPlaceName, Language.Get("EquipSuitHigh"), lowSuitResult.effectLv); |
| | | isReplace = true; |
| | | } |
| | | else if (highSuitResult.isNoEffect && lowSuitResult.effectLv > 0) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt103", equipPlaceName, lowSuitResult.effectLv); |
| | | isReplace = true; |
| | | } |
| | | else if (lowSuitResult.effectLv > 0 && highSuitResult.effectLv > 0) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt105", equipPlaceName, highSuitResult.effectLv, lowSuitResult.effectLv); |
| | | isReplace = true; |
| | | } |
| | | |
| | | if (isReplace) |
| | | { |
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), replaceTip, |
| | | (bool ok) => |
| | | { |
| | | if (ok) |
| | | { |
| | | PutOnEquip(equipPlace, item.guid); |
| | | } |
| | | } |
| | | ); |
| | | } |
| | | else |
| | | { |
| | | PutOnEquip(equipPlace, item.guid); |
| | | } |
| | | } |
| | | |
| | | void PutOnEquip(int equipPlace, string guid) |
| | | { |
| | | var clientPlaceInfo = EquipSet.ServerPlaceToClientPlace(equipPlace); |
| | |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (suitModel.IsPerfectGetSuitLv(item.itemId, equipPlace)) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("SwitchEquip_SuitPanel"); |
| | | } |
| | | |
| | | var washPro = equipWashModel.GetWashEquipInfo(equipPlace); |