Save_PC_LimitPreset
This commit is contained in:
parent
3727109e07
commit
bc45da16de
|
|
@ -1017,6 +1017,18 @@ handlers.Save_PC_LimitSlotLock = function(args)
|
||||||
else
|
else
|
||||||
return Get_Return(1);
|
return Get_Return(1);
|
||||||
}
|
}
|
||||||
|
handlers.Save_PC_LimitPreset = 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);
|
||||||
|
urod.Equip.LimitPreset = args.Preset;
|
||||||
|
|
||||||
|
Set_JsonUserData(urod);
|
||||||
|
return Get_Return(0);
|
||||||
|
}
|
||||||
/////////////////////////////////// 서버 처리
|
/////////////////////////////////// 서버 처리
|
||||||
|
|
||||||
handlers.Write_UnityInApp = function(args)
|
handlers.Write_UnityInApp = function(args)
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1261,6 +1261,41 @@ public class ServerInfo : MyCoroutine
|
||||||
Set_Coroutine(() => { Save_PC_LimitSlotLock(preset, slot, _act); }, 2f);
|
Set_Coroutine(() => { Save_PC_LimitSlotLock(preset, slot, _act); }, 2f);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
public void Save_PC_LimitPreset(int preset, Action _act)
|
||||||
|
{
|
||||||
|
NetWait.Ins.Set(true);
|
||||||
|
PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest
|
||||||
|
{
|
||||||
|
FunctionName = MethodBase.GetCurrentMethod().Name,
|
||||||
|
GeneratePlayStreamEvent = true,
|
||||||
|
FunctionParameter = new
|
||||||
|
{
|
||||||
|
Token = m_LoginInfo.EntityToken.EntityToken,
|
||||||
|
Preset = preset,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
result =>
|
||||||
|
{
|
||||||
|
if (result.Error == null)
|
||||||
|
{
|
||||||
|
NetWait.Ins.Set(false);
|
||||||
|
var str_result = result.FunctionResult.ToString();
|
||||||
|
var error = MyErrorCheck(str_result);
|
||||||
|
// (0 성공, 나머지는 잘못된 요청)
|
||||||
|
switch (error)
|
||||||
|
{
|
||||||
|
case 0: _act?.Invoke(); break;
|
||||||
|
default: ToastUI.Ins.Set(999900002); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Set_Coroutine(() => { Save_PC_LimitPreset(preset, _act); }, 2f);
|
||||||
|
},
|
||||||
|
fail =>
|
||||||
|
{
|
||||||
|
Set_Coroutine(() => { Save_PC_LimitPreset(preset, _act); }, 2f);
|
||||||
|
});
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 우편
|
#region 우편
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ public class PCLimitUI_Right : uScrollViewMgr
|
||||||
m_Tab.Set_Index(ServerInfo.Ins.m_ServerData.Equip.LimitPreset - 1);
|
m_Tab.Set_Index(ServerInfo.Ins.m_ServerData.Equip.LimitPreset - 1);
|
||||||
for (int i = 0; i < list_TabData.Count; i++)
|
for (int i = 0; i < list_TabData.Count; i++)
|
||||||
{
|
{
|
||||||
list_TabData[i].onClick = OnClick_Preset;
|
list_TabData[i].onClick = OnClick_Preset_byTouch;
|
||||||
}
|
}
|
||||||
m_Tab.Set(list_TabData);
|
m_Tab.Set(list_TabData);
|
||||||
OnClick_Preset();
|
OnClick_Preset();
|
||||||
|
|
@ -94,6 +94,10 @@ public class PCLimitUI_Right : uScrollViewMgr
|
||||||
sdata.Equip.LimitPreset.RandomizeCryptoKey();
|
sdata.Equip.LimitPreset.RandomizeCryptoKey();
|
||||||
Set_UI();
|
Set_UI();
|
||||||
}
|
}
|
||||||
|
public void OnClick_Preset_byTouch()
|
||||||
|
{
|
||||||
|
ServerInfo.Ins.Save_PC_LimitPreset(m_Tab.Get_Index() + 1, OnClick_Preset);
|
||||||
|
}
|
||||||
|
|
||||||
public void OnClick_ProtectGrade(int grade)
|
public void OnClick_ProtectGrade(int grade)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue