초월 옵션 변경 시 리스트 모두 사용 시, 마지막 상태 저장
This commit is contained in:
parent
adab193f2b
commit
d5ff5415ba
|
|
@ -1181,14 +1181,21 @@ handlers.Save_PC_LimitLvUp = function(args)
|
|||
else
|
||||
return Get_Return(1); // PC 레벨 부족
|
||||
}
|
||||
handlers.Get_PC_LimitSlotOption = function(args)
|
||||
handlers.Save_PC_LimitSlotOption = function(args)
|
||||
{
|
||||
var readonlydata = Get_UserReadOnlyData();
|
||||
var error = Get_Error(readonlydata, args.Token);
|
||||
if (error < 0) return Get_Return(error);
|
||||
|
||||
var urod = Get_JsonUserData(readonlydata);
|
||||
var table = Get_MissionTable();
|
||||
Use_Item(table, urod, Get_GlobalValue_nValue("n_BreakingLimitSlotMaterialID"), args.UseAmount);
|
||||
urod.LimitSlot = args.LimitSlot;
|
||||
Make_LimitBreakOption(urod);
|
||||
|
||||
Add_MissionCount(table, urod, "HERO_OPTION_CHANGE", 0, args.ChangeCount, false);
|
||||
Add_MissionCount(table, urod, "HERO_OPTION_CHANGE_ACC", 0, args.ChangeCount, false);
|
||||
|
||||
Set_JsonUserData(urod);
|
||||
return Get_Return(0, { option : urod.LimitBreakOption });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54437,8 +54437,6 @@ MonoBehaviour:
|
|||
- {fileID: 6175458548714744768}
|
||||
gos:
|
||||
- {fileID: 8756686011241429274}
|
||||
CostumeIdWhenEnter: 0
|
||||
firstInit: 0
|
||||
--- !u!1 &3425181212953318094
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -90544,6 +90542,20 @@ MonoBehaviour:
|
|||
m_Price: {fileID: 7272963551066374066}
|
||||
texts:
|
||||
- {fileID: 6448853900749789264}
|
||||
Btn_Change: {fileID: 4568369408838017681}
|
||||
ChangeOption: 0
|
||||
TotalPrice:
|
||||
currentCryptoKey: 1879508726
|
||||
hiddenValue: 1879508726
|
||||
inited: 1
|
||||
fakeValue: 0
|
||||
fakeValueActive: 0
|
||||
MissionCount:
|
||||
currentCryptoKey: 1367352314
|
||||
hiddenValue: 1367352314
|
||||
inited: 1
|
||||
fakeValue: 0
|
||||
fakeValueActive: 0
|
||||
--- !u!1 &6013485104962013168
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -1128,9 +1128,10 @@ public class ServerInfo : MyCoroutine
|
|||
Set_Coroutine(() => { Save_PC_LimitLvUp(_act); }, 2f);
|
||||
});
|
||||
}
|
||||
public void Get_PC_LimitSlotOption(Action _act)
|
||||
public void Save_PC_LimitSlotOption(int useAmount, int change, Action _act)
|
||||
{
|
||||
NetWait.Ins.Set(true);
|
||||
var serverread = m_ServerData.Get_ServerRead();
|
||||
PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest
|
||||
{
|
||||
FunctionName = MethodBase.GetCurrentMethod().Name,
|
||||
|
|
@ -1138,6 +1139,9 @@ public class ServerInfo : MyCoroutine
|
|||
FunctionParameter = new
|
||||
{
|
||||
Token = m_LoginInfo.EntityToken.EntityToken,
|
||||
UseAmount = useAmount,
|
||||
ChangeCount = change,
|
||||
LimitSlot = serverread.LimitSlot
|
||||
}
|
||||
},
|
||||
result =>
|
||||
|
|
@ -1154,14 +1158,14 @@ public class ServerInfo : MyCoroutine
|
|||
_act();
|
||||
}
|
||||
else
|
||||
Set_Coroutine(() => { Get_PC_LimitSlotOption(_act); }, 2f);
|
||||
Set_Coroutine(() => { Save_PC_LimitSlotOption(useAmount, change, _act); }, 2f);
|
||||
}
|
||||
else
|
||||
Set_Coroutine(() => { Get_PC_LimitSlotOption(_act); }, 2f);
|
||||
Set_Coroutine(() => { Save_PC_LimitSlotOption(useAmount, change, _act); }, 2f);
|
||||
},
|
||||
fail =>
|
||||
{
|
||||
Set_Coroutine(() => { Get_PC_LimitSlotOption(_act); }, 2f);
|
||||
Set_Coroutine(() => { Save_PC_LimitSlotOption(useAmount, change, _act); }, 2f);
|
||||
});
|
||||
}
|
||||
public void Save_PC_LimitSlotOptionChange(string preset, Action<SC_LimitOptionResult> _act)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class BotMenuBase : uScrollViewMgr
|
||||
{
|
||||
public MoneyForm[] moneyForms;
|
||||
|
|
@ -20,6 +16,8 @@ public class BotMenuBase : uScrollViewMgr
|
|||
moneyForms[i].Refresh();
|
||||
}
|
||||
|
||||
public virtual void Check_ServerSave(bool exitui) { }
|
||||
|
||||
public override void OnClick_Back()
|
||||
{
|
||||
base.OnClick_Back();
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ public class PCLimitSlotCard : CardBase
|
|||
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.MissionCount;
|
||||
PCLimitUI.Ins.m_PCLimitUI_Right.MissionCount.RandomizeCryptoKey();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,10 @@ public class PCLimitUI_Right : uScrollViewMgr
|
|||
public TabUIBase m_Tab;
|
||||
public MoneyForm m_Price;
|
||||
public TextMeshProUGUI[] texts; // 0 보호 등급
|
||||
public ButtonPress Btn_Change;
|
||||
|
||||
public bool ChangeOption;
|
||||
public ObscuredInt TotalPrice, MissionCount;
|
||||
string m_Preset = "1";
|
||||
int m_matID, m_CurProtectGrade, m_ProtectMaxGrade;
|
||||
ObscuredInt mPrice;
|
||||
|
|
@ -134,7 +136,20 @@ public class PCLimitUI_Right : uScrollViewMgr
|
|||
MyValue.Get_ActorStatInfoorNull(eRole.PC);
|
||||
NewGameUI.Ins.m_PCUI.Refresh_Money();
|
||||
|
||||
if (ChangeOption) { ServerInfo.Ins.Get_PC_LimitSlotOption(() => { ChangeOption = false; }); }
|
||||
TotalPrice += mPrice; TotalPrice.RandomizeCryptoKey();
|
||||
|
||||
if (ChangeOption)
|
||||
{
|
||||
Btn_Change.ControlPress(false);
|
||||
ServerInfo.Ins.Save_PC_LimitSlotOption(TotalPrice, MissionCount,
|
||||
() =>
|
||||
{
|
||||
ChangeOption = false;
|
||||
Btn_Change.ControlPress(true);
|
||||
TotalPrice = 0; TotalPrice.RandomizeCryptoKey();
|
||||
MissionCount = 0; MissionCount.RandomizeCryptoKey();
|
||||
});
|
||||
}
|
||||
|
||||
//ServerInfo.Ins.Save_PC_LimitSlotOptionChange(m_Preset, options =>
|
||||
//{
|
||||
|
|
|
|||
|
|
@ -26,9 +26,6 @@ public class PCUI : BotMenuBase
|
|||
}
|
||||
m_Tab.Set(list_TabData);
|
||||
|
||||
foreach (var key in dic_EnterID.Keys.ToList())
|
||||
dic_EnterID[key] = 0;
|
||||
|
||||
OnClick_Tab();
|
||||
}
|
||||
|
||||
|
|
@ -40,10 +37,11 @@ public class PCUI : BotMenuBase
|
|||
for (int i = 0; i < m_PCMenu.Length; i++)
|
||||
m_PCMenu[i].Off();
|
||||
m_PCMenu[m_Tab.Get_Index()].Set();
|
||||
Check_ServerSave(false);
|
||||
}
|
||||
|
||||
CS_AwakenData emptyawaken = new CS_AwakenData();
|
||||
public override void OnClick_Back()
|
||||
public override void Check_ServerSave(bool exitui)
|
||||
{
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
|
||||
|
|
@ -73,14 +71,27 @@ public class PCUI : BotMenuBase
|
|||
{
|
||||
PCInfo.Ins.Make_Actors(false, ServerInfo.Ins.m_ServerData);
|
||||
InGameInfo.Ins.StartCam();
|
||||
base.OnClick_Back();
|
||||
if (exitui) base.OnClick_Back();
|
||||
}, 0.02f);
|
||||
}
|
||||
else
|
||||
base.OnClick_Back();
|
||||
{
|
||||
if (exitui) base.OnClick_Back();
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
base.OnClick_Back();
|
||||
{
|
||||
if (exitui) base.OnClick_Back();
|
||||
}
|
||||
|
||||
foreach (var key in dic_EnterID.Keys.ToList())
|
||||
dic_EnterID[key] = 0;
|
||||
if (PCAwakenUI.isIns) PCAwakenUI.Ins.Get_CS_AwakenData().Init();
|
||||
}
|
||||
|
||||
public override void OnClick_Back()
|
||||
{
|
||||
Check_ServerSave(true);
|
||||
}
|
||||
}
|
||||
|
|
@ -53,7 +53,7 @@ public class ButtonPress : UnityEngine.UI.Button
|
|||
|
||||
private void Update()
|
||||
{
|
||||
if (!_pressed)
|
||||
if (!_pressed || !interactable)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -65,4 +65,12 @@ public class ButtonPress : UnityEngine.UI.Button
|
|||
onClick.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 외부에서 강제로 눌림 상태를 변경할 수 있도록 함
|
||||
/// </summary>
|
||||
public void ControlPress(bool active)
|
||||
{
|
||||
interactable = active;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue