Save_NightmareResult, Save_DungeonStart
This commit is contained in:
parent
8a71196d17
commit
0c4001dc0e
|
|
@ -618,6 +618,9 @@ handlers.Save_Init = function(args)
|
|||
|
||||
urod.Common[5] = month;
|
||||
Init_Shop(urod, 3);
|
||||
|
||||
var key = "d2_Maze";
|
||||
if (urod.Dungeon[key]) urod.Dungeon[key][0] = 0;
|
||||
}
|
||||
|
||||
if (isInitDaily || isInitWeek || isInitMonth)
|
||||
|
|
@ -2516,6 +2519,21 @@ handlers.Save_MimicResult = function(args)
|
|||
}
|
||||
return Get_Return(1);
|
||||
}
|
||||
handlers.Save_DungeonStart = 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);
|
||||
|
||||
if (Use_Item(Get_MissionTable(), urod, args.TicketID , 1))
|
||||
{
|
||||
Set_JsonUserData(urod);
|
||||
return Get_Return(0);
|
||||
}
|
||||
return Get_Return(1);
|
||||
}
|
||||
handlers.Save_MazeResult = function(args)
|
||||
{
|
||||
var readonlydata = Get_UserReadOnlyData();
|
||||
|
|
@ -2529,15 +2547,33 @@ handlers.Save_MazeResult = function(args)
|
|||
{
|
||||
var key = "d2_Maze";
|
||||
if (!urod.Dungeon[key]) urod.Dungeon[key] = [0, 0, 0, 0];
|
||||
if (urod.Dungeon[key][0] < args.NextFloor) urod.Dungeon[key][0] = args.NextFloor;
|
||||
|
||||
Add_MissionCount(table, urod, "CONTENTS_CLEAR", 2, 1);
|
||||
if (urod.Dungeon[key][0] < args.NextFloor)
|
||||
{
|
||||
Add_MissionCount(table, urod, "CONTENTS_CLEAR", 2, args.NextFloor - urod.Dungeon[key][0]);
|
||||
urod.Dungeon[key][0] = args.NextFloor;
|
||||
}
|
||||
|
||||
Set_JsonUserData(urod);
|
||||
return Get_Return(0);
|
||||
}
|
||||
return Get_Return(1);
|
||||
}
|
||||
handlers.Save_NightmareResult = 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();
|
||||
|
||||
//var key = "d3_Nightmare";
|
||||
//if (!urod.Dungeon[key]) urod.Dungeon[key] = [0, 0, 0, 0];
|
||||
Add_MissionCount(table, urod, "CONTENTS_CLEAR", 3, 1);
|
||||
|
||||
Set_JsonUserData(urod);
|
||||
return Get_Return(0);
|
||||
}
|
||||
|
||||
handlers.Save_Farm_PlantSeed = function(args)
|
||||
{
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -105838,7 +105838,7 @@ MonoBehaviour:
|
|||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 7547394924440565505}
|
||||
- m_Target: {fileID: 4637389165372554652}
|
||||
m_TargetAssemblyTypeName: DungeonResultBase, Assembly-CSharp
|
||||
m_MethodName: OnClick_Back
|
||||
m_Mode: 1
|
||||
|
|
|
|||
|
|
@ -543,29 +543,20 @@ public class Actor : MyCoroutine
|
|||
if (IsDead()) return;
|
||||
if (NoDmgTime > 0f) _dinfo.Damage = 0d;
|
||||
|
||||
if (MyValue.MyChoiceMapData.Get_MapData().e_Dungeon == eDungeon.d3_Nightmare && IsSubRole(eSubRol.Boss))
|
||||
{
|
||||
var diff = MyValue.MyChoiceMapData.n_Difficult;
|
||||
var addmul = diff == 1 ? 1 : diff == 2 ? 1.5d : 2.5d;
|
||||
DungeonInfo.Ins.Add_TotalDmg(_dinfo.Damage * addmul);
|
||||
if (dic_ccData[eCC.Barrier].CCDmg > 0)
|
||||
{ // 배리어가 있으면 배리어부터 계산
|
||||
_dinfo.TextColor = "Barrier";
|
||||
dic_ccData[eCC.Barrier].CCDmg -= _dinfo.Damage;
|
||||
if (dic_ccData[eCC.Barrier].CCDmg <= 0)
|
||||
{ // 배리어를 넘어가는 데미지 계산
|
||||
var dmg = Math.Abs(dic_ccData[eCC.Barrier].CCDmg);
|
||||
if (dmg > 0) m_Stat.Set_Stat(false, eStat.HP, dmg);
|
||||
dic_ccData[eCC.Barrier].CCDmg = 0;
|
||||
dic_CCEffect[eCC.Barrier].Off_Imm();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dic_ccData[eCC.Barrier].CCDmg > 0)
|
||||
{ // 배리어가 있으면 배리어부터 계산
|
||||
_dinfo.TextColor = "Barrier";
|
||||
dic_ccData[eCC.Barrier].CCDmg -= _dinfo.Damage;
|
||||
if (dic_ccData[eCC.Barrier].CCDmg <= 0)
|
||||
{ // 배리어를 넘어가는 데미지 계산
|
||||
var dmg = Math.Abs(dic_ccData[eCC.Barrier].CCDmg);
|
||||
if (dmg > 0) m_Stat.Set_Stat(false, eStat.HP, dmg);
|
||||
dic_ccData[eCC.Barrier].CCDmg = 0;
|
||||
dic_CCEffect[eCC.Barrier].Off_Imm();
|
||||
}
|
||||
}
|
||||
else
|
||||
m_Stat.Set_Stat(false, eStat.HP, _dinfo.Damage);
|
||||
}
|
||||
m_Stat.Set_Stat(false, eStat.HP, _dinfo.Damage);
|
||||
|
||||
_dinfo.act_returnLastDmg?.Invoke(_dinfo.Damage);
|
||||
_dinfo.act_CriAfterHit?.Invoke(_dinfo.Critical);
|
||||
|
|
@ -573,9 +564,17 @@ public class Actor : MyCoroutine
|
|||
_dinfo.Beater?.Add_MyRealDmg(_dinfo.Damage);
|
||||
BossRaidCard_HP();
|
||||
|
||||
bool nightmare = MyValue.MyChoiceMapData.Get_MapData().e_Dungeon == eDungeon.d3_Nightmare && IsSubRole(eSubRol.Boss);
|
||||
if (nightmare)
|
||||
{
|
||||
var diff = MyValue.MyChoiceMapData.n_Difficult;
|
||||
var addmul = diff == 1 ? 1 : diff == 2 ? 1.5d : 2.5d;
|
||||
DungeonInfo.Ins.Add_TotalDmg(_dinfo.Damage * addmul);
|
||||
}
|
||||
|
||||
var pd = _dinfo.Beater_pd;
|
||||
bool ispd = !DSUtil.CheckNull(pd);
|
||||
if (m_Stat.Get_Stat(eStat.HP) <= 0d)
|
||||
if (!nightmare && m_Stat.Get_Stat(eStat.HP) <= 0d)
|
||||
{
|
||||
Check_Drain_byKill(_dinfo);
|
||||
DeadStatus = _dinfo.IsDeadByThisDamage = true;
|
||||
|
|
|
|||
|
|
@ -894,6 +894,40 @@ public class ServerInfo : MyCoroutine
|
|||
Set_Coroutine(() => { Save_MimicResult(win, lv, _act); }, 2f);
|
||||
});
|
||||
}
|
||||
public void Save_DungeonStart(int ticketid, Action _act)
|
||||
{
|
||||
NetWait.Ins.Set(true);
|
||||
PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest
|
||||
{
|
||||
FunctionName = MethodBase.GetCurrentMethod().Name,
|
||||
GeneratePlayStreamEvent = true,
|
||||
FunctionParameter = new
|
||||
{
|
||||
Token = m_LoginInfo.EntityToken.EntityToken,
|
||||
TicketID = ticketid,
|
||||
}
|
||||
},
|
||||
result =>
|
||||
{
|
||||
if (result.Error == null)
|
||||
{
|
||||
NetWait.Ins.Set(false);
|
||||
var str_result = result.FunctionResult.ToString();
|
||||
var error = MyErrorCheck(str_result);
|
||||
switch (error)
|
||||
{
|
||||
case 0: _act?.Invoke(); break;
|
||||
case 1: ToastUI.Ins.Set(999900045); break;
|
||||
}
|
||||
}
|
||||
else
|
||||
Set_Coroutine(() => { Save_DungeonStart(ticketid, _act); }, 2f);
|
||||
},
|
||||
fail =>
|
||||
{
|
||||
Set_Coroutine(() => { Save_DungeonStart(ticketid, _act); }, 2f);
|
||||
});
|
||||
}
|
||||
public void Save_MazeResult(int nextfloor, Action<int> _act)
|
||||
{
|
||||
NetWait.Ins.Set(true);
|
||||
|
|
@ -928,6 +962,36 @@ public class ServerInfo : MyCoroutine
|
|||
Set_Coroutine(() => { Save_MazeResult(nextfloor, _act); }, 2f);
|
||||
});
|
||||
}
|
||||
public void Save_NightmareResult(double dmg, Action _act)
|
||||
{
|
||||
NetWait.Ins.Set(true);
|
||||
PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest
|
||||
{
|
||||
FunctionName = MethodBase.GetCurrentMethod().Name,
|
||||
GeneratePlayStreamEvent = true,
|
||||
FunctionParameter = new
|
||||
{
|
||||
Token = m_LoginInfo.EntityToken.EntityToken,
|
||||
Dmg = dmg,
|
||||
}
|
||||
},
|
||||
result =>
|
||||
{
|
||||
if (result.Error == null)
|
||||
{
|
||||
NetWait.Ins.Set(false);
|
||||
var str_result = result.FunctionResult.ToString();
|
||||
var error = MyErrorCheck(str_result);
|
||||
_act?.Invoke();
|
||||
}
|
||||
else
|
||||
Set_Coroutine(() => { Save_NightmareResult(dmg, _act); }, 2f);
|
||||
},
|
||||
fail =>
|
||||
{
|
||||
Set_Coroutine(() => { Save_NightmareResult(dmg, _act); }, 2f);
|
||||
});
|
||||
}
|
||||
|
||||
public void Save_PC_MenuBack(int costumeid, int workerid, int jobid, CS_AwakenData awakenData,
|
||||
LimitSlotChangeData limitslotData, Action<SC_PCMenuBackResult> _act)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class DungeonResult_Maze : DungeonResultBase
|
|||
if (error == 0 && nextFloor > curFloor)
|
||||
{
|
||||
sdata.Set_DungeonLv(eDungeon.d2_Maze, nextFloor);
|
||||
sdata.Add_MissionCount(ePurpose.CONTENTS_CLEAR, 2);
|
||||
sdata.Add_MissionCount(ePurpose.CONTENTS_CLEAR, 2, nextFloor - curFloor);
|
||||
|
||||
var maxTime = MyValue.MyChoiceMapData.Get_DungeonMapData_orNull().f_Time;
|
||||
var floorTime = DungeonInfo.Ins.Get_Time(nextFloor);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@ public class DungeonResult_Nightmare : DungeonResultBase
|
|||
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
sdata.Add_MissionCount(ePurpose.CONTENTS_CLEAR, 3);
|
||||
ServerInfo.Ins.Write(null, false);
|
||||
|
||||
ServerInfo.Ins.Save_NightmareResult(CurDmg, () =>
|
||||
{
|
||||
gos[0].SetActive(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -47,12 +47,6 @@ public class MapChoiceUI_DungeonBase : MonoBehaviour
|
|||
InGameInfo.Ins.Load_Map(SelectMapID);
|
||||
}
|
||||
|
||||
protected void Use_Ticket()
|
||||
{
|
||||
ServerInfo.Ins.m_ServerData.Use_Item(m_mapData.n_TicketID, 1);
|
||||
ServerInfo.Ins.Write(null, false);
|
||||
}
|
||||
|
||||
public virtual void OnClick_Ranking()
|
||||
{
|
||||
var mapData = table_battlemapconfig.Ins.Get_Data(SelectMapID);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ public class MapChoiceUI_Dungeon_Maze : MapChoiceUI_DungeonBase
|
|||
base.Set();
|
||||
|
||||
MyValue.MyChoiceMapData.n_Difficult = 1;
|
||||
SelectLv = Mathf.Max(1, SelectLv - 1);
|
||||
texts_maze[0].text = texts_maze[1].text = "";
|
||||
ServerInfo.Ins.Get_MyRank(MyValue.dic_Leaderboard[m_mapData.e_Dungeon],
|
||||
my =>
|
||||
|
|
@ -24,17 +23,21 @@ public class MapChoiceUI_Dungeon_Maze : MapChoiceUI_DungeonBase
|
|||
texts_maze[0].text = DSUtil.Format(323, my.Rank);
|
||||
//texts_maze[1].text = DSUtil.Format(324, my.Scores[0]);
|
||||
}
|
||||
texts_maze[1].text = DSUtil.Format(324, SelectLv);
|
||||
texts_maze[1].text = DSUtil.Format(324, SelectLv - 1);
|
||||
});
|
||||
}
|
||||
|
||||
public override void OnClick_GoDungeon()
|
||||
{
|
||||
if (ServerInfo.Ins.m_ServerData.Check_ItemAmount(m_mapData.n_TicketID, 1))
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
if (sdata.Check_ItemAmount(m_mapData.n_TicketID, 1))
|
||||
{
|
||||
Use_Ticket();
|
||||
MyValue.MyChoiceMapData.Set_MazeMapIndex();
|
||||
Go_Dungeon();
|
||||
ServerInfo.Ins.Save_DungeonStart(m_mapData.n_TicketID, () =>
|
||||
{
|
||||
sdata.Use_Item(m_mapData.n_TicketID, 1);
|
||||
MyValue.MyChoiceMapData.Set_MazeMapIndex();
|
||||
Go_Dungeon();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -28,10 +28,14 @@ public class MapChoiceUI_Dungeon_Nightmare : MapChoiceUI_DungeonBase
|
|||
|
||||
public override void OnClick_GoDungeon()
|
||||
{
|
||||
if (ServerInfo.Ins.m_ServerData.Check_ItemAmount(m_mapData.n_TicketID, 1))
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
if (sdata.Check_ItemAmount(m_mapData.n_TicketID, 1))
|
||||
{
|
||||
Use_Ticket();
|
||||
Go_Dungeon();
|
||||
ServerInfo.Ins.Save_DungeonStart(m_mapData.n_TicketID, () =>
|
||||
{
|
||||
sdata.Use_Item(m_mapData.n_TicketID, 1);
|
||||
Go_Dungeon();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue