초월 옵션 완료
This commit is contained in:
parent
0557afa477
commit
c5c698f504
|
|
@ -868,10 +868,8 @@ handlers.Save_PC_MenuBack = function(args)
|
|||
if (IsObtainItem(urod, args.JobID))
|
||||
urod.Equip.Equip["PC"] = args.JobID;
|
||||
|
||||
// 초월 프리셋
|
||||
urod.Equip.LimitPreset = args.Preset;
|
||||
|
||||
// 초월 옵션
|
||||
// 초월
|
||||
urod.Equip.LimitPreset = args.LimitSlotData.SelectPreset;
|
||||
var rtnlimitslot = {};
|
||||
rtnlimitslot.limitslotoption = Set_LimitSlotOption(table, urod, args);
|
||||
if (CheckNullOrEmpty(rtnlimitslot.limitslotoption))
|
||||
|
|
@ -1156,7 +1154,12 @@ function Make_LimitBreakOption(urod)
|
|||
{
|
||||
var grade = Get_RandomGachaGrade(lv);
|
||||
var rdnItem = Get_RandomItem(lsmc_data.n_DropIndex, grade);
|
||||
//if (rdnItem == null) log.info(lsmc_data.n_DropIndex + " " + grade);
|
||||
/*if (CheckNullOrEmpty(rdnItem))
|
||||
{
|
||||
--j;
|
||||
log.info("초월 레벨 : " + lv + ", dropindex : " + lsmc_data.n_DropIndex + ", 등급 : " + grade);
|
||||
continue;
|
||||
}*/
|
||||
var optionitemID = rdnItem.itemid;
|
||||
var olv = Get_OptionLv(grade);
|
||||
urod.LimitBreakOption.Option[i + 1].push({ id : optionitemID, lv : olv });
|
||||
|
|
@ -1203,13 +1206,14 @@ handlers.Save_PC_LimitLvUp = function(args)
|
|||
}
|
||||
function Set_LimitSlotOption(table, urod, args, makeoption = false)
|
||||
{
|
||||
if (Use_Item(table, urod, Get_GlobalValue_nValue("n_BreakingLimitSlotMaterialID"), args.LimitSlotData.Price))
|
||||
var count = args.LimitSlotData.Count;
|
||||
if (count < 510 && 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, count, false);
|
||||
Add_MissionCount(table, urod, "HERO_OPTION_CHANGE_ACC", 0, count, false);
|
||||
return null;
|
||||
}
|
||||
return urod.LimitSlot;
|
||||
|
|
@ -1223,10 +1227,24 @@ handlers.Save_PC_LimitSlotOption = function(args)
|
|||
|
||||
var urod = Get_JsonUserData(readonlydata);
|
||||
var table = Get_MissionTable();
|
||||
|
||||
urod.Equip.LimitPreset = args.LimitSlotData.SelectPreset;
|
||||
var rtnlimitslot = {};
|
||||
rtnlimitslot.limitslotoption = Set_LimitSlotOption(table, urod, args, true);
|
||||
if (CheckNullOrEmpty(rtnlimitslot.limitslotoption))
|
||||
{
|
||||
rtnlimitslot.success = true;
|
||||
Set_JsonUserData(urod);
|
||||
}
|
||||
else
|
||||
{
|
||||
rtnlimitslot.success = false;
|
||||
rtnlimitslot.limitpreset = urod.LimitBreakOption.Preset;
|
||||
rtnlimitslot.matID = Get_GlobalValue_nValue("n_BreakingLimitSlotMaterialID");
|
||||
rtnlimitslot.curAmount = Get_ItemAmount(urod, rtnlimitslot.matID);
|
||||
}
|
||||
|
||||
Set_LimitSlotOption(table, urod, args, true);
|
||||
Set_JsonUserData(urod);
|
||||
return Get_Return(0, { option : urod.LimitBreakOption });
|
||||
return Get_Return(0, { option : urod.LimitBreakOption, limitslot : rtnlimitslot });
|
||||
}
|
||||
handlers.Save_PC_LimitSlotOptionChange = function(args)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3187,6 +3187,7 @@ public class SC_FarmSlotHarvestResult
|
|||
public class SC_LimitBreakLvUpResult
|
||||
{
|
||||
public SD_LimitBreakOption option;
|
||||
public SC_LimitSlotData limitslot;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -859,8 +859,8 @@ public class ServerInfo : MyCoroutine
|
|||
Set_Coroutine(() => { Save_StageResult(_act); }, 2f);
|
||||
});
|
||||
}
|
||||
public void Save_PC_MenuBack(int costumeid, int workerid, int jobid, int preset,
|
||||
CS_AwakenData awakenData, LimitSlotChangeData limitslotData, Action<SC_PCMenuBackResult> _act)
|
||||
public void Save_PC_MenuBack(int costumeid, int workerid, int jobid, CS_AwakenData awakenData,
|
||||
LimitSlotChangeData limitslotData, Action<SC_PCMenuBackResult> _act)
|
||||
{
|
||||
NetWait.Ins.Set(true);
|
||||
PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest
|
||||
|
|
@ -873,7 +873,6 @@ public class ServerInfo : MyCoroutine
|
|||
CostumeID = costumeid,
|
||||
WorkerID = workerid,
|
||||
JobID = jobid,
|
||||
Preset = preset,
|
||||
AwakenData = awakenData,
|
||||
LimitSlotData = limitslotData
|
||||
}
|
||||
|
|
@ -895,11 +894,11 @@ public class ServerInfo : MyCoroutine
|
|||
}
|
||||
}
|
||||
else
|
||||
Set_Coroutine(() => { Save_PC_MenuBack(costumeid, workerid, jobid, preset, awakenData, limitslotData, _act); }, 2f);
|
||||
Set_Coroutine(() => { Save_PC_MenuBack(costumeid, workerid, jobid, awakenData, limitslotData, _act); }, 2f);
|
||||
},
|
||||
fail =>
|
||||
{
|
||||
Set_Coroutine(() => { Save_PC_MenuBack(costumeid, workerid, jobid, preset, awakenData, limitslotData, _act); }, 2f);
|
||||
Set_Coroutine(() => { Save_PC_MenuBack(costumeid, workerid, jobid, awakenData, limitslotData, _act); }, 2f);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1130,7 +1129,7 @@ public class ServerInfo : MyCoroutine
|
|||
Set_Coroutine(() => { Save_PC_LimitLvUp(_act); }, 2f);
|
||||
});
|
||||
}
|
||||
public void Save_PC_LimitSlotOption(LimitSlotChangeData limitslotData, Action _act)
|
||||
public void Save_PC_LimitSlotOption(LimitSlotChangeData limitslotData, Action<SC_LimitBreakLvUpResult> _act)
|
||||
{
|
||||
NetWait.Ins.Set(true);
|
||||
var lsd = limitslotData.Get();
|
||||
|
|
@ -1152,11 +1151,7 @@ public class ServerInfo : MyCoroutine
|
|||
var str_result = result.FunctionResult.ToString();
|
||||
var error = MyErrorCheck(str_result);
|
||||
if (error == 0)
|
||||
{
|
||||
var option = JsonConvert.DeserializeObject<SC_LimitBreakLvUpResult>(str_result);
|
||||
m_ServerData.LimitBreakOption = option.option;
|
||||
_act();
|
||||
}
|
||||
_act(JsonConvert.DeserializeObject<SC_LimitBreakLvUpResult>(str_result));
|
||||
else
|
||||
{
|
||||
ToastUI.Ins.Set(174, "데이터 없음");
|
||||
|
|
|
|||
|
|
@ -76,9 +76,10 @@ public class table_enchantgradeconfig : table_missionbase
|
|||
var lst = Get_DataList();
|
||||
for (int i = 0; i < lst.Count; i++)
|
||||
{
|
||||
if (lst[i].n_OptionLevelMax > lv)
|
||||
if (lv >= lst[i].n_OptionLevelMin && lv <= lst[i].n_OptionLevelMax)
|
||||
return lst[i];
|
||||
}
|
||||
|
||||
return lst[0];
|
||||
}
|
||||
public List<EnchantGradeConfigTableData> Get_DataList() { return tableDatas; }
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class PCLimitSlotCard : CardBase
|
|||
var gradecolor = table_enchantgradeconfig.Ins.Get_Data(m_Grade).GradeColor;
|
||||
images[0].color = gradecolor;
|
||||
texts[0].text = MyText.Get_StatNameValueText(Tdata.e_OptionType, Tdata.Get_Value(m_SData.Lv));
|
||||
texts[1].text = "??";
|
||||
texts[1].text = m_Grade.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ public class PCLimitUI : PCUIMenu
|
|||
m_PCLimit_Center.Set();
|
||||
m_PCLimitUI_Right.Set();
|
||||
|
||||
m_PCLimitUI_Right.m_LimitSlotChangeData.Init(true);
|
||||
if (NewGameUI.Ins.m_PCUI.Get_EnterID(eItem.Preset) == 0)
|
||||
NewGameUI.Ins.m_PCUI.Set_EnterID(eItem.Preset, ServerInfo.Ins.m_ServerData.Equip.LimitPreset);
|
||||
m_PCLimitUI_Right.m_LimitSlotChangeData.Init();
|
||||
}
|
||||
}
|
||||
|
|
@ -10,12 +10,14 @@ public class LimitSlotChangeData
|
|||
// 아래는 서버에 전송할 데이터
|
||||
public List<int> Preset;
|
||||
public Dictionary<string, List<SD_PCLimitSlotData_Read>> LimitSlot = new Dictionary<string, List<SD_PCLimitSlotData_Read>>();
|
||||
public int Price, Count;
|
||||
public int SelectPreset, Price, Count;
|
||||
|
||||
public void Init(bool copydata)
|
||||
public void Init()
|
||||
{
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
TotalPrice = 0; TotalPrice.RandomizeCryptoKey();
|
||||
MissionCount = 0; MissionCount.RandomizeCryptoKey();
|
||||
SelectPreset = sdata.Equip.LimitPreset;
|
||||
Copy_ServerLimitSlot();
|
||||
}
|
||||
void Copy_ServerLimitSlot()
|
||||
|
|
@ -32,9 +34,11 @@ public class LimitSlotChangeData
|
|||
}
|
||||
public LimitSlotChangeData Get()
|
||||
{
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
Price = TotalPrice;
|
||||
Count = MissionCount;
|
||||
Preset = ServerInfo.Ins.m_ServerData.LimitBreakOption.Preset;
|
||||
SelectPreset = sdata.Equip.LimitPreset;
|
||||
Preset = sdata.LimitBreakOption.Preset;
|
||||
Copy_ServerLimitSlot();
|
||||
return this;
|
||||
}
|
||||
|
|
@ -42,6 +46,8 @@ public class LimitSlotChangeData
|
|||
public bool IsChangeLimitSlot()
|
||||
{
|
||||
if (TotalPrice > 0) return true;
|
||||
var sdata = ServerInfo.Ins.m_ServerData;
|
||||
if (SelectPreset != sdata.Equip.LimitPreset) return true;
|
||||
|
||||
var currentSlotData = ServerInfo.Ins.m_ServerData.LimitSlot;
|
||||
foreach (var pair in currentSlotData)
|
||||
|
|
@ -205,11 +211,35 @@ public class PCLimitUI_Right : uScrollViewMgr
|
|||
{
|
||||
Btn_Change.ControlPress(false);
|
||||
ServerInfo.Ins.Save_PC_LimitSlotOption(changeData,
|
||||
() =>
|
||||
result =>
|
||||
{
|
||||
ChangeOption = false;
|
||||
Btn_Change.ControlPress(true);
|
||||
changeData.Init(false);
|
||||
|
||||
if (result.limitslot.success)
|
||||
{
|
||||
sdata.LimitBreakOption = result.option;
|
||||
sdata.Add_MissionCount(ePurpose.HERO_OPTION_CHANGE, 0, changeData.Get_MissionCount());
|
||||
sdata.Add_MissionCount(ePurpose.HERO_OPTION_CHANGE_ACC, 0, changeData.Get_MissionCount());
|
||||
}
|
||||
else
|
||||
{
|
||||
sdata.LimitBreakOption.Preset = result.limitslot.limitpreset;
|
||||
|
||||
foreach (var item in result.limitslot.limitslotoption)
|
||||
{
|
||||
sdata.LimitSlot[item.Key].Clear();
|
||||
for (int i = 0; i < item.Value.Count; i++)
|
||||
sdata.LimitSlot[item.Key].Add(item.Value[i].Get());
|
||||
}
|
||||
MyValue.Get_ActorStatInfoorNull(eRole.PC);
|
||||
|
||||
sdata.Set_Item(result.limitslot.matID, result.limitslot.curAmount);
|
||||
NewGameUI.Ins.m_PCUI.Refresh_Money();
|
||||
Set_UI();
|
||||
}
|
||||
|
||||
changeData.Init();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ public class PCUI : BotMenuBase
|
|||
};
|
||||
|
||||
Dictionary<eItem, int> dic_EnterID = new Dictionary<eItem, int>
|
||||
{ { eItem.PCCostume, 0 }, { eItem.Worker, 0 }, { eItem.PC, 0 }, { eItem.Preset , 0 } };
|
||||
{ { eItem.PCCostume, 0 }, { eItem.Worker, 0 }, { eItem.PC, 0 } };
|
||||
|
||||
public override void Set()
|
||||
{
|
||||
|
|
@ -48,17 +48,15 @@ public class PCUI : BotMenuBase
|
|||
bool changeCostume = Get_EnterID(eItem.PCCostume) > 0 && Get_EnterID(eItem.PCCostume) != sdata.Get_EqiupmentEquip(eItem.PCCostume);
|
||||
bool changeworker = Get_EnterID(eItem.Worker) > 0 && Get_EnterID(eItem.Worker) != sdata.Get_EqiupmentEquip(eItem.Worker);
|
||||
bool changejob = Get_EnterID(eItem.PC) > 0 && Get_EnterID(eItem.PC) != sdata.Get_EqiupmentEquip(eItem.PC);
|
||||
bool changepreset = Get_EnterID(eItem.Preset) > 0 && Get_EnterID(eItem.Preset) != sdata.Equip.LimitPreset;
|
||||
bool pcawakend = PCAwakenUI.isIns && PCAwakenUI.Ins.IsSendAwakenData();
|
||||
bool changelimitslot = PCLimitUI.isIns && PCLimitUI.Ins.m_PCLimitUI_Right.m_LimitSlotChangeData.IsChangeLimitSlot();
|
||||
|
||||
if (changeCostume || changeworker || changejob || changepreset || pcawakend || changelimitslot)
|
||||
if (changeCostume || changeworker || changejob || pcawakend || changelimitslot)
|
||||
{
|
||||
var limitslotdata = PCLimitUI.Ins.m_PCLimitUI_Right.m_LimitSlotChangeData.Get();
|
||||
ServerInfo.Ins.Save_PC_MenuBack(sdata.Get_EqiupmentEquip(eItem.PCCostume),
|
||||
sdata.Get_EqiupmentEquip(eItem.Worker),
|
||||
sdata.Get_EqiupmentEquip(eItem.PC),
|
||||
sdata.Equip.LimitPreset,
|
||||
PCAwakenUI.isIns ? PCAwakenUI.Ins.Get_CS_AwakenData() : emptyawaken,
|
||||
limitslotdata,
|
||||
result =>
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ public enum eItem
|
|||
// Money
|
||||
Gold, Gem, WeaponStone, RingStone, NeckStone, BootsStone, FairyStone, SelectSkillShuffle, ChapterQuestShuffle, mClover, MemoryField, MemoryForest, MemoryDungeon, MemoryWitchGrade, MemoryPetBattle,
|
||||
PC, PCCostume, Weapon, Armor, Helmet, Extra, Necklace, Ring,
|
||||
Preset, WeaponCostume, Pet, Worker, Farmer, Book, Page, Food, Seed,
|
||||
WeaponCostume, Pet, Worker, Farmer, Book, Page, Food, Seed,
|
||||
Title, Inven, Pass, Potion, Relic, Essence,
|
||||
// 상점
|
||||
Shop,
|
||||
|
|
|
|||
Loading…
Reference in New Issue