diff --git a/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js b/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js index 215a50b74..48330f4eb 100644 --- a/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js +++ b/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js @@ -2508,7 +2508,7 @@ handlers.Save_MimicResult = function(args) 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); + Add_MissionCount(table, urod, "CONTENTS_CLEAR", 1, 1); } Set_JsonUserData(urod); @@ -2516,6 +2516,28 @@ handlers.Save_MimicResult = function(args) } return Get_Return(1); } +handlers.Save_MazeResult = 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, 502, 1)) + { + 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); + + Set_JsonUserData(urod); + return Get_Return(0); + } + return Get_Return(1); +} handlers.Save_Farm_PlantSeed = function(args) { diff --git a/Assets/Script/Character/Actor.cs b/Assets/Script/Character/Actor.cs index d097e6954..6f627a826 100644 --- a/Assets/Script/Character/Actor.cs +++ b/Assets/Script/Character/Actor.cs @@ -329,17 +329,20 @@ public class Actor : MyCoroutine public virtual void Stop(bool _stop) { - if (IsStop && !_stop) + if (gameObject.activeInHierarchy) { - Change_MobStatus(eMobStatus.PatrolWait); - Check_Battle(); - } + if (IsStop && !_stop) + { + Change_MobStatus(eMobStatus.PatrolWait); + Check_Battle(); + } - IsStop = _stop; - if (IsStop) - { - if (m_NavMeshAgent && m_NavMeshAgent.isOnNavMesh) m_NavMeshAgent.ResetPath(); - Play_Idle(); + IsStop = _stop; + if (IsStop) + { + if (m_NavMeshAgent && m_NavMeshAgent.isOnNavMesh) m_NavMeshAgent.ResetPath(); + Play_Idle(); + } } } diff --git a/Assets/Script/Character/Mob/BossMobActor.cs b/Assets/Script/Character/Mob/BossMobActor.cs index e8793d99a..78424ea95 100644 --- a/Assets/Script/Character/Mob/BossMobActor.cs +++ b/Assets/Script/Character/Mob/BossMobActor.cs @@ -85,7 +85,6 @@ public class BossMobActor : MobActor protected override void Set_Die() { - base.Set_Die(); Init(true, true); if (n_Reincarnation <= 0) { @@ -93,6 +92,7 @@ public class BossMobActor : MobActor foreach (var item in dic_indicator) // 모든 인디케이터 끄기 item.Value.SetActive(false); } + base.Set_Die(); } protected override void On_NavMeshAgent() diff --git a/Assets/Script/Character/Projectile/Projectile/ProjectileWaveControl.cs b/Assets/Script/Character/Projectile/Projectile/ProjectileWaveControl.cs index 7c3bd37ae..ba857d1ab 100644 --- a/Assets/Script/Character/Projectile/Projectile/ProjectileWaveControl.cs +++ b/Assets/Script/Character/Projectile/Projectile/ProjectileWaveControl.cs @@ -7,8 +7,12 @@ public class ProjectileWaveControl : MonoBehaviour private void OnEnable() { - Debug.Log("웨이브 시작 1"); + //Debug.Log("웨이브 시작 1"); DSUtil.InActivateGameObjects(gos_wave, 0); - CoroutineMgr.Ins.Set_Coroutine(() => { Debug.Log("웨이브 시작 2"); gos_wave[1].SetActive(true); }, nextWaveDelayTime); + CoroutineMgr.Ins.Set_Coroutine(() => + { + //Debug.Log("웨이브 시작 2"); + gos_wave[1].SetActive(true); + }, nextWaveDelayTime); } } \ No newline at end of file diff --git a/Assets/Script/Info/DungeonInfo.cs b/Assets/Script/Info/DungeonInfo.cs index 826e0f525..2df5edf57 100644 --- a/Assets/Script/Info/DungeonInfo.cs +++ b/Assets/Script/Info/DungeonInfo.cs @@ -111,7 +111,7 @@ public class DungeonInfo : MonoBehaviourSingletonTemplate void Set_MobDie(int mobid) { ++m_DieCount; - act_MobDieCount?.Invoke(m_DieCount); + act_MobDieCount?.Invoke(mobid); if (m_DieCount == m_MaxDieMobCount) { bTotalTimeUpdate = false; diff --git a/Assets/Script/Server/ServerInfo.cs b/Assets/Script/Server/ServerInfo.cs index f8654ac10..3a0869d80 100644 --- a/Assets/Script/Server/ServerInfo.cs +++ b/Assets/Script/Server/ServerInfo.cs @@ -894,6 +894,40 @@ public class ServerInfo : MyCoroutine Set_Coroutine(() => { Save_MimicResult(win, lv, _act); }, 2f); }); } + public void Save_MazeResult(int nextfloor, Action _act) + { + NetWait.Ins.Set(true); + PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest + { + FunctionName = MethodBase.GetCurrentMethod().Name, + GeneratePlayStreamEvent = true, + FunctionParameter = new + { + Token = m_LoginInfo.EntityToken.EntityToken, + NextFloor = nextfloor, + } + }, + 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_MazeResult(nextfloor, _act); }, 2f); + }, + fail => + { + Set_Coroutine(() => { Save_MazeResult(nextfloor, _act); }, 2f); + }); + } public void Save_PC_MenuBack(int costumeid, int workerid, int jobid, CS_AwakenData awakenData, LimitSlotChangeData limitslotData, Action _act) diff --git a/Assets/Script/UI/Ingame/Dungeon/DungeonResult_Maze.cs b/Assets/Script/UI/Ingame/Dungeon/DungeonResult_Maze.cs index ca0009418..07dd9060c 100644 --- a/Assets/Script/UI/Ingame/Dungeon/DungeonResult_Maze.cs +++ b/Assets/Script/UI/Ingame/Dungeon/DungeonResult_Maze.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using TMPro; public class DungeonResult_Maze : DungeonResultBase { @@ -15,17 +14,20 @@ public class DungeonResult_Maze : DungeonResultBase rewards[0].Set(list_reward[0]); rewards[1].Set(list_reward[1]); - if (nextFloor > curFloor) + ServerInfo.Ins.Save_MazeResult(nextFloor, error => { - sdata.Set_DungeonLv(eDungeon.d2_Maze, nextFloor); + if (error == 0 && nextFloor > curFloor) + { + sdata.Set_DungeonLv(eDungeon.d2_Maze, nextFloor); + sdata.Add_MissionCount(ePurpose.CONTENTS_CLEAR, 2); - var maxTime = MyValue.MyChoiceMapData.Get_DungeonMapData_orNull().f_Time; - var floorTime = DungeonInfo.Ins.Get_Time(nextFloor); - ServerInfo.Ins.Save_Rank("Rank_Maze", - new List { nextFloor.ToString(), ((int)(maxTime - floorTime)).ToString(), "0" }); - } + var maxTime = MyValue.MyChoiceMapData.Get_DungeonMapData_orNull().f_Time; + var floorTime = DungeonInfo.Ins.Get_Time(nextFloor); + ServerInfo.Ins.Save_Rank("Rank_Maze", + new List { nextFloor.ToString(), ((int)(maxTime - floorTime)).ToString(), "0" }); + } - sdata.Add_MissionCount(ePurpose.CONTENTS_CLEAR, 2); - ServerInfo.Ins.Write(null, false); + gos[0].SetActive(true); + }); } } \ No newline at end of file diff --git a/Assets/Script/UI/Ingame/Dungeon/Ingame_Maze.cs b/Assets/Script/UI/Ingame/Dungeon/Ingame_Maze.cs index 7186e0c9d..596d1c774 100644 --- a/Assets/Script/UI/Ingame/Dungeon/Ingame_Maze.cs +++ b/Assets/Script/UI/Ingame/Dungeon/Ingame_Maze.cs @@ -1,4 +1,5 @@ using TMPro; +using UnityEngine; public class Ingame_Maze : Ingame_DungeonBase { @@ -12,6 +13,8 @@ public class Ingame_Maze : Ingame_DungeonBase public override void Add_MobCount(int mobid) { + //var mobdata = table_monsterlist.Ins.Get_Data_orNull(mobid); + //Debug.Log(mobdata.e_MonsterType + " : " + mobdata.Get_Name()); ++MobCount; texts[0].text = (MaxMobCount - MobCount).ToString(); } diff --git a/Assets/Script/UI/Ingame/MonsterSimpleInfo.cs b/Assets/Script/UI/Ingame/MonsterSimpleInfo.cs index 33c68f4da..023c6e8b7 100644 --- a/Assets/Script/UI/Ingame/MonsterSimpleInfo.cs +++ b/Assets/Script/UI/Ingame/MonsterSimpleInfo.cs @@ -15,7 +15,17 @@ public class MonsterSimpleInfo : MonoBehaviourSingletonTemplate