빠진 조건 추가 등
This commit is contained in:
parent
8b09deff8f
commit
4e8ebd95a3
|
|
@ -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);
|
||||
var rtnLimitSlotOption = Set_LimitSlotOption(table, urod, args);
|
||||
var rtnLimitPreset = null;
|
||||
if (CheckNullOrEmpty(rtnLimitSlotOption))
|
||||
urod.LimitBreakOption.Preset = args.LimitSlotData.Preset;
|
||||
log.info(urod.LimitBreakOption.Preset);
|
||||
Set_LimitSlotOption(table, urod, args);
|
||||
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);
|
||||
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);
|
||||
return null;
|
||||
}
|
||||
return urod.LimitSlot;
|
||||
}
|
||||
handlers.Save_PC_LimitSlotOption = function(args)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3121,6 +3121,9 @@ public class SC_PCMenuBackResult
|
|||
{
|
||||
public List<SC_Items> awakekMats;
|
||||
public Dictionary<string, SD_PCAwakenData_Read> awaken;
|
||||
public Dictionary<string, List<SD_PCLimitSlotData>> limitslotoption;
|
||||
public List<int> limitpreset;
|
||||
public int limitoptionAmount;
|
||||
}
|
||||
public class SC_PCStatInit
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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(); }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue