575 lines
17 KiB
C#
575 lines
17 KiB
C#
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
using System.Collections;
|
|||
|
using Games.Item;
|
|||
|
using System.Collections.Generic;
|
|||
|
using GCGame.Table;
|
|||
|
|
|||
|
public class EquipEnhanceXiangqian : UIControllerBase<EquipEnhanceXiangqian>
|
|||
|
{
|
|||
|
public Button tipBtn;
|
|||
|
|
|||
|
private void Awake()
|
|||
|
{
|
|||
|
tipBtn.onClick.AddListener(
|
|||
|
() =>
|
|||
|
{
|
|||
|
MessageHelpLogic.ShowHelpMessage(48);
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
void OnEnable ()
|
|||
|
{
|
|||
|
SetInstance(this);
|
|||
|
OnXiangqianPage(0);
|
|||
|
}
|
|||
|
|
|||
|
void OnDisable()
|
|||
|
{
|
|||
|
SetInstance(null);
|
|||
|
}
|
|||
|
|
|||
|
public void UpdateEquip()
|
|||
|
{
|
|||
|
//OnXiangqianPage(0);
|
|||
|
if (!_EquipEnhanceRoot.RefreshItems())
|
|||
|
{
|
|||
|
Hashtable hash = new Hashtable();
|
|||
|
hash.Add("XiangqianTips", true);
|
|||
|
|
|||
|
_EquipEnhanceRoot._EquipContainer.InitSelectContent(_EquipEnhanceRoot._AllEquipList, new GameItem[1] { _EquipItem }, OnSelectEquipXiangqian1, null, hash);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
OnSelectEquipXiangqian1(_EquipItem);
|
|||
|
_EquipEnhanceRoot._EquipContainer.ForeachActiveItem<EquipEnhanceItem>((enhanceItem) =>
|
|||
|
{
|
|||
|
enhanceItem.RefreshEqupItem();
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
UpdateGemSetLevel();
|
|||
|
UpdateRedTip();
|
|||
|
}
|
|||
|
|
|||
|
public EquipEnhanceRoot _EquipEnhanceRoot;
|
|||
|
|
|||
|
#region
|
|||
|
|
|||
|
public void OnXiangqianPage(int page)
|
|||
|
{
|
|||
|
Hashtable hash = new Hashtable();
|
|||
|
hash.Add("XiangqianTips", true);
|
|||
|
|
|||
|
_EquipEnhanceRoot._EquipContainer.gameObject.SetActive(true);
|
|||
|
_EquipEnhanceRoot._EquipContainer._IsMultiSelect = false;
|
|||
|
_EquipEnhanceRoot.InitAllEquipList();
|
|||
|
if (_EquipEnhanceRoot._AllEquipList.Count == 0)
|
|||
|
{
|
|||
|
_EquipEnhanceRoot._EquipContainer.InitSelectContent(_EquipEnhanceRoot._AllEquipList, null);
|
|||
|
OnSelectEquipXiangqian1(null);
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
var lastSelects = _EquipEnhanceRoot._EquipContainer.GetSelecteds<GameItem>();
|
|||
|
List<GameItem> selectedItem = new List<GameItem>();
|
|||
|
if(lastSelects != null)
|
|||
|
{
|
|||
|
for (int i = 0; i < lastSelects.Count; i++)
|
|||
|
{
|
|||
|
if (_EquipEnhanceRoot._AllEquipList.Count > 0 && _EquipEnhanceRoot._AllEquipList.Contains(lastSelects[i]))
|
|||
|
{
|
|||
|
selectedItem.Add(lastSelects[i]);
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if(selectedItem.Count == 0)
|
|||
|
{
|
|||
|
selectedItem.Add(_EquipEnhanceRoot._AllEquipList[0]);
|
|||
|
}
|
|||
|
|
|||
|
_EquipEnhanceRoot._EquipContainer.InitSelectContent(_EquipEnhanceRoot._AllEquipList, selectedItem,
|
|||
|
OnSelectEquipXiangqian1, null, hash);
|
|||
|
|
|||
|
UpdateGemSetLevel();
|
|||
|
UpdateRedTip();
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region
|
|||
|
|
|||
|
public CommonItemEquipItem _EquipSlot;
|
|||
|
public EquipGemSlot[] _EquipGemSlots;
|
|||
|
public float _GemPosRange;
|
|||
|
public EquipGemOpenMsgBox _OpenMsgBox;
|
|||
|
public EquipGemTooltips _GemTooltips;
|
|||
|
public EquipGemPutOnPanel _PutOnPanel;
|
|||
|
public EquipGemTakeOffMsgBox _TakeOffPanel;
|
|||
|
public Button _BtnPutOff;
|
|||
|
public GameObject _Disable_BtnPutOff;
|
|||
|
public Button _BtnLevelUp;
|
|||
|
public GameObject _Disable_BtnLevelUp;
|
|||
|
|
|||
|
public GameObject _EffectGemOpenPrefab;
|
|||
|
private ParticleSystem _EffectGemOpen;
|
|||
|
private bool _IsGemOpen;
|
|||
|
public GameObject _EffectPutOnPrefab;
|
|||
|
private ParticleSystem _EffectPutOn;
|
|||
|
private bool _GemPutOn;
|
|||
|
private int _PunchItemData;
|
|||
|
private int _PunchItemNum;
|
|||
|
|
|||
|
private GameItem _EquipItem;
|
|||
|
public GameItem EquipItem
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return _EquipItem;
|
|||
|
}
|
|||
|
}
|
|||
|
private int _SelectedPos = 0;
|
|||
|
private GameItem _SelectGemItem;
|
|||
|
public GameItem SelectGemItem
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return _SelectGemItem;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private int _SelectGemData;
|
|||
|
|
|||
|
private void OnSelectEquipXiangqian1(object selectObj)
|
|||
|
{
|
|||
|
_EquipItem = selectObj as GameItem;
|
|||
|
if (_EquipItem == null)
|
|||
|
{
|
|||
|
_EquipSlot.InitItem(null);
|
|||
|
_OpenMsgBox.gameObject.SetActive(false);
|
|||
|
_GemTooltips.gameObject.SetActive(false);
|
|||
|
_PutOnPanel.gameObject.SetActive(false);
|
|||
|
_LvUpRedTip.SetActive(false);
|
|||
|
InitGemPos(0);
|
|||
|
//_BtnPutOff.gameObject.SetActive(false);
|
|||
|
//_Disable_BtnPutOff.SetActive(true);
|
|||
|
|
|||
|
//_BtnLevelUp.gameObject.SetActive(false);
|
|||
|
//_Disable_BtnLevelUp.SetActive(true);
|
|||
|
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
_EquipSlot.InitItem(_EquipItem);
|
|||
|
int gemCnt = _EquipItem.GetEquipGemSlotCnt();
|
|||
|
InitGemPos(gemCnt);
|
|||
|
_OpenMsgBox.gameObject.SetActive(false);
|
|||
|
_GemTooltips.gameObject.SetActive(false);
|
|||
|
_PutOnPanel.gameObject.SetActive(false);
|
|||
|
|
|||
|
//_BtnPutOff.gameObject.SetActive(false);
|
|||
|
//_Disable_BtnPutOff.SetActive(true);
|
|||
|
|
|||
|
//_BtnLevelUp.gameObject.SetActive(false);
|
|||
|
//_Disable_BtnLevelUp.SetActive(true);
|
|||
|
|
|||
|
if (_IsGemOpen && _SelectedPos >= 0)
|
|||
|
{
|
|||
|
OnRetEquipPunch();
|
|||
|
_IsGemOpen = false;
|
|||
|
}
|
|||
|
if (_GemPutOn && _SelectedPos >= 0)
|
|||
|
{
|
|||
|
OnRetGemPutOn();
|
|||
|
_GemPutOn = false;
|
|||
|
}
|
|||
|
|
|||
|
UpdateGemSetLevel();
|
|||
|
UpdateRedTip();
|
|||
|
}
|
|||
|
|
|||
|
private void InitGemPos(int gemCnt)
|
|||
|
{
|
|||
|
//_BtnLevelUp.gameObject.SetActive(false);
|
|||
|
//_Disable_BtnLevelUp.SetActive(true);
|
|||
|
|
|||
|
var equipSlotPos = _EquipSlot.GetComponent<RectTransform>().anchoredPosition;
|
|||
|
float startAngle = 0;
|
|||
|
if (gemCnt == 2)
|
|||
|
{
|
|||
|
startAngle = -90;
|
|||
|
}
|
|||
|
float deltaAngle = 360.0f / gemCnt;
|
|||
|
for (int i = 0; i < _EquipGemSlots.Length; ++i)
|
|||
|
{
|
|||
|
if (i < gemCnt)
|
|||
|
{
|
|||
|
_EquipGemSlots[i].gameObject.SetActive(true);
|
|||
|
Vector2 gemPos = Vector2.zero;
|
|||
|
gemPos.x = Mathf.Sin((deltaAngle * i + startAngle) * Mathf.Deg2Rad) * _GemPosRange;
|
|||
|
gemPos.y = Mathf.Cos((deltaAngle * i + startAngle) * Mathf.Deg2Rad) * _GemPosRange;
|
|||
|
_EquipGemSlots[i]._RectTransform.anchoredPosition = gemPos;
|
|||
|
_EquipGemSlots[i].ShowGem(_EquipItem.GemItems[i], i);
|
|||
|
if (_EquipItem.GemItems[i].IsOpen && _EquipItem.GemItems[i].DataID > 0)
|
|||
|
{
|
|||
|
//_BtnLevelUp.gameObject.SetActive(true);
|
|||
|
//_Disable_BtnLevelUp.SetActive(false);
|
|||
|
}
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
_EquipGemSlots[i].gameObject.SetActive(false);
|
|||
|
}
|
|||
|
|
|||
|
_EquipGemSlots[i].OnDisSelect();
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
public void OnGemSlotSelect(EquipGemSlot gemSlot)
|
|||
|
{
|
|||
|
for (int i = 0; i < _EquipGemSlots.Length; ++i)
|
|||
|
{
|
|||
|
if (_EquipGemSlots[i] == gemSlot)
|
|||
|
{
|
|||
|
_SelectedPos = i;
|
|||
|
_EquipGemSlots[i].OnSelect();
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
_EquipGemSlots[i].OnDisSelect();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
var gemOpen = TableManager.GetEquipPunchConsumeByID(_SelectedPos);
|
|||
|
var playerLevel = ObjManager.Instance.MainPlayer.BaseAttr.Level;
|
|||
|
|
|||
|
if (gemOpen.OpenLevel > playerLevel)
|
|||
|
{
|
|||
|
ShowOpenGemSlot();
|
|||
|
//_BtnPutOff.gameObject.SetActive(false);
|
|||
|
//_Disable_BtnPutOff.SetActive(true);
|
|||
|
|
|||
|
//_BtnLevelUp.gameObject.SetActive(false);
|
|||
|
//_Disable_BtnLevelUp.SetActive(true);
|
|||
|
}
|
|||
|
else if (_EquipItem.GemItems[_SelectedPos].DataID <= 0)
|
|||
|
{
|
|||
|
//MessageBoxLogic.OpenOKCancelBox(5353, -1, () =>
|
|||
|
//{
|
|||
|
// ShowPutonGem();
|
|||
|
// _BtnPutOff.interactable = false;
|
|||
|
//});
|
|||
|
ShowPutonGem();
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
ShowGemInfo();
|
|||
|
ShowPutonGem(2);
|
|||
|
//_BtnPutOff.gameObject.SetActive(true);
|
|||
|
//_Disable_BtnPutOff.SetActive(false);
|
|||
|
|
|||
|
//_BtnLevelUp.gameObject.SetActive(true);
|
|||
|
//_Disable_BtnLevelUp.SetActive(false);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void ShowOpenGemSlot()
|
|||
|
{
|
|||
|
foreach (var exAttr in _EquipItem.ExAttrs)
|
|||
|
{
|
|||
|
if (exAttr.XilianTab.PropID == (int)PropID.PropertyID.EQUIP_XILIAN_NOGEM)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{5344}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
//var playerLevel = ObjManager.Instance.MainPlayer.BaseAttr.Level;
|
|||
|
|
|||
|
var consumeTab = TableManager.GetEquipPunchConsumeByID(_SelectedPos);
|
|||
|
GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{5431}", consumeTab.OpenLevel));
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
// 1 默认 2 显示同种类型更强的替换
|
|||
|
private void ShowPutonGem(int showType = 1)
|
|||
|
{
|
|||
|
_PutOnPanel.InitGemInPack(_EquipItem, _EquipItem.GemItems[_SelectedPos], showType);
|
|||
|
}
|
|||
|
|
|||
|
private void ShowGemInfo()
|
|||
|
{
|
|||
|
_GemTooltips.SetGemInfo(_EquipItem.GemItems[_SelectedPos], _EquipItem);
|
|||
|
}
|
|||
|
|
|||
|
public void OnGemPosOpen()
|
|||
|
{
|
|||
|
if (_EquipItem.BindFlag)
|
|||
|
{
|
|||
|
OnGemPosOpenOk();
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
MessageBoxLogic.OpenOKCancelBox(5354, -1, OnGemPosOpenOk);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void OnGemPosOpenOk()
|
|||
|
{
|
|||
|
//TestGemOpen();
|
|||
|
CG_EQUIP_PUNCH packet = (CG_EQUIP_PUNCH)PacketDistributed.CreatePacket(MessageID.PACKET_CG_EQUIP_PUNCH);
|
|||
|
if (_EquipItem.IsPlayerEquiped())
|
|||
|
{
|
|||
|
packet.Packtype = (int)GameItemContainer.Type.TYPE_EQUIPPACK;
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
packet.Packtype = (int)GameItemContainer.Type.TYPE_BACKPACK;
|
|||
|
}
|
|||
|
packet.Equipguid = _EquipItem.Guid;
|
|||
|
//packet.Punchid = _SelectedPos;
|
|||
|
packet.SendPacket();
|
|||
|
}
|
|||
|
|
|||
|
public void OnRetEquipPunch()
|
|||
|
{
|
|||
|
if (_EffectGemOpen == null)
|
|||
|
{
|
|||
|
var gemEffectGO = GameObject.Instantiate(_EffectGemOpenPrefab);
|
|||
|
_EffectGemOpen = gemEffectGO.GetComponentInChildren<ParticleSystem>();
|
|||
|
}
|
|||
|
_EffectGemOpen.gameObject.SetActive(true);
|
|||
|
_EffectGemOpen.transform.position = _EquipGemSlots[_SelectedPos].transform.position;
|
|||
|
_EffectGemOpen.Play();
|
|||
|
|
|||
|
if (_PunchItemData > 0)
|
|||
|
{
|
|||
|
string tip = StrDictionary.GetClientDictionaryString("#{5390}", GCGame.Utils.GetItemNameColor(_PunchItemData), _PunchItemNum);
|
|||
|
GUIData.AddNotifyData(tip);
|
|||
|
_PunchItemData = 0;
|
|||
|
_PunchItemNum = 0;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void OnGemPutOn(GameItem gemItem)
|
|||
|
{
|
|||
|
_SelectGemItem = gemItem;
|
|||
|
var containSameGem = _EquipItem.GemItems.Find((gemData) =>
|
|||
|
{
|
|||
|
if (gemData.DataID == gemItem.DataID)
|
|||
|
return true;
|
|||
|
|
|||
|
return false;
|
|||
|
});
|
|||
|
if (containSameGem != null)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{5334}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
//判定镶嵌了同种类的宝石二次确认框
|
|||
|
|
|||
|
var sameTypeGem = _EquipItem.GemItems.Find((gemData) =>
|
|||
|
{
|
|||
|
Tab_GemProp curGemProp = TableManager.GetGemPropByID(gemData.DataID, 0);
|
|||
|
Tab_GemProp dstGemProp = TableManager.GetGemPropByID(gemItem.DataID, 0);
|
|||
|
if(curGemProp != null && dstGemProp != null){
|
|||
|
if (curGemProp.GetPropIDbyIndex(0) == dstGemProp.GetPropIDbyIndex(0))
|
|||
|
return true;
|
|||
|
}
|
|||
|
|
|||
|
return false;
|
|||
|
});
|
|||
|
if (sameTypeGem != null)
|
|||
|
{
|
|||
|
Tab_GemProp nextGemProp = TableManager.GetGemPropByID(gemItem.DataID, 0);
|
|||
|
Tab_GemProp curGemProp = TableManager.GetGemPropByID(sameTypeGem.DataID, 0);
|
|||
|
if (curGemProp != null && nextGemProp != null)
|
|||
|
{
|
|||
|
int curPower = curGemProp.CombatValue;
|
|||
|
int nextPower = nextGemProp.CombatValue;
|
|||
|
string text = StrDictionary.GetClientDictionaryString("#{6154}", curPower, nextPower);
|
|||
|
MessageBoxLogic.OpenOKCancelBox(text, null, OnGemPutOnOK);
|
|||
|
//MessageBoxLogic.OpenOKCancelBox(5353, -1, OnGemPutOnOK);
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
if (_EquipItem.BindFlag)
|
|||
|
{
|
|||
|
OnGemPutOnOK();
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
MessageBoxLogic.OpenOKCancelBox(5353, -1, OnGemPutOnOK);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void OnGemPutOnOK()
|
|||
|
{
|
|||
|
CG_PUT_GEM packet = (CG_PUT_GEM)PacketDistributed.CreatePacket(MessageID.PACKET_CG_PUT_GEM);
|
|||
|
if (_EquipItem.IsPlayerEquiped())
|
|||
|
{
|
|||
|
packet.Packettype = (int)GameItemContainer.Type.TYPE_EQUIPPACK;
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
packet.Packettype = (int)GameItemContainer.Type.TYPE_BACKPACK;
|
|||
|
}
|
|||
|
packet.Equipguid = _EquipItem.Guid;
|
|||
|
packet.Gempackettype = (int)GameItemContainer.Type.TYPE_BACKPACK;
|
|||
|
packet.Gemguid = _SelectGemItem.Guid;
|
|||
|
_SelectGemData = _SelectGemItem.DataID;
|
|||
|
packet.SendPacket();
|
|||
|
}
|
|||
|
|
|||
|
public void OnRetGemPutOn()
|
|||
|
{
|
|||
|
if (_EffectPutOn == null)
|
|||
|
{
|
|||
|
var gemEffectGO = GameObject.Instantiate(_EffectPutOnPrefab);
|
|||
|
_EffectPutOn = gemEffectGO.GetComponentInChildren<ParticleSystem>();
|
|||
|
}
|
|||
|
_EffectPutOn.gameObject.SetActive(true);
|
|||
|
_EffectPutOn.transform.position = _EquipGemSlots[_SelectedPos].transform.position;
|
|||
|
//_AnimGemPutOn.Stop();
|
|||
|
_EffectPutOn.Play();
|
|||
|
|
|||
|
if (_SelectGemData > 0)
|
|||
|
{
|
|||
|
string tip = StrDictionary.GetClientDictionaryString("#{5391}", GCGame.Utils.GetItemNameColor(_SelectGemData));
|
|||
|
GUIData.AddNotifyData(tip);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void OnGemTakeOff()
|
|||
|
{
|
|||
|
// 对于拆卸装备品质小于橙色的都不需要消耗
|
|||
|
//if((int)_EquipItem.GetQuality() < 5)
|
|||
|
//{
|
|||
|
// GemTakeOffOk();
|
|||
|
//}
|
|||
|
//else
|
|||
|
//{
|
|||
|
// _TakeOffPanel.SetTakeOff(_EquipItem.GemItems[_SelectedPos], _EquipItem);
|
|||
|
//}
|
|||
|
GemTakeOffOk();
|
|||
|
|
|||
|
//TestGemTakeOff();
|
|||
|
}
|
|||
|
|
|||
|
public void GemTakeOffOk()
|
|||
|
{
|
|||
|
CG_TAKE_GEM packet = (CG_TAKE_GEM)PacketDistributed.CreatePacket(MessageID.PACKET_CG_TAKE_GEM);
|
|||
|
if (_EquipItem.IsPlayerEquiped())
|
|||
|
{
|
|||
|
packet.Equippackettype = (int)GameItemContainer.Type.TYPE_EQUIPPACK;
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
packet.Equippackettype = (int)GameItemContainer.Type.TYPE_BACKPACK;
|
|||
|
}
|
|||
|
packet.Equipguid = _EquipItem.Guid;
|
|||
|
packet.Gemdataid = _EquipItem.GemItems[_SelectedPos].DataID;
|
|||
|
packet.SendPacket();
|
|||
|
}
|
|||
|
|
|||
|
public void OnGemLevelUp()
|
|||
|
{
|
|||
|
if (_SelectedPos < 0)
|
|||
|
{
|
|||
|
EquipGemLvUpRoot.Show(_EquipItem, null);
|
|||
|
}
|
|||
|
else if(!_EquipItem.GemItems[_SelectedPos].IsValid())
|
|||
|
{
|
|||
|
EquipGemLvUpRoot.Show(_EquipItem, null);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
EquipGemLvUpRoot.Show(_EquipItem, _EquipItem.GemItems[_SelectedPos]);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void OnGemSuit1()
|
|||
|
{
|
|||
|
if (_EquipItem == null)
|
|||
|
return;
|
|||
|
_EquipItem.UpdateGemSuit();
|
|||
|
EquipGemSuitTips.Show(_EquipItem._GemSuit1, _EquipItem, 1);
|
|||
|
}
|
|||
|
|
|||
|
public void OnGemSuit2()
|
|||
|
{
|
|||
|
if (_EquipItem == null)
|
|||
|
return;
|
|||
|
_EquipItem.UpdateGemSuit();
|
|||
|
EquipGemSuitTips.Show(_EquipItem._GemSuit2, _EquipItem, 2);
|
|||
|
}
|
|||
|
|
|||
|
public void OnGemSuit3()
|
|||
|
{
|
|||
|
if (_EquipItem == null)
|
|||
|
return;
|
|||
|
_EquipItem.UpdateGemSuit();
|
|||
|
EquipGemSuitTips.Show(_EquipItem._GemSuit3, _EquipItem, 3);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region gem set
|
|||
|
|
|||
|
public Text _GemSetName1;
|
|||
|
public Text _GemSetName2;
|
|||
|
public Text _GemSetName3;
|
|||
|
|
|||
|
public void UpdateGemSetLevel()
|
|||
|
{
|
|||
|
int gemSuit1 = 0;
|
|||
|
if (_EquipItem!= null &&_EquipItem._GemSuit1 > 0)
|
|||
|
{
|
|||
|
var normalSuitTab = TableManager.GetGemSuitByID(_EquipItem._GemSuit1);
|
|||
|
gemSuit1 = normalSuitTab.SuitLevel;
|
|||
|
}
|
|||
|
|
|||
|
int gemSuit2 = 0;
|
|||
|
if (_EquipItem != null && _EquipItem._GemSuit2 > 0)
|
|||
|
{
|
|||
|
var eliteSuitTab = TableManager.GetGemSuitByID(_EquipItem._GemSuit2);
|
|||
|
gemSuit2 = eliteSuitTab.SuitLevel;
|
|||
|
}
|
|||
|
|
|||
|
int gemSuit3 = 0;
|
|||
|
if (_EquipItem != null && _EquipItem._GemSuit3 > 0)
|
|||
|
{
|
|||
|
var eliteSuitTab = TableManager.GetGemSuitByID(_EquipItem._GemSuit3);
|
|||
|
gemSuit3 = eliteSuitTab.SuitLevel;
|
|||
|
}
|
|||
|
_GemSetName1.text = StrDictionary.GetClientDictionaryString("#{5426}") + StrDictionary.GetClientDictionaryString("#{1166}", gemSuit1);
|
|||
|
_GemSetName2.text = StrDictionary.GetClientDictionaryString("#{5427}") + StrDictionary.GetClientDictionaryString("#{1166}", gemSuit2);
|
|||
|
_GemSetName3.text = StrDictionary.GetClientDictionaryString("#{5456}") + StrDictionary.GetClientDictionaryString("#{1166}", gemSuit3);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region
|
|||
|
|
|||
|
public GameObject _LvUpRedTip;
|
|||
|
|
|||
|
public void UpdateRedTip()
|
|||
|
{
|
|||
|
if (_EquipItem != null && _EquipItem.IsCanAnyGemLvUp())
|
|||
|
{
|
|||
|
_LvUpRedTip.SetActive(true);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
_LvUpRedTip.SetActive(false);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|