diff --git a/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js b/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js index e42f1fcee..6c279ce3d 100644 --- a/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js +++ b/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js @@ -1130,14 +1130,14 @@ function Make_LimitBreakOption(urod) var lv = urod.PC.LLv; if (lv > 9) lv = 9; var lsmc_data = limitslotmagicrateTable.find(f=>f.n_NeedLimitLv == lv); - var randombaTable = Get_RandomBagTable(); - var enchantgradeTable = Get_EnchantGradeTable(); for (var i = 0; i < 3; ++i) { for (var j = 0; j < 500; ++j) { var grade = Get_RandomGachaGrade(lv); - var optionitemID = Get_RandomItem(lsmc_data.n_DropIndex, grade).itemid; + var rdnItem = Get_RandomItem(lsmc_data.n_DropIndex, grade); + //if (rdnItem == null) log.info(lsmc_data.n_DropIndex + " " + grade); + var optionitemID = rdnItem.itemid; var olv = Get_OptionLv(grade); urod.LimitBreakOption.Option[i + 1].push({ id : optionitemID, lv : olv }); } @@ -1181,6 +1181,17 @@ handlers.Save_PC_LimitLvUp = function(args) else return Get_Return(1); // PC 레벨 부족 } +handlers.Get_PC_LimitSlotOption = 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); + Make_LimitBreakOption(urod); + Set_JsonUserData(urod); + return Get_Return(0, { option : urod.LimitBreakOption }); +} handlers.Save_PC_LimitSlotOptionChange = function(args) { var readonlydata = Get_UserReadOnlyData(); diff --git a/Assets/ResWork/Table/Export/OptionConfig.json b/Assets/ResWork/Table/Export/OptionConfig.json index 9cffed00b..a43afae7a 100644 --- a/Assets/ResWork/Table/Export/OptionConfig.json +++ b/Assets/ResWork/Table/Export/OptionConfig.json @@ -1 +1 @@ -[{"n_OptionID": "330001", "e_OptionType": "KillToMP", "n_DefaultValue": "90", "f_LevelPerValue": "1", "f_BalanceConstant": "0", "f_ExtraValue1": "0.5", "f_ExtraValue2": "1", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330002", "e_OptionType": "KillToHP", "n_DefaultValue": "90", "f_LevelPerValue": "1", "f_BalanceConstant": "0", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330003", "e_OptionType": "Pet_ATK_Multiplier", "n_DefaultValue": "0", "f_LevelPerValue": "20", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "5", "f_ExtraValue2": "0.25", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330004", "e_OptionType": "Pet_HP_Multiplier", "n_DefaultValue": "0", "f_LevelPerValue": "20", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330005", "e_OptionType": "ATK", "n_DefaultValue": "10", "f_LevelPerValue": "20", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330006", "e_OptionType": "DEF", "n_DefaultValue": "10", "f_LevelPerValue": "20", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330007", "e_OptionType": "MaxHP", "n_DefaultValue": "10", "f_LevelPerValue": "20", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330008", "e_OptionType": "MaxMP", "n_DefaultValue": "10", "f_LevelPerValue": "20", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330009", "e_OptionType": "M_DEF", "n_DefaultValue": "10", "f_LevelPerValue": "20", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330101", "e_OptionType": "KillToMP", "n_DefaultValue": "90", "f_LevelPerValue": "2", "f_BalanceConstant": "0", "f_ExtraValue1": "0.5", "f_ExtraValue2": "1", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330102", "e_OptionType": "KillToHP", "n_DefaultValue": "90", "f_LevelPerValue": "2", "f_BalanceConstant": "0", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330103", "e_OptionType": "Pet_ATK_Multiplier", "n_DefaultValue": "0", "f_LevelPerValue": "30", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "5", "f_ExtraValue2": "0.25", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330104", "e_OptionType": "Pet_HP_Multiplier", "n_DefaultValue": "0", "f_LevelPerValue": "30", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330105", "e_OptionType": "ATK", "n_DefaultValue": "10", "f_LevelPerValue": "30", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330106", "e_OptionType": "DEF", "n_DefaultValue": "10", "f_LevelPerValue": "30", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330107", "e_OptionType": "MaxHP", "n_DefaultValue": "10", "f_LevelPerValue": "30", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330108", "e_OptionType": "MaxMP", "n_DefaultValue": "10", "f_LevelPerValue": "30", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330109", "e_OptionType": "M_DEF", "n_DefaultValue": "10", "f_LevelPerValue": "30", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "340001", "e_OptionType": "Pet_Reinforce_Price", "n_DefaultValue": "10000", "f_LevelPerValue": "1", "f_BalanceConstant": "0.1", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "340002", "e_OptionType": "Pet_Reinforce_Price", "n_DefaultValue": "20000", "f_LevelPerValue": "2", "f_BalanceConstant": "0.2", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "340003", "e_OptionType": "Pet_Reinforce_Price", "n_DefaultValue": "30000", "f_LevelPerValue": "3", "f_BalanceConstant": "0.3", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}] \ No newline at end of file +[{"n_OptionID": "330001", "e_OptionType": "KillToMP", "n_DefaultValue": "90", "f_LevelPerValue": "1", "f_BalanceConstant": "0", "f_ExtraValue1": "0.5", "f_ExtraValue2": "1", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330002", "e_OptionType": "KillToHP", "n_DefaultValue": "90", "f_LevelPerValue": "1", "f_BalanceConstant": "0", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330003", "e_OptionType": "Pet_ATK_Multiplier", "n_DefaultValue": "1", "f_LevelPerValue": "20", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "5", "f_ExtraValue2": "0.25", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330004", "e_OptionType": "Pet_HP_Multiplier", "n_DefaultValue": "1", "f_LevelPerValue": "20", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330005", "e_OptionType": "ATK", "n_DefaultValue": "10", "f_LevelPerValue": "20", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330006", "e_OptionType": "DEF", "n_DefaultValue": "10", "f_LevelPerValue": "20", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330007", "e_OptionType": "MaxHP", "n_DefaultValue": "10", "f_LevelPerValue": "20", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330008", "e_OptionType": "MaxMP", "n_DefaultValue": "10", "f_LevelPerValue": "20", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330009", "e_OptionType": "M_DEF", "n_DefaultValue": "10", "f_LevelPerValue": "20", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330101", "e_OptionType": "KillToMP", "n_DefaultValue": "90", "f_LevelPerValue": "2", "f_BalanceConstant": "0", "f_ExtraValue1": "0.5", "f_ExtraValue2": "1", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330102", "e_OptionType": "KillToHP", "n_DefaultValue": "90", "f_LevelPerValue": "2", "f_BalanceConstant": "0", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330103", "e_OptionType": "Pet_ATK_Multiplier", "n_DefaultValue": "2", "f_LevelPerValue": "30", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "5", "f_ExtraValue2": "0.25", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330104", "e_OptionType": "Pet_HP_Multiplier", "n_DefaultValue": "2", "f_LevelPerValue": "30", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330105", "e_OptionType": "ATK", "n_DefaultValue": "10", "f_LevelPerValue": "30", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330106", "e_OptionType": "DEF", "n_DefaultValue": "10", "f_LevelPerValue": "30", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330107", "e_OptionType": "MaxHP", "n_DefaultValue": "10", "f_LevelPerValue": "30", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330108", "e_OptionType": "MaxMP", "n_DefaultValue": "10", "f_LevelPerValue": "30", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "330109", "e_OptionType": "M_DEF", "n_DefaultValue": "10", "f_LevelPerValue": "30", "f_BalanceConstant": "0.0015", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "340001", "e_OptionType": "Pet_Reinforce_Price", "n_DefaultValue": "10000", "f_LevelPerValue": "1", "f_BalanceConstant": "0.1", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "340002", "e_OptionType": "Pet_Reinforce_Price", "n_DefaultValue": "20000", "f_LevelPerValue": "2", "f_BalanceConstant": "0.2", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}, {"n_OptionID": "340003", "e_OptionType": "Pet_Reinforce_Price", "n_DefaultValue": "30000", "f_LevelPerValue": "3", "f_BalanceConstant": "0.3", "f_ExtraValue1": "0", "f_ExtraValue2": "0", "f_ExtraValue3": "0", "f_ExtraValue4": "0"}] \ No newline at end of file diff --git a/Assets/ResWork/Table/butler.xlsm b/Assets/ResWork/Table/butler.xlsm index ddbf4b82c..10baf6410 100644 Binary files a/Assets/ResWork/Table/butler.xlsm and b/Assets/ResWork/Table/butler.xlsm differ diff --git a/Assets/Script/Server/ServerClass.cs b/Assets/Script/Server/ServerClass.cs index b582a24c7..b22294a06 100644 --- a/Assets/Script/Server/ServerClass.cs +++ b/Assets/Script/Server/ServerClass.cs @@ -773,6 +773,12 @@ public partial class ServerData lst[index].Lock = lst[index].Lock == 0 ? 1 : 0; lst[index].Lock.RandomizeCryptoKey(); } + public bool isLock_LimitSlot(string preset, int slot) + { + var lst = Get_LimitSlot(preset); + var index = slot - 1; + return lst[index].Lock > 0; + } #endregion #region 펫 public int Get_PetLv(int _petid) diff --git a/Assets/Script/Server/ServerInfo.cs b/Assets/Script/Server/ServerInfo.cs index 26300a9d8..2d1276c48 100644 --- a/Assets/Script/Server/ServerInfo.cs +++ b/Assets/Script/Server/ServerInfo.cs @@ -1128,6 +1128,42 @@ public class ServerInfo : MyCoroutine Set_Coroutine(() => { Save_PC_LimitLvUp(_act); }, 2f); }); } + public void Get_PC_LimitSlotOption(Action _act) + { + NetWait.Ins.Set(true); + PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest + { + FunctionName = MethodBase.GetCurrentMethod().Name, + GeneratePlayStreamEvent = true, + FunctionParameter = new + { + Token = m_LoginInfo.EntityToken.EntityToken, + } + }, + result => + { + if (result.Error == null) + { + NetWait.Ins.Set(false); + var str_result = result.FunctionResult.ToString(); + var error = MyErrorCheck(str_result); + if (error == 0) + { + var option = JsonConvert.DeserializeObject(str_result); + m_ServerData.LimitBreakOption = option.option; + _act(); + } + else + Set_Coroutine(() => { Get_PC_LimitSlotOption(_act); }, 2f); + } + else + Set_Coroutine(() => { Get_PC_LimitSlotOption(_act); }, 2f); + }, + fail => + { + Set_Coroutine(() => { Get_PC_LimitSlotOption(_act); }, 2f); + }); + } public void Save_PC_LimitSlotOptionChange(string preset, Action _act) { NetWait.Ins.Set(true); diff --git a/Assets/Script/UI/PC/Limit/PCLimitSlotCard.cs b/Assets/Script/UI/PC/Limit/PCLimitSlotCard.cs index b2e9dc8ac..fa9472581 100644 --- a/Assets/Script/UI/PC/Limit/PCLimitSlotCard.cs +++ b/Assets/Script/UI/PC/Limit/PCLimitSlotCard.cs @@ -18,9 +18,9 @@ public class PCLimitSlotCard : CardBase public override void Set(int _val) { m_Slot = _val; - var lv = ServerInfo.Ins.m_ServerData.Get_LimitLv(); + var openlv = table_breakinglimit.Ins.Get_SlotOpenLv(m_Slot); - texts[2].text = openlv > lv ? DSUtil.Format(262, openlv) : ""; + texts[2].text = isCloseSlot() ? DSUtil.Format(262, openlv) : ""; Set_UI(); } @@ -49,6 +49,13 @@ public class PCLimitSlotCard : CardBase } } + bool isCloseSlot() + { + var lv = ServerInfo.Ins.m_ServerData.Get_LimitLv(); + var openlv = table_breakinglimit.Ins.Get_SlotOpenLv(m_Slot); + return openlv > lv; + } + // 기존 클라 기반일 때 //public void Set_Change(string preset) //{ @@ -78,17 +85,34 @@ public class PCLimitSlotCard : CardBase sdata.Add_MissionCount(ePurpose.HERO_OPTION_CHANGE_ACC); } } + public void Set_Change(string preset, int ipreset) + { + var sdata = ServerInfo.Ins.m_ServerData; + if (!isCloseSlot() && !sdata.isLock_LimitSlot(preset, m_Slot)) + { + var option = sdata.LimitBreakOption.Option[ipreset][sdata.LimitBreakOption.Preset[ipreset]++]; + if (sdata.LimitBreakOption.Preset[ipreset] >= sdata.LimitBreakOption.Option[ipreset].Count) + { + sdata.LimitBreakOption.Preset[ipreset] = 0; + // 다음 테이블 서버에서 받아오기 + PCLimitUI.Ins.m_PCLimitUI_Right.ChangeOption = true; + } + sdata.Set_LimitSlotID(preset, m_Slot, option.id, option.lv); + sdata.Add_MissionCount(ePurpose.HERO_OPTION_CHANGE); + sdata.Add_MissionCount(ePurpose.HERO_OPTION_CHANGE_ACC); + } + } public override int Get_IntData() { return m_Grade; } public void OnClick_Lock() { - if (m_SData.ID > 0) + var sdata = ServerInfo.Ins.m_ServerData; + var preset = PCLimitUI.Ins.m_PCLimitUI_Right.Get_Preset(); + if (m_SData.ID > 0 || sdata.isLock_LimitSlot(preset, m_Slot)) { - var preset = PCLimitUI.Ins.m_PCLimitUI_Right.Get_Preset(); ServerInfo.Ins.Save_PC_LimitSlotLock(preset, m_Slot, () => { - var sdata = ServerInfo.Ins.m_ServerData; sdata.Set_LimitSlotLock(preset, m_Slot); PCLimitUI.Ins.m_PCLimitUI_Right.Set(); }); diff --git a/Assets/Script/UI/PC/Limit/PCLimitUI_Right.cs b/Assets/Script/UI/PC/Limit/PCLimitUI_Right.cs index e86d8d6dd..f57f22d37 100644 --- a/Assets/Script/UI/PC/Limit/PCLimitUI_Right.cs +++ b/Assets/Script/UI/PC/Limit/PCLimitUI_Right.cs @@ -9,6 +9,7 @@ public class PCLimitUI_Right : uScrollViewMgr public MoneyForm m_Price; public TextMeshProUGUI[] texts; // 0 보호 등급 + public bool ChangeOption; string m_Preset = "1"; int m_matID, m_CurProtectGrade, m_ProtectMaxGrade; ObscuredInt mPrice; @@ -104,7 +105,7 @@ public class PCLimitUI_Right : uScrollViewMgr public void OnClick_Change() { - if (IsOpenSlot() && CheckMoney(true)) + if (!ChangeOption && IsOpenSlot() && CheckMoney(true)) { var sdata = ServerInfo.Ins.m_ServerData; var lst = sdata.Get_LimitSlot(m_Preset); @@ -126,14 +127,23 @@ public class PCLimitUI_Right : uScrollViewMgr void Change() { - ServerInfo.Ins.Save_PC_LimitSlotOptionChange(m_Preset, options => - { - var sdata = ServerInfo.Ins.m_ServerData; - sdata.Use_Item(m_matID, mPrice); - list_CardBase.ForEach(f => (f as PCLimitSlotCard).Set_Change(m_Preset, options)); - Set(); - MyValue.Get_ActorStatInfoorNull(eRole.PC); - NewGameUI.Ins.m_PCUI.Refresh_Money(); - }); + var sdata = ServerInfo.Ins.m_ServerData; + sdata.Use_Item(m_matID, mPrice); + list_CardBase.ForEach(f => (f as PCLimitSlotCard).Set_Change(m_Preset, m_Tab.Get_Index() + 1)); + Set(); + MyValue.Get_ActorStatInfoorNull(eRole.PC); + NewGameUI.Ins.m_PCUI.Refresh_Money(); + + if (ChangeOption) { ServerInfo.Ins.Get_PC_LimitSlotOption(() => { ChangeOption = false; }); } + + //ServerInfo.Ins.Save_PC_LimitSlotOptionChange(m_Preset, options => + //{ + // var sdata = ServerInfo.Ins.m_ServerData; + // sdata.Use_Item(m_matID, mPrice); + // list_CardBase.ForEach(f => (f as PCLimitSlotCard).Set_Change(m_Preset, options)); + // Set(); + // MyValue.Get_ActorStatInfoorNull(eRole.PC); + // NewGameUI.Ins.m_PCUI.Refresh_Money(); + //}); } } \ No newline at end of file