From 4e8ebd95a3ca89fba46d341a8b52dcb2f2f57504 Mon Sep 17 00:00:00 2001 From: Ino Date: Thu, 31 Jul 2025 16:28:44 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=A0=EC=A7=84=20=EC=A1=B0=EA=B1=B4=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EB=93=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Editor/Resources/.CloudScript.js | 30 ++++++++++++------- Assets/Script/Server/ServerClass.cs | 3 ++ Assets/Script/UI/PC/Limit/PCLimitUI_Right.cs | 30 ++++++++++++++++++- Assets/Script/UI/PC/PCUI.cs | 8 +++++ 4 files changed, 59 insertions(+), 12 deletions(-) diff --git a/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js b/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js index 319a76d77..3bed6a44e 100644 --- a/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js +++ b/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js @@ -872,16 +872,20 @@ handlers.Save_PC_MenuBack = function(args) urod.Equip.LimitPreset = args.Preset; // 초월 옵션 - log.info(args.LimitSlotData.Preset); - log.info(urod.LimitBreakOption.Preset); - urod.LimitBreakOption.Preset = args.LimitSlotData.Preset; - log.info(urod.LimitBreakOption.Preset); - Set_LimitSlotOption(table, urod, args); + var rtnLimitSlotOption = Set_LimitSlotOption(table, urod, args); + var rtnLimitPreset = null; + if (CheckNullOrEmpty(rtnLimitSlotOption)) + urod.LimitBreakOption.Preset = args.LimitSlotData.Preset; + else + rtnLimitPreset = urod.LimitBreakOption.Preset; Set_JsonUserData(urod); return Get_Return(0, { awakekMats : rtn_awakenMatIds, - awaken : urod.Awaken + awaken : urod.Awaken, + limitslotoption : rtnLimitSlotOption, + limitpreset : rtnLimitPreset, + limitoptionAmount : Get_ItemAmount(urod, Get_GlobalValue_nValue("n_BreakingLimitSlotMaterialID")) }); } function Get_PCAwakenMatKey(stat) @@ -1193,12 +1197,16 @@ handlers.Save_PC_LimitLvUp = function(args) } function Set_LimitSlotOption(table, urod, args, makeoption = false) { - Use_Item(table, urod, Get_GlobalValue_nValue("n_BreakingLimitSlotMaterialID"), args.LimitSlotData.Price); - urod.LimitSlot = args.LimitSlotData.LimitSlot; - if (makeoption) Make_LimitBreakOption(urod); + if (Use_Item(table, urod, Get_GlobalValue_nValue("n_BreakingLimitSlotMaterialID"), args.LimitSlotData.Price)) + { + urod.LimitSlot = args.LimitSlotData.LimitSlot; + if (makeoption) Make_LimitBreakOption(urod); - Add_MissionCount(table, urod, "HERO_OPTION_CHANGE", 0, args.LimitSlotData.Count, false); - Add_MissionCount(table, urod, "HERO_OPTION_CHANGE_ACC", 0, args.LimitSlotData.Count, false); + Add_MissionCount(table, urod, "HERO_OPTION_CHANGE", 0, args.LimitSlotData.Count, false); + Add_MissionCount(table, urod, "HERO_OPTION_CHANGE_ACC", 0, args.LimitSlotData.Count, false); + return null; + } + return urod.LimitSlot; } handlers.Save_PC_LimitSlotOption = function(args) { diff --git a/Assets/Script/Server/ServerClass.cs b/Assets/Script/Server/ServerClass.cs index b22294a06..9cf873ade 100644 --- a/Assets/Script/Server/ServerClass.cs +++ b/Assets/Script/Server/ServerClass.cs @@ -3121,6 +3121,9 @@ public class SC_PCMenuBackResult { public List awakekMats; public Dictionary awaken; + public Dictionary> limitslotoption; + public List limitpreset; + public int limitoptionAmount; } public class SC_PCStatInit { diff --git a/Assets/Script/UI/PC/Limit/PCLimitUI_Right.cs b/Assets/Script/UI/PC/Limit/PCLimitUI_Right.cs index 30b3924d5..694fe5fbf 100644 --- a/Assets/Script/UI/PC/Limit/PCLimitUI_Right.cs +++ b/Assets/Script/UI/PC/Limit/PCLimitUI_Right.cs @@ -16,6 +16,7 @@ public class LimitSlotChangeData { TotalPrice = 0; TotalPrice.RandomizeCryptoKey(); MissionCount = 0; MissionCount.RandomizeCryptoKey(); + Copy_ServerLimitSlot(); } void Copy_ServerLimitSlot() { @@ -38,7 +39,34 @@ public class LimitSlotChangeData return this; } - public bool IsChangeLimitSlot() { return TotalPrice > 0; } + public bool IsChangeLimitSlot() + { + if (TotalPrice > 0) return true; + + var currentSlotData = ServerInfo.Ins.m_ServerData.LimitSlot; + foreach (var pair in currentSlotData) + { + if (!LimitSlot.TryGetValue(pair.Key, out var beforeList)) + return true; + + var currentList = pair.Value; + + if (beforeList.Count != currentList.Count) + return true; + + for (int i = 0; i < currentList.Count; i++) + { + var before = beforeList[i]; + var current = currentList[i]; + + if (before.ID != current.ID || before.Lv != current.Lv || before.Lock != current.Lock) + return true; + } + } + + return false; + } + public void Add_TotalPrice(int price) { TotalPrice += price; TotalPrice.RandomizeCryptoKey(); } public void Add_MissionCount() { ++MissionCount; MissionCount.RandomizeCryptoKey(); } } diff --git a/Assets/Script/UI/PC/PCUI.cs b/Assets/Script/UI/PC/PCUI.cs index 629dbdee5..2f974da2f 100644 --- a/Assets/Script/UI/PC/PCUI.cs +++ b/Assets/Script/UI/PC/PCUI.cs @@ -66,6 +66,14 @@ public class PCUI : BotMenuBase sdata.Set_Item(result.awakekMats[i].itemid, result.awakekMats[i].amount); foreach (var item in result.awaken) sdata.Awaken[item.Key] = item.Value.Get(); + if (result.limitslotoption != null) + { + + } + if (result.limitpreset != null) + { + } + if (changeCostume || changeworker) { ActorInfo.Ins.Destroy_All();