Save_PC_MenuBack
This commit is contained in:
parent
4e8ebd95a3
commit
0557afa477
|
|
@ -872,20 +872,26 @@ handlers.Save_PC_MenuBack = function(args)
|
|||
urod.Equip.LimitPreset = args.Preset;
|
||||
|
||||
// 초월 옵션
|
||||
var rtnLimitSlotOption = Set_LimitSlotOption(table, urod, args);
|
||||
var rtnLimitPreset = null;
|
||||
if (CheckNullOrEmpty(rtnLimitSlotOption))
|
||||
var rtnlimitslot = {};
|
||||
rtnlimitslot.limitslotoption = Set_LimitSlotOption(table, urod, args);
|
||||
if (CheckNullOrEmpty(rtnlimitslot.limitslotoption))
|
||||
{
|
||||
rtnlimitslot.success = true;
|
||||
urod.LimitBreakOption.Preset = args.LimitSlotData.Preset;
|
||||
}
|
||||
else
|
||||
rtnLimitPreset = urod.LimitBreakOption.Preset;
|
||||
{
|
||||
rtnlimitslot.success = false;
|
||||
rtnlimitslot.limitpreset = urod.LimitBreakOption.Preset;
|
||||
rtnlimitslot.matID = Get_GlobalValue_nValue("n_BreakingLimitSlotMaterialID");
|
||||
rtnlimitslot.curAmount = Get_ItemAmount(urod, rtnlimitslot.matID);
|
||||
}
|
||||
|
||||
Set_JsonUserData(urod);
|
||||
return Get_Return(0, {
|
||||
awakekMats : rtn_awakenMatIds,
|
||||
awakenMats : rtn_awakenMatIds,
|
||||
awaken : urod.Awaken,
|
||||
limitslotoption : rtnLimitSlotOption,
|
||||
limitpreset : rtnLimitPreset,
|
||||
limitoptionAmount : Get_ItemAmount(urod, Get_GlobalValue_nValue("n_BreakingLimitSlotMaterialID"))
|
||||
limitslot : rtnlimitslot
|
||||
});
|
||||
}
|
||||
function Get_PCAwakenMatKey(stat)
|
||||
|
|
|
|||
|
|
@ -3117,13 +3117,18 @@ public class SC_Items
|
|||
public int itemid, amount;
|
||||
}
|
||||
|
||||
public class SC_LimitSlotData
|
||||
{
|
||||
public bool success;
|
||||
public Dictionary<string, List<SD_PCLimitSlotData_Read>> limitslotoption;
|
||||
public List<int> limitpreset;
|
||||
public int matID, curAmount;
|
||||
}
|
||||
public class SC_PCMenuBackResult
|
||||
{
|
||||
public List<SC_Items> awakekMats;
|
||||
public List<SC_Items> awakenMats;
|
||||
public Dictionary<string, SD_PCAwakenData_Read> awaken;
|
||||
public Dictionary<string, List<SD_PCLimitSlotData>> limitslotoption;
|
||||
public List<int> limitpreset;
|
||||
public int limitoptionAmount;
|
||||
public SC_LimitSlotData limitslot;
|
||||
}
|
||||
public class SC_PCStatInit
|
||||
{
|
||||
|
|
|
|||
|
|
@ -100,8 +100,6 @@ public class PCLimitSlotCard : CardBase
|
|||
PCLimitUI.Ins.m_PCLimitUI_Right.ChangeOption = true;
|
||||
}
|
||||
sdata.Set_LimitSlotID(preset, m_Slot, option.id, option.lv);
|
||||
sdata.Add_MissionCount(ePurpose.HERO_OPTION_CHANGE);
|
||||
sdata.Add_MissionCount(ePurpose.HERO_OPTION_CHANGE_ACC);
|
||||
PCLimitUI.Ins.m_PCLimitUI_Right.m_LimitSlotChangeData.Add_MissionCount();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class LimitSlotChangeData
|
||||
public class LimitSlotChangeData
|
||||
{
|
||||
ObscuredInt TotalPrice, MissionCount;
|
||||
|
||||
|
|
@ -69,6 +69,7 @@ public class LimitSlotChangeData
|
|||
|
||||
public void Add_TotalPrice(int price) { TotalPrice += price; TotalPrice.RandomizeCryptoKey(); }
|
||||
public void Add_MissionCount() { ++MissionCount; MissionCount.RandomizeCryptoKey(); }
|
||||
public int Get_MissionCount() { return MissionCount; }
|
||||
}
|
||||
public class PCLimitUI_Right : uScrollViewMgr
|
||||
{
|
||||
|
|
@ -118,10 +119,7 @@ public class PCLimitUI_Right : uScrollViewMgr
|
|||
Set_ProtectUI();
|
||||
}
|
||||
|
||||
void Set_ProtectUI()
|
||||
{
|
||||
texts[0].text = m_CurProtectGrade.ToString();
|
||||
}
|
||||
void Set_ProtectUI() { texts[0].text = m_CurProtectGrade.ToString(); }
|
||||
int Get_Price()
|
||||
{
|
||||
int LockCount = 0;
|
||||
|
|
@ -149,10 +147,7 @@ public class PCLimitUI_Right : uScrollViewMgr
|
|||
}
|
||||
return false;
|
||||
}
|
||||
bool CheckMoney(bool showtoast)
|
||||
{
|
||||
return ServerInfo.Ins.m_ServerData.Check_ItemAmount(m_matID, mPrice, showtoast);
|
||||
}
|
||||
bool CheckMoney(bool showtoast) { return ServerInfo.Ins.m_ServerData.Check_ItemAmount(m_matID, mPrice, showtoast); }
|
||||
public string Get_Preset() { return m_Preset; }
|
||||
|
||||
public void OnClick_Preset()
|
||||
|
|
|
|||
|
|
@ -54,24 +54,38 @@ public class PCUI : BotMenuBase
|
|||
|
||||
if (changeCostume || changeworker || changejob || changepreset || pcawakend || changelimitslot)
|
||||
{
|
||||
var limitslotdata = PCLimitUI.Ins.m_PCLimitUI_Right.m_LimitSlotChangeData.Get();
|
||||
ServerInfo.Ins.Save_PC_MenuBack(sdata.Get_EqiupmentEquip(eItem.PCCostume),
|
||||
sdata.Get_EqiupmentEquip(eItem.Worker),
|
||||
sdata.Get_EqiupmentEquip(eItem.PC),
|
||||
sdata.Equip.LimitPreset,
|
||||
PCAwakenUI.isIns ? PCAwakenUI.Ins.Get_CS_AwakenData() : emptyawaken,
|
||||
PCLimitUI.Ins.m_PCLimitUI_Right.m_LimitSlotChangeData.Get(),
|
||||
limitslotdata,
|
||||
result =>
|
||||
{
|
||||
for (int i = 0; i < result.awakekMats.Count; i++)
|
||||
sdata.Set_Item(result.awakekMats[i].itemid, result.awakekMats[i].amount);
|
||||
for (int i = 0; i < result.awakenMats.Count; i++)
|
||||
sdata.Set_Item(result.awakenMats[i].itemid, result.awakenMats[i].amount);
|
||||
foreach (var item in result.awaken) sdata.Awaken[item.Key] = item.Value.Get();
|
||||
|
||||
if (result.limitslotoption != null)
|
||||
if (result.limitslot.success)
|
||||
{
|
||||
|
||||
sdata.Add_MissionCount(ePurpose.HERO_OPTION_CHANGE, 0, limitslotdata.Get_MissionCount());
|
||||
sdata.Add_MissionCount(ePurpose.HERO_OPTION_CHANGE_ACC, 0, limitslotdata.Get_MissionCount());
|
||||
}
|
||||
if (result.limitpreset != null)
|
||||
else
|
||||
{
|
||||
sdata.LimitBreakOption.Preset = result.limitslot.limitpreset;
|
||||
|
||||
foreach (var item in result.limitslot.limitslotoption)
|
||||
{
|
||||
sdata.LimitSlot[item.Key].Clear();
|
||||
for (int i = 0; i < item.Value.Count; i++)
|
||||
sdata.LimitSlot[item.Key].Add(item.Value[i].Get());
|
||||
}
|
||||
MyValue.Get_ActorStatInfoorNull(eRole.PC);
|
||||
|
||||
sdata.Set_Item(result.limitslot.matID, result.limitslot.curAmount);
|
||||
//Refresh_Money(); // 뒤로 가므로 필요x
|
||||
}
|
||||
|
||||
if (changeCostume || changeworker)
|
||||
|
|
|
|||
Loading…
Reference in New Issue