forked from aly/qstbak
muffin v7.5.6
This commit is contained in:
parent
6266f9e6b7
commit
addf2d530f
619 changed files with 264792 additions and 446022 deletions
41
LLib/LLib.GameData/ClassJobHelper.cs
Normal file
41
LLib/LLib.GameData/ClassJobHelper.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
namespace LLib.GameData;
|
||||
|
||||
public static class ClassJobHelper
|
||||
{
|
||||
public static bool IsClassJobUnlocked(EClassJob classJob, IDataManager dataManager)
|
||||
{
|
||||
ClassJob row = dataManager.GetExcelSheet<ClassJob>().GetRow((uint)classJob);
|
||||
ushort num = (ushort)row.UnlockQuest.RowId;
|
||||
int num2 = ((num == 0) ? 1968883418 : 1968883419);
|
||||
while (true)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 1968883416;
|
||||
int num5 = num3;
|
||||
switch ((num5 | num4) - (num5 & num4))
|
||||
{
|
||||
case 1:
|
||||
return false;
|
||||
case 3:
|
||||
return QuestManager.IsQuestComplete(num);
|
||||
case 4:
|
||||
return PlayerStateHelper.GetClassJobLevel(row.ExpArrayIndex) > 0;
|
||||
case 2:
|
||||
num2 = ((row.ExpArrayIndex >= 0) ? 1968883420 : 1968883417);
|
||||
break;
|
||||
case 0:
|
||||
num2 = 1968883419;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsJobUnlocked(EClassJob classJob, IDataManager dataManager)
|
||||
{
|
||||
return IsClassJobUnlocked((EClassJob)dataManager.GetExcelSheet<ClassJob>().GetRow((uint)classJob).ClassJobParent.RowId, dataManager);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue