using System;
|
using System.Collections.Generic;
|
using UnityEngine.UI;
|
using UnityEngine;
|
using TableConfig;
|
using System.Linq;
|
using Snxxz.UI;
|
using System.Collections;
|
|
public class WashTips : MonoBehaviour
|
{
|
#region 成员变量
|
private Text _costMoneyText;
|
private Text _washLevelTitle;
|
private Button _washBtn;
|
private Button _saveBtn;
|
private Button _cancelBtn;
|
private Button _upgradeBtn;
|
private Button _washMasterBtn;
|
private Text _specWashOpenCondition;
|
private Text _specWashFullText;
|
private GameObject _openSpecWashPro;
|
private ScrollRect _selectWashRect;
|
private ScrollerController _equipWashCtrl;
|
private Text _washFullLvText;
|
private ItemCell _costMatCell;
|
private ItemCell _washEquipCell;
|
private WashPro _attackWashPro; //攻击洗练属性
|
private WashPro _lifeWashPro; //生命
|
private WashPro _ignoreDefenceWashPro; //无视防御
|
private ToggleGroup _cellGroup;
|
private GameObject noEquipObj;
|
[SerializeField]
|
List<Text> specAttrNameText = new List<Text>();
|
[SerializeField]
|
List<Text> specAttrValueText = new List<Text>();
|
|
[SerializeField]
|
UIEffect washEffect;
|
[SerializeField] float offest = 50;
|
|
#endregion
|
|
private WashProCount _washProModel;
|
private EquipWashConfig _tagWashModel;
|
private ItemModel _itemModel; //洗练的装备
|
private List<string> _costMoneylist = null;
|
private int _costmoney = 0;
|
public int CostMoney
|
{
|
get { return _costmoney; }
|
set { _costmoney = value; }
|
}
|
private List<WashProCount> _washInfolist;
|
private int curWashEquip = 0;
|
|
EquipWashModel _equipWashModel;
|
EquipWashModel equipWashModel
|
{
|
get
|
{
|
return _equipWashModel ?? (_equipWashModel = ModelCenter.Instance.GetModel<EquipWashModel>());
|
}
|
}
|
|
WashProModel _washAttrModel;
|
WashProModel washAttrModel
|
{
|
get
|
{
|
return _washAttrModel ?? (_washAttrModel = ModelCenter.Instance.GetModel<WashProModel>());
|
}
|
}
|
|
HowToPlayModel _toPlayModel;
|
HowToPlayModel toPlayModel
|
{
|
get { return _toPlayModel ?? (_toPlayModel = ModelCenter.Instance.GetModel<HowToPlayModel>()); }
|
}
|
|
GetItemPathModel _itemPathModel;
|
GetItemPathModel itemPathModel
|
{
|
get { return _itemPathModel ?? (_itemPathModel = ModelCenter.Instance.GetModel<GetItemPathModel>()); }
|
}
|
|
ItemTipsModel _itemTipsModel;
|
ItemTipsModel itemTipsModel
|
{
|
get
|
{
|
return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
|
}
|
}
|
|
PlayerPackModel _playerPack;
|
PlayerPackModel playerPack
|
{
|
get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
|
}
|
|
public int jumpToWashId = 0;
|
AchievementGuideEffect guideEffect = null;
|
|
private void Awake()
|
{
|
|
_washEquipCell = transform.Find("EquipInfoBG/WashItemBottom/ItemCell").GetComponent<ItemCell>();
|
noEquipObj = transform.Find("EquipInfoBG/WashItemBottom/NoEquip").gameObject;
|
_costMatCell = transform.Find("CostItem/ItemCell").GetComponent<ItemCell>();
|
_washFullLvText = transform.Find("FullLvText").GetComponent<Text>();
|
_selectWashRect = transform.Find("SelectList").GetComponent<ScrollRect>();
|
_washBtn = transform.Find("WashBtn").GetComponent<Button>();
|
_saveBtn = transform.Find("SaveBtn").GetComponent<Button>();
|
_cancelBtn = transform.Find("CancelBtn").GetComponent<Button>();
|
_upgradeBtn = transform.Find("UpgrdeBtn").GetComponent<Button>();
|
_washMasterBtn = transform.Find("WashMasterBtn").GetComponent<Button>();
|
_attackWashPro = transform.Find("AttributeInfo/Attribute01").GetComponent<WashPro>();
|
_lifeWashPro = transform.Find("AttributeInfo/Attribute02").GetComponent<WashPro>();
|
|
_ignoreDefenceWashPro = transform.Find("AttributeInfo/Attribute03").GetComponent<WashPro>();
|
_washLevelTitle = transform.Find("AttributeInfo/TitleBG/TitleText").GetComponent<Text>();
|
_costMoneyText = transform.Find("CostItem/Money/MoneyCountText").GetComponent<Text>();
|
_specWashOpenCondition = transform.Find("AttributeInfo/WashMaster/SpecWashOpenCondition").GetComponent<Text>();
|
_specWashFullText = transform.Find("AttributeInfo/WashMasterFull").GetComponent<Text>();
|
_specWashOpenCondition.gameObject.SetActive(true);
|
_specWashFullText.gameObject.SetActive(false);
|
_openSpecWashPro = transform.Find("AttributeInfo/WashMaster/SpecWashPro").gameObject;
|
_equipWashCtrl = transform.Find("EquipWashCtrl").GetComponent<ScrollerController>();
|
_cellGroup = _equipWashCtrl.GetComponent<ToggleGroup>();
|
_equipWashCtrl.OnRefreshCell += RefreshEquipWashCell;
|
EquipReinforceEventMgr.Instance.RefreshWashCostMoneyEvent = RefreshCostMoney;
|
_openSpecWashPro.SetActive(false);
|
|
}
|
|
private void OnEnable()
|
{
|
jumpToWashId = 0;
|
guideEffect = null;
|
//_equipWashCtrl.mScrollRect.verticalNormalizedPosition = 1;
|
#region 初始化监听和数据
|
curWashEquip = 0;
|
isOpenPrompting = true;
|
_attackWashPro.toggleIsOn = false;
|
_lifeWashPro.toggleIsOn = false;
|
_ignoreDefenceWashPro.toggleIsOn = false;
|
|
_equipWashCtrl.lockType = EnhanceLockType.KeepVertical;
|
_cancelBtn.onClick.AddListener(OnClickCancelBtn);
|
_upgradeBtn.onClick.AddListener(OnClickUpGradeBtn);
|
_washMasterBtn.onClick.AddListener(OnClickMasterBtn);
|
equipWashModel.RefreshWashModelEvent += RefreshModel;
|
playerPack.RefreshItemCountAct += RefreshCostItem;
|
#endregion
|
CreateEquipWashCell();
|
CheckJumpToModel();
|
}
|
private void OnDisable()
|
{
|
_washBtn.onClick.RemoveAllListeners();
|
_saveBtn.onClick.RemoveAllListeners();
|
_cancelBtn.onClick.RemoveAllListeners();
|
_upgradeBtn.onClick.RemoveAllListeners();
|
_washMasterBtn.onClick.RemoveAllListeners();
|
equipWashModel.RefreshWashModelEvent -= RefreshModel;
|
playerPack.RefreshItemCountAct -= RefreshCostItem;
|
}
|
|
private void CheckJumpToModel()
|
{
|
_attackWashPro.isShowPerfectEffect = false;
|
_lifeWashPro.isShowPerfectEffect = false;
|
_ignoreDefenceWashPro.isShowPerfectEffect = false;
|
|
if (AchievementGoto.guideAchievementId != 0)
|
{
|
SuccessConfig successConfig = Config.Instance.Get<SuccessConfig>(AchievementGoto.guideAchievementId);
|
if(successConfig.Type == 66)
|
{
|
bool isWash = false;
|
for(int i = 0; i < _washInfolist.Count; i++)
|
{
|
WashProCount washPro = _washInfolist[i];
|
ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip,washPro.EquipPlace);
|
if(itemModel != null)
|
{
|
EquipWashConfig washModel = EquipWashConfig.GetCurrentWashEquipModel(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV);
|
if (equipWashModel.IsEnoughMat(washModel) && equipWashModel.IsCanWash(itemModel))
|
{
|
jumpToWashId = washPro.EquipPlace;
|
isWash = true;
|
curWashEquip = i;
|
_equipWashCtrl.JumpIndex(curWashEquip);
|
_equipWashCtrl.m_Scorller.RefreshActiveCellViews();
|
break;
|
}
|
}
|
}
|
|
if(!isWash)
|
{
|
MessageWin.Inst.ShowFixedTip(Language.Get("Material101"));
|
}
|
else
|
{
|
guideEffect = AchievementGuideEffectPool.Require(1);
|
guideEffect.transform.SetParentEx(_washBtn.transform,Vector3.zero,Quaternion.identity,Vector3.one);
|
}
|
AchievementGoto.guideAchievementId = 0;
|
}
|
}
|
else
|
{
|
curWashEquip = equipWashModel.JumpToIndex;
|
_equipWashCtrl.JumpIndex(curWashEquip);
|
_equipWashCtrl.m_Scorller.RefreshActiveCellViews();
|
}
|
|
OnClickWashCellToggle(_washInfolist[curWashEquip],curWashEquip);
|
StartCoroutine(SetOffestPos());
|
}
|
|
private IEnumerator SetOffestPos()
|
{
|
yield return null;
|
if (curWashEquip != 0)
|
{
|
_equipWashCtrl.JumpIndex(-offest, 0, EnhancedUI.EnhancedScroller.EnhancedScroller.TweenType.immediate);
|
}
|
}
|
|
private void CreateEquipWashCell()
|
{
|
_washInfolist = equipWashModel.GetWashModellist();
|
int i = 0;
|
_equipWashCtrl.Refresh();
|
for (i = 0; i < _washInfolist.Count; i++)
|
{
|
_equipWashCtrl.AddCell(ScrollerDataType.Header, i);
|
}
|
_equipWashCtrl.Restart();
|
}
|
|
public void RefreshModel()
|
{
|
CreateEquipWashCell();
|
OnClickWashCellToggle(_washInfolist[curWashEquip], curWashEquip);
|
}
|
|
|
private void RefreshEquipWashCell(ScrollerDataType type, CellView cell)
|
{
|
EquipWashCell equipWashCell = cell.GetComponent<EquipWashCell>();
|
if(equipWashCell != null)
|
{
|
WashProCount washPro = _washInfolist[cell.index];
|
equipWashCell.SetDisplayModel(washPro, equipWashModel.washEquipRedPointlist[cell.index].id,cell.index,curWashEquip);
|
equipWashCell.cellToggle.RemoveAllListeners();
|
equipWashCell.cellToggle.AddListener(()=>
|
{
|
OnClickWashCellToggle(washPro,cell.index);
|
});
|
}
|
}
|
|
|
private void OnClickWashCellToggle(WashProCount washPro,int index)
|
{
|
if (curWashEquip != index)
|
{
|
_attackWashPro.isShowPerfectEffect = false;
|
_lifeWashPro.isShowPerfectEffect = false;
|
_ignoreDefenceWashPro.isShowPerfectEffect = false;
|
|
_attackWashPro.toggleIsOn = false;
|
_lifeWashPro.toggleIsOn = false;
|
_ignoreDefenceWashPro.toggleIsOn = false;
|
if (washPro.EquipPlace != jumpToWashId)
|
{
|
if (guideEffect != null)
|
{
|
AchievementGuideEffectPool.Recycle(guideEffect);
|
guideEffect = null;
|
}
|
}
|
}
|
ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip, washPro.EquipPlace);
|
EquipWashConfig washModel = EquipWashConfig.GetCurrentWashEquipModel(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV);
|
_washProModel = washPro;
|
_tagWashModel = washModel;
|
_costMoneylist = GetToolsList(_tagWashModel.costMoneyList, _costMoneylist);
|
washAttrModel.SetUIModel(washModel, washPro, WashAttrType.attack);
|
washAttrModel.SetUIModel(washModel, washPro, WashAttrType.life);
|
washAttrModel.SetUIModel(washModel, washPro, WashAttrType.ignoredefence);
|
_attackWashPro.RefreshUI(WashAttrType.attack);
|
_lifeWashPro.RefreshUI(WashAttrType.life);
|
_ignoreDefenceWashPro.RefreshUI(WashAttrType.ignoredefence);
|
|
if (washPro.isPutOn == false)
|
{
|
_washLevelTitle.text = Language.Get("EquipWash108", 0);
|
}
|
else
|
{
|
_washLevelTitle.text = Language.Get("EquipWash108", washPro.XLAttrLV);
|
}
|
_costMatCell.gameObject.SetActive(true);
|
ItemCellModel cellModel = new ItemCellModel(washModel.costItem);
|
_costMatCell.Init(cellModel);
|
_costMatCell.cellBtn.RemoveAllListeners();
|
_costMatCell.cellBtn.onClick.AddListener(() =>
|
{
|
itemPathModel.SetChinItemModel(washModel.costItem);
|
});
|
|
#region 刷新物品UI
|
if (itemModel == null)
|
{
|
_washEquipCell.gameObject.SetActive(false);
|
noEquipObj.SetActive(true);
|
}
|
else
|
{
|
noEquipObj.SetActive(false);
|
RefreshCostItem(itemModel.packType, itemModel.itemInfo.ItemPlace, itemModel.itemInfo.ItemID);
|
_itemModel = itemModel;
|
_washEquipCell.gameObject.SetActive(true);
|
_washEquipCell.Init(itemModel);
|
_washEquipCell.cellBtn.RemoveAllListeners();
|
_washEquipCell.cellBtn.onClick.AddListener(() =>
|
{
|
itemTipsModel.SetItemTipsModel(PackType.rptEquip, itemModel.itemInfo.ItemGUID);
|
});
|
|
RefreshCostMoney();
|
}
|
|
#endregion
|
|
RefreshSpecWashUI();
|
|
ChangeBtn();
|
curWashEquip = index;
|
equipWashModel.washBtnRedpoint.state = equipWashModel.washEquipRedPointlist[index].state;
|
_equipWashCtrl.m_Scorller.RefreshActiveCellViews();
|
}
|
//刷新材料
|
public void RefreshCostItem(PackType type, int index, int id)
|
{
|
SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
if (singlePack == null)
|
return;
|
|
_costMatCell.countText.gameObject.SetActive(true);
|
int bagItemCount = singlePack.GetItemCountByID(_tagWashModel.costItem);
|
if (bagItemCount >= _tagWashModel.costCount)
|
_costMatCell.countText.text = UIHelper.GetTextColorByItemColor(TextColType.Green, bagItemCount.ToString(),true) + "/" + _tagWashModel.costCount;
|
else
|
_costMatCell.countText.text = UIHelper.GetTextColorByItemColor(TextColType.Red, bagItemCount.ToString()) + "/" + _tagWashModel.costCount;
|
|
}
|
|
//刷新仙玉
|
public void RefreshCostMoney()
|
{
|
int needAddCount = 0;
|
if (_attackWashPro.toggleIsOn)
|
needAddCount += 1;
|
|
if (_lifeWashPro.toggleIsOn)
|
needAddCount += 1;
|
|
if (_ignoreDefenceWashPro.toggleIsOn)
|
needAddCount += 1;
|
|
if (needAddCount == 0)
|
{
|
CostMoney = 0;
|
}
|
else if (needAddCount == 1)
|
{
|
CostMoney = int.Parse(GetCostMoneyList()[0]);
|
}
|
else if (needAddCount == 2)
|
{
|
CostMoney = int.Parse(GetCostMoneyList()[1]);
|
}
|
else if (needAddCount == 3)
|
{
|
CostMoney = int.Parse(GetCostMoneyList()[2]);
|
}
|
|
int goldCount = (int)PlayerDatas.Instance.baseData.Gold;
|
if (goldCount >= CostMoney)
|
{
|
_costMoneyText.text = StringUtility.Contact("<color=#109D06>", CostMoney.ToString(), "</color>");
|
}
|
else
|
{
|
_costMoneyText.text = StringUtility.Contact("<color=#ff0000>", CostMoney.ToString(), "</color>");
|
}
|
|
}
|
|
|
//刷新特殊洗练UI
|
public void RefreshSpecWashUI()
|
{
|
equipWashModel.OnGetMasterModel(_washInfolist);
|
int type = equipWashModel.OnGetWashType(_washProModel.EquipPlace);
|
int curTypeLv = 0;
|
switch (type)
|
{
|
case 1:
|
curTypeLv = equipWashModel.washGroup1[0].XLAttrLV;
|
_specWashOpenCondition.text = Language.Get("WashTips_SpecWashOpenCondition_1");
|
_specWashFullText.text = Language.Get("WashTips_SpecWashFull_1");
|
break;
|
case 2:
|
curTypeLv = equipWashModel.washGroup2[0].XLAttrLV;
|
_specWashOpenCondition.text = Language.Get("WashTips_SpecWashOpenCondition_2");
|
_specWashFullText.text = Language.Get("WashTips_SpecWashFull_2");
|
break;
|
case 3:
|
curTypeLv = equipWashModel.washGroup3[0].XLAttrLV;
|
_specWashOpenCondition.text = Language.Get("WashTips_SpecWashOpenCondition_3");
|
_specWashFullText.text = Language.Get("WashTips_SpecWashFull_3");
|
break;
|
}
|
|
List<EquipWashSpecConfig> tagSpecModellist = EquipWashSpecConfig.GetWashSpecModel(type);
|
if (curTypeLv < tagSpecModellist[0].levelNeed)
|
{
|
_specWashOpenCondition.gameObject.SetActive(true);
|
_openSpecWashPro.SetActive(false);
|
}
|
else
|
{
|
_specWashOpenCondition.gameObject.SetActive(false);
|
_openSpecWashPro.SetActive(true);
|
int i = 0;
|
for (i = tagSpecModellist.Count - 1; i > -1; i--)
|
{
|
if (curTypeLv >= tagSpecModellist[i].levelNeed)
|
{
|
int[] specAttrsID = ConfigParse.GetMultipleStr<int>(tagSpecModellist[i].attByLevel);
|
int[] specAttrsValue = ConfigParse.GetMultipleStr<int>(tagSpecModellist[i].attByLevelValue);
|
int j = 0;
|
for (j = 0; j < specAttrNameText.Count; j++)
|
{
|
if(j < specAttrsID.Length)
|
{
|
specAttrNameText[j].gameObject.SetActive(true);
|
specAttrValueText[j].gameObject.SetActive(true);
|
PlayerPropertyConfig propertyModel = Config.Instance.Get<PlayerPropertyConfig>(specAttrsID[j]);
|
specAttrNameText[j].text = propertyModel.Name;
|
specAttrValueText[j].text = equipWashModel.GetProValueTypeStr(propertyModel, specAttrsValue[j]);
|
}
|
else
|
{
|
specAttrNameText[j].gameObject.SetActive(false);
|
specAttrValueText[j].gameObject.SetActive(false);
|
}
|
|
}
|
break;
|
}
|
}
|
}
|
|
if(curTypeLv >= tagSpecModellist[tagSpecModellist.Count - 1].levelNeed)
|
{
|
_specWashFullText.gameObject.SetActive(true);
|
}
|
else
|
{
|
_specWashFullText.gameObject.SetActive(false);
|
}
|
}
|
|
public void ChangeBtn()
|
{
|
_washBtn.onClick.RemoveAllListeners();
|
if (_washProModel.isPutOn)
|
{
|
if (equipWashModel.IsCanWash(_itemModel))
|
{
|
if (equipWashModel.IsSaveWashValue(_washProModel))
|
{
|
if (equipWashModel.IsWashFull(_itemModel, _washProModel, _tagWashModel))
|
{
|
_washFullLvText.text = Language.Get("EquipWash113", _itemModel.chinItemModel.LV, equipWashModel.GetWashFullLv(_itemModel.chinItemModel.LV));
|
ObjHideOrShow(false, false, false, false, true);
|
}
|
else
|
{
|
if (_attackWashPro.singleWashAttrModel.isPerfect && _lifeWashPro.singleWashAttrModel.isPerfect
|
&& _ignoreDefenceWashPro.singleWashAttrModel.isPerfect)
|
{
|
ObjHideOrShow(false, false, false, true, false);
|
}
|
else
|
{
|
|
if (_attackWashPro.singleWashAttrModel.washState == WashState.None && _lifeWashPro.singleWashAttrModel.washState == WashState.None
|
&& _ignoreDefenceWashPro.singleWashAttrModel.washState == WashState.None)
|
{
|
_washBtn.onClick.AddListener(OnClickWashBtn);
|
ObjHideOrShow(true, false, false, false, false);
|
}
|
else
|
{
|
ObjHideOrShow(false, false, true, false, false);
|
_saveBtn.RemoveAllListeners();
|
_saveBtn.onClick.AddListener(() => { OnClickSaveBtn(); });
|
}
|
}
|
|
}
|
}
|
else
|
{
|
ObjHideOrShow(false, true, true, false, false);
|
_saveBtn.RemoveAllListeners();
|
_saveBtn.onClick.AddListener(() => { OnClickSaveBtn(); });
|
}
|
}
|
else
|
{
|
_washFullLvText.text = Language.Get("EquipWash114", equipWashModel.WashMinLV());
|
ObjHideOrShow(false, false, false, false, true);
|
|
}
|
}
|
else
|
{
|
_washBtn.onClick.AddListener(OnClickWashBtn);
|
ObjHideOrShow(true, false, false, false, false);
|
//_washBtn.GetComponent<Image>().SetSprite("BlackBtn");
|
}
|
|
}
|
|
private void ObjHideOrShow(params bool[] isShows)
|
{
|
_washBtn.gameObject.SetActive(isShows[0]);
|
_cancelBtn.gameObject.SetActive(isShows[1]);
|
_saveBtn.gameObject.SetActive(isShows[2]);
|
_upgradeBtn.gameObject.SetActive(isShows[3]);
|
_washFullLvText.gameObject.SetActive(isShows[4]);
|
}
|
|
#region 按钮事件
|
|
private bool isOpenPrompting = true;
|
|
private void OnClickWashBtn()
|
{
|
if (_washProModel.isPutOn)
|
{
|
|
int goldCount = (int)PlayerDatas.Instance.baseData.Gold;
|
if (equipWashModel.IsEnoughMat(_tagWashModel))
|
{
|
if (CostMoney > 0)
|
{
|
if (goldCount >= CostMoney)
|
{
|
if (isOpenPrompting)
|
{
|
ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("EquipWash103", CostMoney),
|
Language.Get("ConfirmCancel101"), (bool isOk, bool isToggle) =>
|
{
|
if (isOk)
|
{
|
washEffect.Play();
|
equipWashModel.SendWashQuest(_washProModel.EquipPlace, GetWashCheckUseGoldAttr());
|
}
|
|
isOpenPrompting = !isToggle;
|
});
|
}
|
else
|
{
|
washEffect.Play();
|
equipWashModel.SendWashQuest(_washProModel.EquipPlace, GetWashCheckUseGoldAttr());
|
}
|
|
}
|
else
|
{
|
if (VersionConfig.Get().isBanShu)
|
{
|
SysNotifyMgr.Instance.ShowTip("GoldErr");
|
return;
|
}
|
WindowCenter.Instance.Open<RechargeTipWin>();
|
}
|
}
|
else
|
{
|
washEffect.Play();
|
equipWashModel.SendWashQuest(_washProModel.EquipPlace, GetWashCheckUseGoldAttr());
|
}
|
}
|
else
|
{
|
itemPathModel.SetChinItemModel(_tagWashModel.costItem);
|
}
|
}
|
else
|
{
|
SysNotifyMgr.Instance.ShowTip("Wash_NoEquip1");
|
}
|
|
}
|
|
private int GetWashCheckUseGoldAttr()
|
{
|
int code = 0;
|
if (_attackWashPro.toggleIsOn)
|
{
|
code += 1;
|
}
|
if (_lifeWashPro.toggleIsOn)
|
{
|
code += 2;
|
}
|
if (_ignoreDefenceWashPro.toggleIsOn)
|
{
|
code += 4;
|
}
|
return code;
|
}
|
|
private void OnClickSaveBtn(bool needSave = true)
|
{
|
|
CA326_tagCMEquipXLAttrChangeOK result = new CA326_tagCMEquipXLAttrChangeOK();
|
result.EquipPlace = (byte)_washProModel.EquipPlace;
|
result.IsSave = 1;
|
GameNetSystem.Instance.SendInfo(result);
|
}
|
|
private void OnClickCancelBtn()
|
{
|
CA326_tagCMEquipXLAttrChangeOK result = new CA326_tagCMEquipXLAttrChangeOK();
|
result.EquipPlace = (byte)_washProModel.EquipPlace;
|
result.IsSave = 0;
|
GameNetSystem.Instance.SendInfo(result);
|
|
}
|
|
private void OnClickUpGradeBtn()
|
{
|
CA326_tagCMEquipXLAttrChangeOK result = new CA326_tagCMEquipXLAttrChangeOK();
|
result.EquipPlace = (byte)_washProModel.EquipPlace;
|
result.IsSave = 2;
|
GameNetSystem.Instance.SendInfo(result);
|
}
|
|
private void OnClickMasterBtn()
|
{
|
int type = equipWashModel.OnGetWashType(_washProModel.EquipPlace);
|
equipWashModel.OnGetMasterModel(_washInfolist);
|
int groupLv = 0;
|
switch(type)
|
{
|
case 1:
|
groupLv = equipWashModel.washGroup1[0].XLAttrLV;
|
break;
|
case 2:
|
groupLv = equipWashModel.washGroup2[0].XLAttrLV;
|
break;
|
case 3:
|
groupLv = equipWashModel.washGroup3[0].XLAttrLV;
|
break;
|
}
|
equipWashModel.SetWashMasterModel(type,groupLv);
|
WindowCenter.Instance.Open<WashMasterWin>();
|
}
|
|
private void OnClickRuleBtn()
|
{
|
}
|
#endregion
|
|
public List<string> GetCostMoneyList()
|
{
|
if (_costMoneylist != null)
|
return _costMoneylist;
|
else
|
return null;
|
}
|
|
private List<string> GetToolsList(string tools, List<string> toolslist)
|
{
|
toolslist = new List<string>();
|
string[] toolsArray = tools.Split('|');
|
for (int i = 0; i < toolsArray.Length; i++)
|
{
|
toolslist.Add(toolsArray[i]);
|
}
|
return toolslist;
|
|
}
|
|
}
|