30 lines
1.2 KiB
C#
30 lines
1.2 KiB
C#
|
|
namespace Harmony.XUiC_QuestWindowGroupPatches
|
|
{
|
|
[HarmonyPatch(typeof(XUiC_QuestWindowGroup))]
|
|
[HarmonyPatch("GetBindingValue")]
|
|
public class GetBindingValuePatch
|
|
{
|
|
public static void Postfix(XUiC_QuestWindowGroup __instance, ref bool __result, ref string _value, string _bindingName)
|
|
{
|
|
if (_bindingName == "queststier")
|
|
{
|
|
EntityPlayerLocal entityPlayer = __instance.xui.playerUI.entityPlayer;
|
|
if (entityPlayer != null)
|
|
{
|
|
int currentFactionTier = entityPlayer.QuestJournal.GetCurrentFactionTier((byte)1);
|
|
|
|
int totalPoints = 0;
|
|
|
|
for (int i = 1; i <= currentFactionTier; i++)
|
|
{
|
|
totalPoints += i * RebirthVariables.customJobsToNextTier;
|
|
}
|
|
|
|
_value = string.Format(Localization.Get("xuiQuestTierDescription"), (object)ValueDisplayFormatters.RomanNumber(entityPlayer.QuestJournal.GetCurrentFactionTier((byte)1)), (object)entityPlayer.QuestJournal.GetQuestFactionPoints((byte)1), totalPoints);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|