스킬 착용 예외처리 추가
This commit is contained in:
parent
ad5fbf0fef
commit
e72a0aa623
|
|
@ -30,7 +30,7 @@ public class SkillCard : CardCoolTimeBase, IDropHandler
|
|||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
images[0].sprite = images[1].sprite = m_Data.Get_Icon();
|
||||
var lv = sdata.Get_SkillLv(eRole.PC, m_Data.n_SkillID);
|
||||
gos[0].SetActive(lv > 0);
|
||||
gos[0].SetActive(true);
|
||||
gos[1].SetActive(lv == 0);
|
||||
|
||||
if (sdata.IsEquipSkill(m_Data.n_SkillID, sdata.Equip.Preset))
|
||||
|
|
@ -38,17 +38,22 @@ public class SkillCard : CardCoolTimeBase, IDropHandler
|
|||
texts[0].text = table_localtext.Ins.Get_Text(207);
|
||||
images[3].sprite = UIAtlasMgr.Ins.Get_Sprite("label 5");
|
||||
}
|
||||
else
|
||||
else if (lv > 0)
|
||||
{
|
||||
texts[0].text = table_localtext.Ins.Get_Text(402);
|
||||
images[3].sprite = UIAtlasMgr.Ins.Get_Sprite("label 3");
|
||||
}
|
||||
else
|
||||
{
|
||||
texts[0].text = table_localtext.Ins.Get_Text(208);
|
||||
images[3].sprite = UIAtlasMgr.Ins.Get_Sprite("label 3 black");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gos[0].SetActive(false);
|
||||
gos[1].SetActive(true);
|
||||
images[0].sprite = UIAtlasMgr.Ins.Get_Sprite("skillempty");
|
||||
images[0].sprite = UIAtlasMgr.Ins.Get_Sprite("plus icon");
|
||||
}
|
||||
}
|
||||
public override void Set(int _val)
|
||||
|
|
@ -117,9 +122,9 @@ public class SkillCard : CardCoolTimeBase, IDropHandler
|
|||
if (CardType == eUICardType.UIEquip)
|
||||
{
|
||||
var draggedSkill = eventData.pointerDrag.GetComponent<SkillDragItem>();
|
||||
if (!DSUtil.CheckNull(draggedSkill))
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
if (!DSUtil.CheckNull(draggedSkill) && sdata.IsObtainItem(draggedSkill.m_skillID))
|
||||
{
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
int unequipid = 0;
|
||||
if (!DSUtil.CheckNull(m_Data))
|
||||
unequipid = m_Data.n_SkillID;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ public class SkillDragItem : MonoBehaviour, IBeginDragHandler, IDragHandler, IEn
|
|||
public void OnBeginDrag(PointerEventData eventData)
|
||||
{
|
||||
parentScroll?.OnBeginDrag(eventData);
|
||||
parentScroll.enabled = false;
|
||||
|
||||
// 프리뷰 오브젝트 생성
|
||||
dragPreview = new GameObject("DragPreview", typeof(CanvasGroup), typeof(Image));
|
||||
|
|
@ -58,6 +59,7 @@ public class SkillDragItem : MonoBehaviour, IBeginDragHandler, IDragHandler, IEn
|
|||
public void OnEndDrag(PointerEventData eventData)
|
||||
{
|
||||
parentScroll?.OnEndDrag(eventData);
|
||||
parentScroll.enabled = true;
|
||||
|
||||
if (!DSUtil.CheckNull(dragPreview))
|
||||
Destroy(dragPreview); // 삭제
|
||||
|
|
|
|||
Loading…
Reference in New Issue