Save_EquipItem_Enchant
This commit is contained in:
parent
b9e7bbd74a
commit
358c971206
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -2926,4 +2926,8 @@ public class SC_LimitOptionResultData
|
||||||
{
|
{
|
||||||
public int slot, randombagid, optionlv;
|
public int slot, randombagid, optionlv;
|
||||||
}
|
}
|
||||||
|
public class SC_EnchantEquipItemResult
|
||||||
|
{
|
||||||
|
public int optionconfigid, Lv;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -11,6 +11,7 @@ using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
using UnityEngine.Networking;
|
||||||
|
using static InvBaseItem;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
public class ServerInfo : MyCoroutine
|
public class ServerInfo : MyCoroutine
|
||||||
|
|
@ -1521,6 +1522,49 @@ public class ServerInfo : MyCoroutine
|
||||||
Set_Coroutine(() => { Save_EquipItem_SlotLvUpInit(itemid, _act); }, 2f);
|
Set_Coroutine(() => { Save_EquipItem_SlotLvUpInit(itemid, _act); }, 2f);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// itemid : 인챈트 할 착용 아이템 id
|
||||||
|
/// </summary>
|
||||||
|
public void Save_EquipItem_Enchant(int itemid, int eid, int slot, Action<SC_EnchantEquipItemResult> _act)
|
||||||
|
{
|
||||||
|
NetWait.Ins.Set(true);
|
||||||
|
PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest
|
||||||
|
{
|
||||||
|
FunctionName = MethodBase.GetCurrentMethod().Name,
|
||||||
|
GeneratePlayStreamEvent = true,
|
||||||
|
FunctionParameter = new
|
||||||
|
{
|
||||||
|
Token = m_LoginInfo.EntityToken.EntityToken,
|
||||||
|
ItemID = itemid,
|
||||||
|
EnchantID = eid,
|
||||||
|
Slot = slot
|
||||||
|
}
|
||||||
|
},
|
||||||
|
result =>
|
||||||
|
{
|
||||||
|
if (result.Error == null)
|
||||||
|
{
|
||||||
|
NetWait.Ins.Set(false);
|
||||||
|
var str_result = result.FunctionResult.ToString();
|
||||||
|
var error = MyErrorCheck(str_result);
|
||||||
|
// (0 성공, 1 실패 (초기화 할 필요 없음), 3 실패 (없는 아이템), 4 실패 (업그레이드 정보 없는 파츠))
|
||||||
|
switch (error)
|
||||||
|
{
|
||||||
|
case 0: _act?.Invoke(JsonConvert.DeserializeObject<SC_EnchantEquipItemResult>(str_result)); break;
|
||||||
|
//case 1: ToastUI.Ins.Set(999900021); break;
|
||||||
|
case 2: ToastUI.Ins.Set(999900022); break;
|
||||||
|
case 3: ToastUI.Ins.Set(999900014); break;
|
||||||
|
case 4: ToastUI.Ins.Set(999900020); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Set_Coroutine(() => { Save_EquipItem_Enchant(itemid, eid, slot, _act); }, 2f);
|
||||||
|
},
|
||||||
|
fail =>
|
||||||
|
{
|
||||||
|
Set_Coroutine(() => { Save_EquipItem_Enchant(itemid, eid, slot, _act); }, 2f);
|
||||||
|
});
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 우편
|
#region 우편
|
||||||
|
|
|
||||||
|
|
@ -59,15 +59,21 @@ public class EquipmentEnchantCard : CardBase
|
||||||
var sdata = ServerInfo.Ins.m_ServerData;
|
var sdata = ServerInfo.Ins.m_ServerData;
|
||||||
if (sdata.Get_EnchantLv(m_Data.n_EnchantID) > 0)
|
if (sdata.Get_EnchantLv(m_Data.n_EnchantID) > 0)
|
||||||
{ // 마법 부여 하자
|
{ // 마법 부여 하자
|
||||||
|
ServerInfo.Ins.Save_EquipItem_Enchant(PopupMgr.Ins.m_EquipmentItemPopup.Get_ItemID(), m_Data.n_EnchantID,
|
||||||
|
Select_EnchantCardData.Index,
|
||||||
|
result =>
|
||||||
|
{
|
||||||
var parts = PopupMgr.Ins.m_EquipmentItemPopup.Get_Parts();
|
var parts = PopupMgr.Ins.m_EquipmentItemPopup.Get_Parts();
|
||||||
var grade = DSUtil.Get_RandomIndex(m_EnchantRateTableData.list_rate) + 1;
|
//var grade = DSUtil.Get_RandomIndex(m_EnchantRateTableData.list_rate) + 1;
|
||||||
var enchantlv = table_enchantgradeconfig.Ins.Get_Lv(grade);
|
//var enchantlv = table_enchantgradeconfig.Ins.Get_Lv(grade);
|
||||||
var optionconfigid = m_Data.Get_OptionConfigID(Select_SlotData);
|
//var optionconfigid = m_Data.Get_OptionConfigID(Select_SlotData);
|
||||||
sdata.Set_SlotEnchant(parts, Select_EnchantCardData.Index, optionconfigid, enchantlv);
|
//sdata.Set_SlotEnchant(parts, Select_EnchantCardData.Index, optionconfigid, enchantlv);
|
||||||
|
sdata.Set_SlotEnchant(parts, Select_EnchantCardData.Index, result.optionconfigid, result.Lv);
|
||||||
PopupMgr.Ins.m_EquipmentItemPopup.m_EquipItemEnchantOption.Set_UI();
|
PopupMgr.Ins.m_EquipmentItemPopup.m_EquipItemEnchantOption.Set_UI();
|
||||||
|
|
||||||
sdata.Add_MissionCount(ePurpose.EQUIP_ITEM_ENCHANT_ACC);
|
sdata.Add_MissionCount(ePurpose.EQUIP_ITEM_ENCHANT_ACC);
|
||||||
sdata.Add_MissionCount(ePurpose.EQUIP_ITEM_ENCHANT_ALL);
|
sdata.Add_MissionCount(ePurpose.EQUIP_ITEM_ENCHANT_ALL);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -65,6 +65,7 @@ public class EquipmentItemPopup : EquipmentPopupItemInfoBase
|
||||||
|
|
||||||
int Get_Price() { var price = (int)m_ESUTD.Get_Price(m_SD_Slot.Lv); return price > 0 ? price : 1; }
|
int Get_Price() { var price = (int)m_ESUTD.Get_Price(m_SD_Slot.Lv); return price > 0 ? price : 1; }
|
||||||
public eItem Get_Parts() { return m_Data.e_EquipParts; }
|
public eItem Get_Parts() { return m_Data.e_EquipParts; }
|
||||||
|
public int Get_ItemID() { return m_Data.n_EquipID; }
|
||||||
|
|
||||||
public void OnClick_Reinforce()
|
public void OnClick_Reinforce()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue