Upload from upload_mods.ps1
This commit is contained in:
29
Harmony/Harmony_XUiC_QuestWindowGroup.cs
Normal file
29
Harmony/Harmony_XUiC_QuestWindowGroup.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user