온리 캐시로 뽑기 후 뽑기권 없다는 거 수정
This commit is contained in:
parent
2f6a0b3857
commit
18d0436568
|
|
@ -86,7 +86,8 @@ messageinfo 엄청 느린 버그
|
|||
- 포탈, 필드보스, 부활의 성소, 챕터보스
|
||||
|
||||
상점
|
||||
- 상품 ui 등...
|
||||
- 상점 테이블의 탭 연결
|
||||
|
||||
장비 착용 에러 수정하자
|
||||
뽑기 후 뽑기권 없다는 거 수정하자
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -26,7 +26,7 @@ public class btn_gacha : MonoBehaviour
|
|||
|
||||
texts[0].text = DSUtil.Format(382, m_Count);
|
||||
|
||||
switch (Get_BtnType(false))
|
||||
switch (Get_BtnType())
|
||||
{
|
||||
case eGachaBtnType.OnlyTicket:
|
||||
moneyForms[0].gameObject.SetActive(true);
|
||||
|
|
@ -48,19 +48,19 @@ public class btn_gacha : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
eGachaBtnType Get_BtnType(bool showtoast)
|
||||
eGachaBtnType Get_BtnType()
|
||||
{
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
if (sdata.Check_ItemAmount(m_Data.n_GachaTicketID, m_Count, showtoast))
|
||||
if (sdata.Check_ItemAmount(m_Data.n_GachaTicketID, m_Count, false))
|
||||
return eGachaBtnType.OnlyTicket; // 뽑기권이 충분하면 뽑기권만
|
||||
else if (sdata.Get_ItemAmount(m_Data.n_GachaTicketID) > 0)
|
||||
{
|
||||
var remaincount = m_Count - (int)sdata.Get_ItemAmount(m_Data.n_GachaTicketID);
|
||||
if (sdata.Check_ItemAmount(m_Data.n_GachaGoodsID, remaincount * m_Data.n_GachaPrice, showtoast))
|
||||
if (sdata.Check_ItemAmount(m_Data.n_GachaGoodsID, remaincount * m_Data.n_GachaPrice, false))
|
||||
return eGachaBtnType.TicketAndCash; // 뽑기권이 횟수만큼 부족하지만 부족한 만큼 캐시 사용
|
||||
}
|
||||
|
||||
if (sdata.Check_ItemAmount(m_Data.n_GachaGoodsID, m_Count * m_Data.n_GachaPrice, showtoast))
|
||||
if (sdata.Check_ItemAmount(m_Data.n_GachaGoodsID, m_Count * m_Data.n_GachaPrice, false))
|
||||
return eGachaBtnType.OnlyCash; // 캐시만 사용할 때
|
||||
|
||||
return eGachaBtnType.CantGacha;
|
||||
|
|
@ -69,7 +69,7 @@ public class btn_gacha : MonoBehaviour
|
|||
public void OnClick_Gacha()
|
||||
{
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
switch (Get_BtnType(true))
|
||||
switch (Get_BtnType())
|
||||
{
|
||||
case eGachaBtnType.OnlyTicket:
|
||||
sdata.Use_Item(m_Data.n_GachaTicketID, m_Count);
|
||||
|
|
@ -85,6 +85,9 @@ public class btn_gacha : MonoBehaviour
|
|||
sdata.Use_Item(m_Data.n_GachaGoodsID, m_Count * m_Data.n_GachaPrice);
|
||||
Gacha_Process();
|
||||
break;
|
||||
default:
|
||||
ToastUI.Ins.Set(388);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue