mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-22 20:04:45 +01:00
Fix XP, outpost level working, completestages also completes scenarios now
This commit is contained in:
@@ -27,6 +27,8 @@ namespace nksrv.StaticInfo
|
||||
/// </summary>
|
||||
public string chapter_mod = "";
|
||||
public string stage_type = "";
|
||||
public string enter_scenario = "";
|
||||
public string exit_scenario = "";
|
||||
}
|
||||
public class RewardTableRecord
|
||||
{
|
||||
|
||||
@@ -393,6 +393,27 @@ namespace nksrv.StaticInfo
|
||||
}
|
||||
return (-1, -1);
|
||||
}
|
||||
public int GetUserMinXpForLevel(int targetLevel)
|
||||
{
|
||||
for (int i = 0; i < userExpDataRecords.Count; i++)
|
||||
{
|
||||
var item = userExpDataRecords[i];
|
||||
|
||||
var level = item["level"];
|
||||
if (level == null) throw new Exception("expected level field in user exp table data");
|
||||
|
||||
int levelValue = level.ToObject<int>();
|
||||
if (targetLevel == levelValue)
|
||||
{
|
||||
var exp = item["exp"];
|
||||
if (exp == null) throw new Exception("expected exp field in user exp table data");
|
||||
|
||||
int expValue = exp.ToObject<int>();
|
||||
return expValue;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
public int GetNormalChapterNumberFromFieldName(string field)
|
||||
{
|
||||
foreach (JObject item in chapterCampaignData)
|
||||
|
||||
Reference in New Issue
Block a user