Save_MimicResult
This commit is contained in:
parent
45193e8c1f
commit
cb58259b1f
|
|
@ -2491,6 +2491,32 @@ handlers.Save_Buff = function(args)
|
|||
return Get_Return(1);
|
||||
}
|
||||
|
||||
handlers.Save_MimicResult = 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();
|
||||
|
||||
if (Use_Item(table, urod, 501, 1))
|
||||
{
|
||||
if (args.Win)
|
||||
{
|
||||
var key = "d1_Mimic";
|
||||
if (!urod.Dungeon[key]) urod.Dungeon[key] = [0, 0, 0, 0];
|
||||
if (urod.Dungeon[key][0] < args.Lv) ++urod.Dungeon[key][0];
|
||||
|
||||
Add_MissionCount(table, urod, "CONTENTS_CLEAR", 0, 1);
|
||||
}
|
||||
|
||||
Set_JsonUserData(urod);
|
||||
return Get_Return(0);
|
||||
}
|
||||
return Get_Return(1);
|
||||
}
|
||||
|
||||
handlers.Save_Farm_PlantSeed = function(args)
|
||||
{
|
||||
var readonlydata = Get_UserReadOnlyData();
|
||||
|
|
|
|||
|
|
@ -2995,6 +2995,8 @@ MonoBehaviour:
|
|||
rewards:
|
||||
- {fileID: 7024087647596221198}
|
||||
- {fileID: 7362169575779750531}
|
||||
gos:
|
||||
- {fileID: 1770417477863571995}
|
||||
--- !u!1 &200677803513942660
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -47736,6 +47738,8 @@ MonoBehaviour:
|
|||
rewards:
|
||||
- {fileID: 5213299552800960147}
|
||||
- {fileID: 77060798165260696}
|
||||
gos:
|
||||
- {fileID: 4305155062427577732}
|
||||
--- !u!1 &2965695399429559379
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -90544,18 +90548,6 @@ MonoBehaviour:
|
|||
- {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
|
||||
|
|
@ -90617,6 +90609,8 @@ MonoBehaviour:
|
|||
rewards:
|
||||
- {fileID: 7187129263643668544}
|
||||
- {fileID: 3083986327533867426}
|
||||
gos:
|
||||
- {fileID: 7123303448781393375}
|
||||
--- !u!1 &6022597492038052321
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -138532,6 +138526,8 @@ MonoBehaviour:
|
|||
rewards:
|
||||
- {fileID: 1167816355294343170}
|
||||
- {fileID: 5365486467107252809}
|
||||
gos:
|
||||
- {fileID: 217621272122471758}
|
||||
--- !u!1 &9196446261128169687
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -859,6 +859,42 @@ public class ServerInfo : MyCoroutine
|
|||
Set_Coroutine(() => { Save_StageResult(_act); }, 2f);
|
||||
});
|
||||
}
|
||||
public void Save_MimicResult(bool? win, int lv, Action<int> _act)
|
||||
{
|
||||
NetWait.Ins.Set(true);
|
||||
PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest
|
||||
{
|
||||
FunctionName = MethodBase.GetCurrentMethod().Name,
|
||||
GeneratePlayStreamEvent = true,
|
||||
FunctionParameter = new
|
||||
{
|
||||
Token = m_LoginInfo.EntityToken.EntityToken,
|
||||
Win = win,
|
||||
Lv = lv,
|
||||
}
|
||||
},
|
||||
result =>
|
||||
{
|
||||
if (result.Error == null)
|
||||
{
|
||||
NetWait.Ins.Set(false);
|
||||
var str_result = result.FunctionResult.ToString();
|
||||
var error = MyErrorCheck(str_result);
|
||||
switch (error)
|
||||
{
|
||||
case 1: ToastUI.Ins.Set(999900045); break;
|
||||
}
|
||||
_act?.Invoke(error);
|
||||
}
|
||||
else
|
||||
Set_Coroutine(() => { Save_MimicResult(win, lv, _act); }, 2f);
|
||||
},
|
||||
fail =>
|
||||
{
|
||||
Set_Coroutine(() => { Save_MimicResult(win, lv, _act); }, 2f);
|
||||
});
|
||||
}
|
||||
|
||||
public void Save_PC_MenuBack(int costumeid, int workerid, int jobid, CS_AwakenData awakenData,
|
||||
LimitSlotChangeData limitslotData, Action<SC_PCMenuBackResult> _act)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class DungeonResultBase : BackKeyAdd
|
||||
{
|
||||
public TextMeshProUGUI[] texts; // 0 성공 or 실패, 1 난이도, 2 처치 수
|
||||
public ObtainItemCard[] rewards;
|
||||
public GameObject[] gos; // 0 확인 버튼
|
||||
|
||||
protected List<ItemSimpleData> list_reward = new List<ItemSimpleData>
|
||||
{ new ItemSimpleData{ itemid = 1 }, new ItemSimpleData{ itemid = 2 } };
|
||||
|
|
@ -12,11 +14,15 @@ public class DungeonResultBase : BackKeyAdd
|
|||
public virtual void Set(bool? win)
|
||||
{
|
||||
base.Set();
|
||||
gos[0].SetActive(false);
|
||||
}
|
||||
|
||||
public override void OnClick_Back()
|
||||
{
|
||||
base.OnClick_Back();
|
||||
InGameInfo.Ins.Return_To_Lobby();
|
||||
if (gos[0].activeInHierarchy)
|
||||
{
|
||||
base.OnClick_Back();
|
||||
InGameInfo.Ins.Return_To_Lobby();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -24,15 +24,20 @@ public class DungeonResult_Mimic : DungeonResultBase
|
|||
rewards[0].Set(list_reward[0]);
|
||||
rewards[1].Set(list_reward[1]);
|
||||
|
||||
if (win.Value)
|
||||
ServerInfo.Ins.Save_MimicResult(win, dungeonData.n_MapLv, error =>
|
||||
{
|
||||
// TODO 정인호 : 승리 시 보상 지급
|
||||
if (sdata.Get_DungeonLv(eDungeon.d1_Mimic) < dungeonData.n_MapLv)
|
||||
sdata.Add_DungeonLv(eDungeon.d1_Mimic);
|
||||
if (error == 0)
|
||||
{
|
||||
if (win.Value)
|
||||
{
|
||||
if (sdata.Get_DungeonLv(eDungeon.d1_Mimic) < dungeonData.n_MapLv)
|
||||
sdata.Add_DungeonLv(eDungeon.d1_Mimic);
|
||||
|
||||
sdata.Add_MissionCount(ePurpose.CONTENTS_CLEAR, 1);
|
||||
}
|
||||
sdata.Add_MissionCount(ePurpose.CONTENTS_CLEAR, 1);
|
||||
}
|
||||
}
|
||||
|
||||
ServerInfo.Ins.Write(null);
|
||||
gos[0].SetActive(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue