Make_EqiupmentEnchantOption 작업 중....
This commit is contained in:
parent
e4020e1c2a
commit
30f1bdb316
|
|
@ -122,6 +122,7 @@ handlers.Get_UserInfo = function (args)
|
||||||
var NRU = readonlydata.Data.UserInfo ? false : true;
|
var NRU = readonlydata.Data.UserInfo ? false : true;
|
||||||
var sec = 0;
|
var sec = 0;
|
||||||
var urod = null;
|
var urod = null;
|
||||||
|
var savedata = false;
|
||||||
|
|
||||||
if (!NRU)
|
if (!NRU)
|
||||||
{
|
{
|
||||||
|
|
@ -172,9 +173,16 @@ handlers.Get_UserInfo = function (args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Set_JsonUserData(urod);
|
savedata = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
savedata = true;
|
||||||
|
Make_EqiupmentEnchantOption(urod);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (savedata) Set_JsonUserData(urod);
|
||||||
|
|
||||||
return Get_Return(
|
return Get_Return(
|
||||||
Get_Error(readonlydata, args.Token),
|
Get_Error(readonlydata, args.Token),
|
||||||
|
|
@ -1557,6 +1565,27 @@ handlers.Save_EquipItem_SlotLvUpInit = function(args)
|
||||||
}
|
}
|
||||||
return Get_Return(1);
|
return Get_Return(1);
|
||||||
}
|
}
|
||||||
|
function Make_EqiupmentEnchantOption(urod)
|
||||||
|
{
|
||||||
|
var enchantable = Get_EnchantListTable();
|
||||||
|
urod.EnchantOption = {};
|
||||||
|
|
||||||
|
for (var i = 0; i < enchantable.length; ++i)
|
||||||
|
Make_EqiupmentEnchantOption_perEnchant(urod, enchantable[i].n_EnchantID);
|
||||||
|
}
|
||||||
|
function Make_EqiupmentEnchantOption_perEnchant(urod, id)
|
||||||
|
{
|
||||||
|
urod.EnchantOption[id] = { Index: 0, Option: [] };
|
||||||
|
var s_enchant = urod.Enchant[id];
|
||||||
|
|
||||||
|
for (var j = 0; j < 100; ++j)
|
||||||
|
{
|
||||||
|
var grade = Get_RandomEnchantRateGrade(s_enchant[1]);
|
||||||
|
var olv = Get_OptionLv(grade);
|
||||||
|
var optionid = Get_EnchantOptionID(id);
|
||||||
|
urod.EnchantOption[id].Option.push({ id: optionid, lv: olv });
|
||||||
|
}
|
||||||
|
}
|
||||||
handlers.Save_EquipItem_Enchant = function(args)
|
handlers.Save_EquipItem_Enchant = function(args)
|
||||||
{
|
{
|
||||||
var readonlydata = Get_UserReadOnlyData();
|
var readonlydata = Get_UserReadOnlyData();
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -97,6 +97,7 @@ public partial class ServerData
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Dictionary<string, SD_Shop> Shop = new Dictionary<string, SD_Shop>();
|
public Dictionary<string, SD_Shop> Shop = new Dictionary<string, SD_Shop>();
|
||||||
public SD_LimitBreakOption LimitBreakOption;
|
public SD_LimitBreakOption LimitBreakOption;
|
||||||
|
public Dictionary<int, SD_EquipItemEnchant> EnchantOption;
|
||||||
|
|
||||||
public List<ServerData_Book> Book;
|
public List<ServerData_Book> Book;
|
||||||
public List<ServerData_ChapterQuest> ChapterQuest;
|
public List<ServerData_ChapterQuest> ChapterQuest;
|
||||||
|
|
@ -227,7 +228,6 @@ public partial class ServerData
|
||||||
temp.Gacha = DSUtil.Get_T_Dic(Gacha);
|
temp.Gacha = DSUtil.Get_T_Dic(Gacha);
|
||||||
temp.Common = DSUtil.Get_T_List(Common);
|
temp.Common = DSUtil.Get_T_List(Common);
|
||||||
foreach (var item in Shop) temp.Shop.Add(item.Key, item.Value.Get());
|
foreach (var item in Shop) temp.Shop.Add(item.Key, item.Value.Get());
|
||||||
temp.LimitBreakOption = LimitBreakOption;
|
|
||||||
|
|
||||||
temp.Book = new List<ServerData_Book_Read>();
|
temp.Book = new List<ServerData_Book_Read>();
|
||||||
for (int i = 0; i < Book.Count; i++)
|
for (int i = 0; i < Book.Count; i++)
|
||||||
|
|
@ -274,6 +274,7 @@ public class ServerData_Read
|
||||||
public Dictionary<string, Dictionary<string, List<int>>> Mission = new Dictionary<string, Dictionary<string, List<int>>>();
|
public Dictionary<string, Dictionary<string, List<int>>> Mission = new Dictionary<string, Dictionary<string, List<int>>>();
|
||||||
public Dictionary<string, SD_Shop_Read> Shop = new Dictionary<string, SD_Shop_Read>();
|
public Dictionary<string, SD_Shop_Read> Shop = new Dictionary<string, SD_Shop_Read>();
|
||||||
public SD_LimitBreakOption LimitBreakOption;
|
public SD_LimitBreakOption LimitBreakOption;
|
||||||
|
public Dictionary<int, SD_EquipItemEnchant> EnchantOption;
|
||||||
|
|
||||||
public List<ServerData_Book_Read> Book;
|
public List<ServerData_Book_Read> Book;
|
||||||
public List<ServerData_ChapterQuest_Read> ChapterQuest;
|
public List<ServerData_ChapterQuest_Read> ChapterQuest;
|
||||||
|
|
@ -331,6 +332,7 @@ public class ServerData_Read
|
||||||
temp.Common = DSUtil.Get_T_List(Common);
|
temp.Common = DSUtil.Get_T_List(Common);
|
||||||
foreach (var item in Shop) temp.Shop.Add(item.Key, item.Value.Get());
|
foreach (var item in Shop) temp.Shop.Add(item.Key, item.Value.Get());
|
||||||
temp.LimitBreakOption = LimitBreakOption;
|
temp.LimitBreakOption = LimitBreakOption;
|
||||||
|
temp.EnchantOption = EnchantOption;
|
||||||
|
|
||||||
temp.Book = new List<ServerData_Book>();
|
temp.Book = new List<ServerData_Book>();
|
||||||
for (int i = 0; i < Book.Count; i++)
|
for (int i = 0; i < Book.Count; i++)
|
||||||
|
|
@ -3084,10 +3086,15 @@ public class SD_Shop_Read
|
||||||
public class SD_LimitBreakOption
|
public class SD_LimitBreakOption
|
||||||
{
|
{
|
||||||
public List<int> Preset;
|
public List<int> Preset;
|
||||||
public Dictionary<int, List<SD_LimitBreakOptionDetail>> Option;
|
public Dictionary<int, List<SD_OptionDetailData>> Option;
|
||||||
|
}
|
||||||
|
public class SD_EquipItemEnchant
|
||||||
|
{
|
||||||
|
public int Index;
|
||||||
|
public List<SD_OptionDetailData> Option;
|
||||||
}
|
}
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SD_LimitBreakOptionDetail
|
public class SD_OptionDetailData
|
||||||
{
|
{
|
||||||
public int id, lv;
|
public int id, lv;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue