1307 lines
54 KiB
C#
1307 lines
54 KiB
C#
using System.Collections.Generic;
|
|
|
|
|
|
internal class XUiC_ClassHUDRebirth : XUiController
|
|
{
|
|
private EntityPlayerLocal LocalPlayer;
|
|
private readonly CachedStringFormatterXuiRgbaColor stealthColorFormatter = new CachedStringFormatterXuiRgbaColor();
|
|
private readonly CachedStringFormatter<float> statfillFormatter = new CachedStringFormatter<float>((Func<float, string>)(_i => _i.ToCultureInvariantString()));
|
|
private readonly CachedStringFormatter<int, int> statcurrentWMaxFormatterAOfB = new CachedStringFormatter<int, int>((Func<int, int, string>)((_i, _i1) => string.Format("{0}/{1}", (object)_i, (object)_i1)));
|
|
private readonly CachedStringFormatter<float, float> statmodifiedmaxFormatter = new CachedStringFormatter<float, float>((Func<float, float, string>)((_f1, _f2) => (_f1 / _f2).ToCultureInvariantString()));
|
|
|
|
public override bool GetBindingValue(ref string value, string bindingName)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue START");
|
|
string className = "";
|
|
string classLvl = "";
|
|
string classSet = "true";
|
|
string classBackgroundColor = "";
|
|
string classBackgroundFill = "0";
|
|
string classPerc = "";
|
|
string perk1Name = "";
|
|
string perk2Name = "";
|
|
string perk3Name = "";
|
|
string perk1Lvl = "";
|
|
string perk2Lvl = "";
|
|
string perk3Lvl = "";
|
|
string perk1Perc = "";
|
|
string perk2Perc = "";
|
|
string perk3Perc = "";
|
|
|
|
string purgeBackgroundColor = "";
|
|
string purgeBackgroundFill = "0";
|
|
string biomeName = "";
|
|
|
|
string rampageNum = "";
|
|
//string downfallNum = "";
|
|
string naturalSelectionNum = "";
|
|
|
|
float playerClass = 0;
|
|
|
|
if (this.LocalPlayer != null)
|
|
{
|
|
rampageNum = RebirthVariables.localConstants["$varFuriousRamsayRampageMax_Cst"].ToString();
|
|
naturalSelectionNum = RebirthVariables.localConstants["$varFuriousRamsayTheyGrowStrongerKills_Cst"].ToString();
|
|
|
|
playerClass = this.LocalPlayer.Buffs.GetCustomVar("$ActiveClass_FR");
|
|
float total = 0;
|
|
float unit = 0;
|
|
float perc = 0;
|
|
int level = 0;
|
|
|
|
total = RebirthVariables.localConstants["$varFuriousRamsayPerk1PercUnit"];
|
|
unit = total % 1;
|
|
level = (int)total;
|
|
perk1Lvl = level.ToString();
|
|
perk1Perc = unit.ToString();
|
|
|
|
total = RebirthVariables.localConstants["$varFuriousRamsayPerk2PercUnit"];
|
|
unit = total % 1;
|
|
level = (int)total;
|
|
perk2Lvl = level.ToString();
|
|
perk2Perc = unit.ToString();
|
|
|
|
total = RebirthVariables.localConstants["$varFuriousRamsayPerk3PercUnit"];
|
|
unit = total % 1;
|
|
level = (int)total;
|
|
perk3Lvl = level.ToString();
|
|
perk3Perc = unit.ToString();
|
|
|
|
string biomeSuffix = RebirthUtilities.GetBiomeName(this.LocalPlayer);
|
|
biomeName = Localization.Get("biome_" + biomeSuffix);
|
|
|
|
if (biomeSuffix == "pine_forest")
|
|
{
|
|
purgeBackgroundColor = "58, 105, 70";
|
|
}
|
|
else if (biomeSuffix == "desert")
|
|
{
|
|
purgeBackgroundColor = "184, 181, 140";
|
|
}
|
|
else if (biomeSuffix == "snow")
|
|
{
|
|
purgeBackgroundColor = "128, 128, 128";
|
|
}
|
|
else if (biomeSuffix == "wasteland")
|
|
{
|
|
purgeBackgroundColor = "152, 166, 121";
|
|
}
|
|
else if (biomeSuffix == "burnt_forest")
|
|
{
|
|
purgeBackgroundColor = "56, 56, 56";
|
|
}
|
|
|
|
if (playerClass == 1)
|
|
{
|
|
RebirthVariables.localConstants["$varFuriousRamsayClassPercUnit"] = RebirthVariables.localVariables["$varFuriousRamsayHunterPercUnit"];
|
|
className = Localization.Get("ttHunter").ToUpper();
|
|
classBackgroundColor = "53,105,101";
|
|
perk1Name = Localization.Get("ttSpears").ToUpper();
|
|
perk2Name = Localization.Get("ttBows").ToUpper();
|
|
perk3Name = Localization.Get("ttLongRangeRifles").ToUpper();
|
|
}
|
|
else if (playerClass == 2)
|
|
{
|
|
RebirthVariables.localConstants["$varFuriousRamsayClassPercUnit"] = RebirthVariables.localVariables["$varFuriousRamsayThugPercUnit"];
|
|
className = Localization.Get("ttThug").ToUpper();
|
|
classBackgroundColor = "104,105,53";
|
|
perk1Name = Localization.Get("ttClubs").ToUpper();
|
|
perk2Name = Localization.Get("ttShotguns").ToUpper();
|
|
perk3Name = "";
|
|
}
|
|
else if (playerClass == 3)
|
|
{
|
|
RebirthVariables.localConstants["$varFuriousRamsayClassPercUnit"] = RebirthVariables.localVariables["$varFuriousRamsayButcherPercUnit"];
|
|
className = Localization.Get("ttButcher").ToUpper();
|
|
classBackgroundColor = "105,53,53";
|
|
perk1Name = Localization.Get("ttSwords").ToUpper();
|
|
perk2Name = Localization.Get("ttAssaultRifles").ToUpper();
|
|
perk3Name = "";
|
|
}
|
|
else if (playerClass == 4)
|
|
{
|
|
RebirthVariables.localConstants["$varFuriousRamsayClassPercUnit"] = RebirthVariables.localVariables["$varFuriousRamsaySoldierPercUnit"];
|
|
className = Localization.Get("ttSoldier").ToUpper();
|
|
classBackgroundColor = "56,105,53";
|
|
perk1Name = Localization.Get("ttAxes").ToUpper();
|
|
perk2Name = Localization.Get("ttMachineguns").ToUpper();
|
|
perk3Name = "";
|
|
}
|
|
else if (playerClass == 5)
|
|
{
|
|
RebirthVariables.localConstants["$varFuriousRamsayClassPercUnit"] = RebirthVariables.localVariables["$varFuriousRamsayTechnogeekPercUnit"];
|
|
className = Localization.Get("ttTechnogeek").ToUpper();
|
|
classBackgroundColor = "74,53,105";
|
|
perk1Name = Localization.Get("ttBatons").ToUpper();
|
|
perk2Name = Localization.Get("ttRevolvers").ToUpper();
|
|
perk3Name = Localization.Get("ttDeployableTurrets").ToUpper();
|
|
}
|
|
else if (playerClass == 6)
|
|
{
|
|
RebirthVariables.localConstants["$varFuriousRamsayClassPercUnit"] = RebirthVariables.localVariables["$varFuriousRamsayMadmanPercUnit"];
|
|
className = Localization.Get("ttMadman").ToUpper();
|
|
classBackgroundColor = "105,93,53";
|
|
perk1Name = Localization.Get("ttKnuckles").ToUpper();
|
|
perk2Name = Localization.Get("ttSubmachineGuns").ToUpper();
|
|
perk3Name = ""; // "EXPLOSIVES";
|
|
}
|
|
else if (playerClass == 7)
|
|
{
|
|
RebirthVariables.localConstants["$varFuriousRamsayClassPercUnit"] = RebirthVariables.localVariables["$varFuriousRamsayBuilderPercUnit"];
|
|
className = Localization.Get("ttBuilder").ToUpper();
|
|
classBackgroundColor = "105,53,105";
|
|
perk1Name = Localization.Get("ttHammers").ToUpper();
|
|
perk2Name = Localization.Get("ttPistols").ToUpper();
|
|
perk3Name = Localization.Get("ttElectricTraps").ToUpper();
|
|
}
|
|
else if (playerClass == 8)
|
|
{
|
|
RebirthVariables.localConstants["$varFuriousRamsayClassPercUnit"] = RebirthVariables.localVariables["$varFuriousRamsayChefPercUnit"];
|
|
className = Localization.Get("ttChef").ToUpper();
|
|
classBackgroundColor = "100,100,100";
|
|
perk1Name = Localization.Get("ttKnives").ToUpper();
|
|
perk2Name = Localization.Get("ttHeavyHandguns").ToUpper();
|
|
perk3Name = "";
|
|
}
|
|
else if (playerClass == 9)
|
|
{
|
|
RebirthVariables.localConstants["$varFuriousRamsayClassPercUnit"] = RebirthVariables.localVariables["$varFuriousRamsayWitchDoctorPercUnit"];
|
|
className = Localization.Get("ttWitchDoctor").ToUpper();
|
|
classBackgroundColor = "100,100,100";
|
|
perk1Name = Localization.Get("ttScythes").ToUpper();
|
|
perk2Name = Localization.Get("ttTacticalRifles").ToUpper();
|
|
perk3Name = Localization.Get("ttBlackMagic").ToUpper();
|
|
}
|
|
else if (playerClass == 10)
|
|
{
|
|
RebirthVariables.localConstants["$varFuriousRamsayClassPercUnit"] = RebirthVariables.localVariables["$varFuriousRamsayBerserkerPercUnit"];
|
|
className = Localization.Get("ttBerserker").ToUpper();
|
|
classBackgroundColor = "53,105,101";
|
|
perk1Name = Localization.Get("ttMelee").ToUpper();
|
|
perk2Name = Localization.Get("ttRage").ToUpper();
|
|
perk3Name = "";
|
|
}
|
|
else
|
|
{
|
|
className = Localization.Get("ttClassNotActive");
|
|
classLvl = "";
|
|
classSet = "false";
|
|
classBackgroundColor = "30,30,30";
|
|
classBackgroundFill = "0";
|
|
classPerc = "";
|
|
perk1Name = "";
|
|
perk2Name = "";
|
|
perk3Name = "";
|
|
}
|
|
|
|
if (playerClass > 0)
|
|
{
|
|
total = RebirthVariables.localConstants["$varFuriousRamsayClassPercUnit"];
|
|
|
|
unit = total % 1;
|
|
level = (int)total;
|
|
|
|
classBackgroundFill = unit.ToString();
|
|
classLvl = level.ToString();
|
|
classPerc = (Math.Truncate(unit * 100 * 100) / 100).ToString() + "%";
|
|
}
|
|
|
|
if (perk1Name == "")
|
|
{
|
|
perk1Lvl = "";
|
|
perk1Perc = "0";
|
|
}
|
|
if (perk2Name == "")
|
|
{
|
|
perk2Lvl = "";
|
|
perk2Perc = "0";
|
|
}
|
|
if (perk3Name == "")
|
|
{
|
|
perk3Lvl = "";
|
|
perk3Perc = "0";
|
|
}
|
|
}
|
|
|
|
string genericClassName = "";
|
|
bool hasQuest = false;
|
|
float classID = 0f;
|
|
string meleeFragmentName = "";
|
|
string rangedFragmentName = "";
|
|
Dictionary<string, float> classMeleePerc = new Dictionary<string, float>(); ;
|
|
Dictionary<string, float> classRangedPerc = new Dictionary<string, float>(); ;
|
|
|
|
classRangedPerc["Hunter"] = 0;
|
|
classRangedPerc["Thug"] = 0;
|
|
classRangedPerc["Butcher"] = 0;
|
|
classRangedPerc["Soldier"] = 0;
|
|
classRangedPerc["Technogeek"] = 0;
|
|
classRangedPerc["Madman"] = 0;
|
|
classRangedPerc["Builder"] = 0;
|
|
classRangedPerc["Chef"] = 0;
|
|
classRangedPerc["WitchDoctor"] = 0;
|
|
|
|
if (this.LocalPlayer != null)
|
|
{
|
|
classID = this.LocalPlayer.Buffs.GetCustomVar("$FR_SelectedClass");
|
|
|
|
if (classID > 0)
|
|
{
|
|
genericClassName = RebirthUtilities.GetClassNameFromID(classID);
|
|
string questName = "quest_BasicSurvival_" + genericClassName;
|
|
|
|
for (int i = 0; i < this.LocalPlayer.QuestJournal.quests.Count; i++)
|
|
{
|
|
if (this.LocalPlayer.QuestJournal.quests[i].ID.ToLower() == questName.ToLower())
|
|
{
|
|
hasQuest = true;
|
|
break;
|
|
}
|
|
}
|
|
|
|
List<string> tagNames = this.LocalPlayer.inventory.holdingItem.ItemTags.GetTagNames();
|
|
classMeleePerc["Berserker"] = 0;
|
|
meleeFragmentName = "";
|
|
|
|
foreach (string key in RebirthVariables.localExpertiseCrafting.Keys)
|
|
{
|
|
if (key.ToLower().Contains("pipe"))
|
|
{
|
|
List<categoryCrafting> CategoryCraftingList = RebirthVariables.localExpertiseCrafting[key];
|
|
|
|
List<craftingLevels> craftingLevelsList = CategoryCraftingList[0].levels;
|
|
|
|
if (key.ToLower().Contains("rifle"))
|
|
{
|
|
float perc = (RebirthVariables.localVariables["$varFuriousRamsayPipeRiflePercUnit"] / craftingLevelsList[craftingLevelsList.Count - 1].categoryLevel) * 100;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
if (perc > classRangedPerc["Hunter"])
|
|
{
|
|
classRangedPerc["Hunter"] = (int)perc;
|
|
}
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue PIPE RIFLE classRangedPerc[Hunter]: " + classRangedPerc["Hunter"]);
|
|
rangedFragmentName = "FR_ClassInfoBook" + genericClassName + "1_icon";
|
|
|
|
}
|
|
else if (key.ToLower().Contains("shotgun"))
|
|
{
|
|
float perc = (RebirthVariables.localVariables["$varFuriousRamsayPipeShotgunPercUnit"] / craftingLevelsList[craftingLevelsList.Count - 1].categoryLevel) * 100;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
classRangedPerc["Thug"] = (int)perc;
|
|
rangedFragmentName = "FR_ClassInfoBook" + genericClassName + "1_icon";
|
|
}
|
|
else if (key.ToLower().Contains("pistol"))
|
|
{
|
|
float perc = (RebirthVariables.localVariables["$varFuriousRamsayPipePistolPercUnit"] / craftingLevelsList[craftingLevelsList.Count - 1].categoryLevel) * 100;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
classRangedPerc["Technogeek"] = (int)perc; ;
|
|
classRangedPerc["Builder"] = (int)perc; ;
|
|
classRangedPerc["Chef"] = (int)perc; ;
|
|
rangedFragmentName = "FR_ClassInfoBook" + genericClassName + "1_icon";
|
|
}
|
|
else if (key.ToLower().Contains("machinegun"))
|
|
{
|
|
float perc = (RebirthVariables.localVariables["$varFuriousRamsayPipeMachinegunPercUnit"] / craftingLevelsList[craftingLevelsList.Count - 1].categoryLevel) * 100;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
classRangedPerc["Butcher"] = (int)perc; ;
|
|
classRangedPerc["Soldier"] = (int)perc; ;
|
|
classRangedPerc["Madman"] = (int)perc; ;
|
|
classRangedPerc["WitchDoctor"] = (int)perc; ;
|
|
rangedFragmentName = "FR_ClassInfoBook" + genericClassName + "1_icon";
|
|
}
|
|
}
|
|
else if (key.ToLower().Contains("bows"))
|
|
{
|
|
List<categoryCrafting> CategoryCraftingList = RebirthVariables.localExpertiseCrafting[key];
|
|
|
|
List<craftingLevels> craftingLevelsList = CategoryCraftingList[0].levels;
|
|
|
|
float perc = (RebirthVariables.localVariables["$varFuriousRamsayBowsPercUnit"] / craftingLevelsList[craftingLevelsList.Count - 1].categoryLevel) * 100;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue $varFuriousRamsayBowsPercUnit: " + RebirthVariables.localVariables["$varFuriousRamsayBowsPercUnit"]);
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingLevelsList.Count: " + craftingLevelsList.Count);
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingLevelsList[craftingLevelsList.Count - 1].categoryLevel: " + craftingLevelsList[craftingLevelsList.Count - 1].categoryLevel);
|
|
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue perc: " + perc);
|
|
if (perc > classRangedPerc["Hunter"])
|
|
{
|
|
classRangedPerc["Hunter"] = (int)perc;
|
|
}
|
|
rangedFragmentName = "FR_ClassInfoBook" + genericClassName + "1_icon";
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue BOW classRangedPerc[Hunter]: " + classRangedPerc["Hunter"]);
|
|
}
|
|
else if (key.ToLower().Contains("spears"))
|
|
{
|
|
List<categoryCrafting> CategoryCraftingList = RebirthVariables.localExpertiseCrafting[key];
|
|
|
|
List<craftingLevels> craftingLevelsList = CategoryCraftingList[1].levels;
|
|
|
|
float perc = (RebirthVariables.localVariables["$varFuriousRamsaySpearsPercUnit"] / craftingLevelsList[0].categoryLevel) * 100;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
classMeleePerc["Hunter"] = (int)perc;
|
|
|
|
for (int i = 0; i < tagNames.Count; i++)
|
|
{
|
|
if (tagNames[i].ToLower().Contains("spear"))
|
|
{
|
|
classMeleePerc["Berserker"] = (int)perc;
|
|
meleeFragmentName = "FR_ClassInfoBookHunter2_icon";
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else if (key.ToLower().Contains("clubs"))
|
|
{
|
|
List<categoryCrafting> CategoryCraftingList = RebirthVariables.localExpertiseCrafting[key];
|
|
|
|
List<craftingLevels> craftingLevelsList = CategoryCraftingList[1].levels;
|
|
|
|
float perc = (RebirthVariables.localVariables["$varFuriousRamsayClubsPercUnit"] / craftingLevelsList[0].categoryLevel) * 100;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
classMeleePerc["Thug"] = (int)perc;
|
|
|
|
for (int i = 0; i < tagNames.Count; i++)
|
|
{
|
|
if (tagNames[i].ToLower().Contains("club"))
|
|
{
|
|
classMeleePerc["Berserker"] = (int)perc;
|
|
meleeFragmentName = "FR_ClassInfoBookThug2_icon";
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else if (key.ToLower().Contains("swords"))
|
|
{
|
|
List<categoryCrafting> CategoryCraftingList = RebirthVariables.localExpertiseCrafting[key];
|
|
|
|
List<craftingLevels> craftingLevelsList = CategoryCraftingList[1].levels;
|
|
|
|
float perc = (RebirthVariables.localVariables["$varFuriousRamsaySwordsPercUnit"] / craftingLevelsList[0].categoryLevel) * 100;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
classMeleePerc["Butcher"] = (int)perc;
|
|
|
|
for (int i = 0; i < tagNames.Count; i++)
|
|
{
|
|
if (tagNames[i].ToLower().Contains("sword"))
|
|
{
|
|
classMeleePerc["Berserker"] = (int)perc;
|
|
meleeFragmentName = "FR_ClassInfoBookButcher2_icon";
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else if (key.ToLower().Contains("axes"))
|
|
{
|
|
List<categoryCrafting> CategoryCraftingList = RebirthVariables.localExpertiseCrafting[key];
|
|
|
|
List<craftingLevels> craftingLevelsList = CategoryCraftingList[1].levels;
|
|
|
|
float perc = (RebirthVariables.localVariables["$varFuriousRamsayAxesPercUnit"] / craftingLevelsList[0].categoryLevel) * 100;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
classMeleePerc["Soldier"] = (int)perc;
|
|
|
|
for (int i = 0; i < tagNames.Count; i++)
|
|
{
|
|
if (tagNames[i].ToLower().Contains("axe"))
|
|
{
|
|
classMeleePerc["Berserker"] = (int)perc;
|
|
meleeFragmentName = "FR_ClassInfoBookSoldier2_icon";
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else if (key.ToLower().Contains("batons"))
|
|
{
|
|
List<categoryCrafting> CategoryCraftingList = RebirthVariables.localExpertiseCrafting[key];
|
|
|
|
List<craftingLevels> craftingLevelsList = CategoryCraftingList[1].levels;
|
|
|
|
float perc = (RebirthVariables.localVariables["$varFuriousRamsayBatonsPercUnit"] / craftingLevelsList[0].categoryLevel) * 100;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
classMeleePerc["Technogeek"] = (int)perc;
|
|
|
|
for (int i = 0; i < tagNames.Count; i++)
|
|
{
|
|
if (tagNames[i].ToLower().Contains("baton"))
|
|
{
|
|
classMeleePerc["Berserker"] = (int)perc;
|
|
meleeFragmentName = "FR_ClassInfoBookTechnogeek2_icon";
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else if (key.ToLower().Contains("knuckles"))
|
|
{
|
|
List<categoryCrafting> CategoryCraftingList = RebirthVariables.localExpertiseCrafting[key];
|
|
|
|
List<craftingLevels> craftingLevelsList = CategoryCraftingList[1].levels;
|
|
|
|
float perc = (RebirthVariables.localVariables["$varFuriousRamsayKnucklesPercUnit"] / craftingLevelsList[0].categoryLevel) * 100;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
classMeleePerc["Madman"] = (int)perc;
|
|
|
|
for (int i = 0; i < tagNames.Count; i++)
|
|
{
|
|
if (tagNames[i].ToLower().Contains("knuckle"))
|
|
{
|
|
classMeleePerc["Berserker"] = (int)perc;
|
|
meleeFragmentName = "FR_ClassInfoBookMadman2_icon";
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else if (key.ToLower().Contains("hammers"))
|
|
{
|
|
List<categoryCrafting> CategoryCraftingList = RebirthVariables.localExpertiseCrafting[key];
|
|
|
|
List<craftingLevels> craftingLevelsList = CategoryCraftingList[1].levels;
|
|
|
|
float perc = (RebirthVariables.localVariables["$varFuriousRamsayHammersPercUnit"] / craftingLevelsList[0].categoryLevel) * 100;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
classMeleePerc["Builder"] = (int)perc;
|
|
|
|
for (int i = 0; i < tagNames.Count; i++)
|
|
{
|
|
if (tagNames[i].ToLower().Contains("hammer"))
|
|
{
|
|
classMeleePerc["Berserker"] = (int)perc;
|
|
meleeFragmentName = "FR_ClassInfoBookBuilder2_icon";
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else if (key.ToLower().Contains("knives"))
|
|
{
|
|
List<categoryCrafting> CategoryCraftingList = RebirthVariables.localExpertiseCrafting[key];
|
|
|
|
List<craftingLevels> craftingLevelsList = CategoryCraftingList[1].levels;
|
|
|
|
float perc = (RebirthVariables.localVariables["$varFuriousRamsayKnivesPercUnit"] / craftingLevelsList[0].categoryLevel) * 100;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
classMeleePerc["Chef"] = (int)perc;
|
|
|
|
for (int i = 0; i < tagNames.Count; i++)
|
|
{
|
|
if (tagNames[i].ToLower().Contains("knife"))
|
|
{
|
|
classMeleePerc["Berserker"] = (int)perc;
|
|
meleeFragmentName = "FR_ClassInfoBookChef2_icon";
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else if (key.ToLower().Contains("scythes"))
|
|
{
|
|
List<categoryCrafting> CategoryCraftingList = RebirthVariables.localExpertiseCrafting[key];
|
|
|
|
List<craftingLevels> craftingLevelsList = CategoryCraftingList[1].levels;
|
|
|
|
float perc = (RebirthVariables.localVariables["$varFuriousRamsayScythesPercUnit"] / craftingLevelsList[0].categoryLevel) * 100;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
classMeleePerc["WitchDoctor"] = (int)perc;
|
|
|
|
for (int i = 0; i < tagNames.Count; i++)
|
|
{
|
|
if (tagNames[i].ToLower().Contains("scythe"))
|
|
{
|
|
classMeleePerc["Berserker"] = (int)perc;
|
|
meleeFragmentName = "FR_ClassInfoBookWitchDoctor2_icon";
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue hasQuest: " + hasQuest);
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue classID: " + classID);
|
|
|
|
switch (bindingName)
|
|
{
|
|
case "isPurge":
|
|
value = (RebirthVariables.customScenario == "purge").ToString();
|
|
return true;
|
|
case "purgeBackgroundColor":
|
|
value = purgeBackgroundColor;
|
|
return true;
|
|
case "purgeBackgroundFill":
|
|
float perc = RebirthVariables.purgeDisplayPercentage;
|
|
|
|
if (perc > 100)
|
|
{
|
|
perc = 100;
|
|
}
|
|
|
|
value = (perc / 100).ToString();
|
|
return true;
|
|
case "biomeName":
|
|
value = biomeName.ToUpper();
|
|
return true;
|
|
case "purgePerc":
|
|
double num = Math.Round(RebirthVariables.purgeDisplayPercentage, 1);
|
|
|
|
if (num > 100)
|
|
{
|
|
num = 100;
|
|
}
|
|
|
|
value = num.ToString() + "%";
|
|
return true;
|
|
case "purgeLabel":
|
|
value = RebirthVariables.purgeLabel;
|
|
return true;
|
|
case "craftingItem":
|
|
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItem: " + RebirthVariables.holdingItemIcon);
|
|
if (!hasQuest)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItem 1");
|
|
if (RebirthVariables.holdingItem != "")
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItem 2");
|
|
value = "ui_game_symbol_" + RebirthVariables.holdingItemIcon;
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItem 3");
|
|
value = "";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItem 4");
|
|
if (RebirthVariables.cycleArea1 == 1)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItem 5");
|
|
if (RebirthVariables.holdingItemIcon != "")
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItem 6");
|
|
|
|
value = "ui_game_symbol_" + RebirthVariables.holdingItemIcon;
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItem 7");
|
|
value = "";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItem 8");
|
|
value = "";
|
|
}
|
|
}
|
|
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItem value: " + value);
|
|
|
|
return true;
|
|
case "craftingItemQuality":
|
|
if (!hasQuest)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItemQuality 1");
|
|
if (RebirthVariables.holdingItem != "")
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItemQuality 2");
|
|
value = RebirthVariables.holdingItemQuality.ToString();
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItemQuality 3");
|
|
value = "";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (RebirthVariables.cycleArea1 == 1)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItemQuality 4");
|
|
if (RebirthVariables.holdingItem != "")
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItemQuality 5");
|
|
value = RebirthVariables.holdingItemQuality.ToString();
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItemQuality 6");
|
|
value = "";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItemQuality 7");
|
|
value = "";
|
|
}
|
|
}
|
|
|
|
return true;
|
|
case "craftingItemColor":
|
|
if (!hasQuest)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItemColor 1");
|
|
if (RebirthVariables.holdingItem != "")
|
|
{
|
|
value = RebirthVariables.holdingItemColor;
|
|
}
|
|
else
|
|
{
|
|
value = "0,0,0,0";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (RebirthVariables.cycleArea1 == 1)
|
|
{
|
|
if (RebirthVariables.holdingItem != "")
|
|
{
|
|
value = RebirthVariables.holdingItemColor;
|
|
}
|
|
else
|
|
{
|
|
value = "0,0,0,0";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
value = "0,0,0,0";
|
|
}
|
|
}
|
|
|
|
return true;
|
|
case "craftingItemColorPerc":
|
|
if (!hasQuest)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItemColor 1");
|
|
if (RebirthVariables.holdingItem != "")
|
|
{
|
|
value = RebirthVariables.holdingItemPerc.ToString();
|
|
}
|
|
else
|
|
{
|
|
value = "0";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (RebirthVariables.cycleArea1 == 1)
|
|
{
|
|
if (RebirthVariables.holdingItem != "")
|
|
{
|
|
value = RebirthVariables.holdingItemPerc.ToString();
|
|
}
|
|
else
|
|
{
|
|
value = "0";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
value = "0";
|
|
}
|
|
}
|
|
|
|
return true;
|
|
case "shouldCraft":
|
|
if (!hasQuest)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItemColor 1");
|
|
if (RebirthVariables.holdingItem != "")
|
|
{
|
|
value = RebirthVariables.holdingItemCraftIcon;
|
|
}
|
|
else
|
|
{
|
|
value = "0";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (RebirthVariables.cycleArea1 == 1)
|
|
{
|
|
if (RebirthVariables.holdingItem != "")
|
|
{
|
|
value = RebirthVariables.holdingItemCraftIcon;
|
|
}
|
|
else
|
|
{
|
|
value = "0";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
value = "0";
|
|
}
|
|
}
|
|
|
|
return true;
|
|
case "craftingItemColorBackground":
|
|
if (!hasQuest)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue craftingItemColorBackground 1");
|
|
if (RebirthVariables.holdingItem != "")
|
|
{
|
|
value = "50,50,50,255";
|
|
}
|
|
else
|
|
{
|
|
value = "0,0,0,0";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (RebirthVariables.cycleArea1 == 1)
|
|
{
|
|
if (RebirthVariables.holdingItem != "")
|
|
{
|
|
value = "50,50,50,255";
|
|
}
|
|
else
|
|
{
|
|
value = "0,0,0,0";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
value = "0,0,0,0";
|
|
}
|
|
}
|
|
|
|
return true;
|
|
case "meleeBookFragment":
|
|
if (classID > 0)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue meleeBookFragment 1");
|
|
if (hasQuest)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue meleeBookFragment 2");
|
|
if (RebirthVariables.cycleArea1 == 0)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue meleeBookFragment 3");
|
|
if (classID == 10)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue meleeBookFragment 4");
|
|
value = meleeFragmentName;
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue meleeBookFragment 5");
|
|
value = "FR_ClassInfoBook" + genericClassName + "2_icon";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue meleeBookFragment 6");
|
|
if (playerClass > 0)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue meleeBookFragment 7");
|
|
value = "";
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue meleeBookFragment 8");
|
|
if (RebirthVariables.isCraftableItem)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue meleeBookFragment 9");
|
|
value = "";
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue meleeBookFragment 10");
|
|
if (classID == 10)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue meleeBookFragment 11");
|
|
value = meleeFragmentName;
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue meleeBookFragment 12");
|
|
value = "FR_ClassInfoBook" + genericClassName + "2_icon";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue meleeBookFragment 13");
|
|
value = "";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue meleeBookFragment ");
|
|
value = "";
|
|
}
|
|
|
|
return true;
|
|
case "rangedBookFragment":
|
|
if (classID > 0)
|
|
{
|
|
if (hasQuest)
|
|
{
|
|
if (RebirthVariables.cycleArea1 == 0)
|
|
{
|
|
value = rangedFragmentName;
|
|
}
|
|
else
|
|
{
|
|
if (RebirthVariables.isCraftableItem)
|
|
{
|
|
value = "";
|
|
}
|
|
else
|
|
{
|
|
if (playerClass > 0)
|
|
{
|
|
value = "";
|
|
}
|
|
else
|
|
{
|
|
value = rangedFragmentName;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
value = "";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
value = "";
|
|
}
|
|
|
|
return true;
|
|
case "meleeBookFragmentPerc":
|
|
if (classID > 0)
|
|
{
|
|
if (hasQuest)
|
|
{
|
|
if (RebirthVariables.cycleArea1 == 0)
|
|
{
|
|
value = classMeleePerc[genericClassName].ToString() + "%";
|
|
|
|
if (classMeleePerc[genericClassName].ToString() == "100")
|
|
{
|
|
value = "[9f5ec4]" + value + "[-]";
|
|
}
|
|
|
|
if (classID == 10 && meleeFragmentName == "")
|
|
{
|
|
value = "";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (RebirthVariables.isCraftableItem)
|
|
{
|
|
value = "";
|
|
}
|
|
else
|
|
{
|
|
if (playerClass > 0)
|
|
{
|
|
value = "";
|
|
}
|
|
else
|
|
{
|
|
value = classMeleePerc[genericClassName].ToString() + "%";
|
|
|
|
if (classMeleePerc[genericClassName].ToString() == "100")
|
|
{
|
|
value = "[9f5ec4]" + value + "[-]";
|
|
}
|
|
|
|
if (classID == 10 && meleeFragmentName == "")
|
|
{
|
|
value = "";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
value = "";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
value = "";
|
|
}
|
|
|
|
return true;
|
|
case "rangedBookFragmentPerc":
|
|
if (classID > 0 && classID != 10)
|
|
{
|
|
if (hasQuest)
|
|
{
|
|
if (RebirthVariables.cycleArea1 == 0)
|
|
{
|
|
value = classRangedPerc[genericClassName].ToString() + "%";
|
|
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue A genericClassName: " + genericClassName);
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue A value: " + value);
|
|
|
|
if (classRangedPerc[genericClassName].ToString() == "100")
|
|
{
|
|
value = "[9f5ec4]" + value + "[-]";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (RebirthVariables.isCraftableItem)
|
|
{
|
|
value = "";
|
|
}
|
|
else
|
|
{
|
|
if (playerClass > 0)
|
|
{
|
|
value = "";
|
|
}
|
|
else
|
|
{
|
|
value = classRangedPerc[genericClassName].ToString() + "%";
|
|
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue B genericClassName: " + genericClassName);
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue B value: " + value);
|
|
|
|
if (classRangedPerc[genericClassName].ToString() == "100")
|
|
{
|
|
value = "[9f5ec4]" + value + "[-]";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
value = "";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
value = "";
|
|
}
|
|
return true;
|
|
case "lootStage":
|
|
value = "";
|
|
if (this.LocalPlayer != null && XUi.IsGameRunning())
|
|
{
|
|
value = string.Format(Localization.Get("xuiLootstageDescription_FR"), (object)this.LocalPlayer.GetHighestPartyLootStage(0f, 0f).ToString());
|
|
}
|
|
|
|
return true;
|
|
case "playerLevel":
|
|
value = "";
|
|
if (this.LocalPlayer != null && XUi.IsGameRunning())
|
|
{
|
|
value = string.Format(Localization.Get("xuiPlayerLevelDescription_FR"), (object)this.LocalPlayer.Progression.Level, RebirthVariables.displayGamestageLabel);
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue value: " + value);
|
|
}
|
|
|
|
return true;
|
|
case "scenarioIcon":
|
|
value = "ui_game_symbol_fetch_loot";
|
|
if (RebirthVariables.customScenario == "purge")
|
|
{
|
|
value = "ui_game_symbol_purgesupplies";
|
|
//Log.Out("XUiC_ClassHUDRebirth-GetBindingValue value: " + value);
|
|
}
|
|
|
|
return true;
|
|
case "questProgression":
|
|
value = "";
|
|
if (this.LocalPlayer != null && XUi.IsGameRunning())
|
|
{
|
|
//int currentFactionTier = this.LocalPlayer.QuestJournal.GetCurrentFactionTier((byte)1);
|
|
//value = string.Format(Localization.Get("xuiQuestTierDescription_FR"), (object)ValueDisplayFormatters.RomanNumber(this.LocalPlayer.QuestJournal.GetCurrentFactionTier((byte)1)), (object)this.LocalPlayer.QuestJournal.GetQuestFactionPoints((byte)1), (object)this.LocalPlayer.QuestJournal.GetQuestFactionMax((byte)1, currentFactionTier));
|
|
|
|
if (RebirthVariables.customScenario == "purge")
|
|
{
|
|
//float purgeKillsIncrement = this.LocalPlayer.Buffs.GetCustomVar("$purgeKillsIncrement");
|
|
//float purgeRedeemKills = this.LocalPlayer.Buffs.GetCustomVar("$purgeRedeemKills");
|
|
//float purgeRedeemableKills = this.LocalPlayer.Buffs.GetCustomVar("$purgeRedeemableKills");
|
|
float purgeKillsTarget = RebirthVariables.purgeAirDropNumKills + (this.LocalPlayer.Buffs.GetCustomVar("$purgeKillsIncrement") * RebirthVariables.purgeAirDropNumKillsIncrement) - this.LocalPlayer.Buffs.GetCustomVar("$ModPurge") * 10;
|
|
float purgeKills = this.LocalPlayer.Buffs.GetCustomVar("$purgeKills");
|
|
float numRemaining = purgeKillsTarget - purgeKills;
|
|
|
|
if (numRemaining < 0)
|
|
{
|
|
numRemaining = 0;
|
|
}
|
|
|
|
value = $": [8568ab]{numRemaining}[-]/[a4e37d]{purgeKillsTarget}[-] {Localization.Get("ttkills")}";
|
|
}
|
|
else
|
|
{
|
|
int numQuests = RebirthVariables.customJobsToNextTier;
|
|
|
|
int questPoints = this.LocalPlayer.QuestJournal.GetQuestFactionPoints((byte)1);
|
|
int questTier = this.LocalPlayer.QuestJournal.GetCurrentFactionTier((byte)1);
|
|
|
|
int tierPoints = 0;
|
|
|
|
for (int i = 1; i <= questTier; i++)
|
|
{
|
|
tierPoints = tierPoints + (i * numQuests);
|
|
}
|
|
|
|
int pointsLeft = tierPoints - questPoints;
|
|
int jobsLeft = pointsLeft / questTier;
|
|
|
|
int numPointsLeft = tierPoints - pointsLeft;
|
|
|
|
if (pointsLeft > 0 && pointsLeft < questTier)
|
|
{
|
|
jobsLeft = 1;
|
|
}
|
|
|
|
int total = numQuests - jobsLeft;
|
|
|
|
if (total > numQuests)
|
|
{
|
|
total = numQuests;
|
|
}
|
|
|
|
value = string.Format(Localization.Get("xuiQuestTierDescription_FR"), (object)ValueDisplayFormatters.RomanNumber(this.LocalPlayer.QuestJournal.GetCurrentFactionTier((byte)1)), (object)total, (object)numQuests);
|
|
}
|
|
}
|
|
|
|
return true;
|
|
case "className":
|
|
value = className;
|
|
return true;
|
|
case "classLevel":
|
|
value = classLvl;
|
|
return true;
|
|
case "classSet":
|
|
value = classSet;
|
|
return true;
|
|
case "classPerc":
|
|
value = classPerc;
|
|
return true;
|
|
case "classBackgroundColor":
|
|
value = classBackgroundColor;
|
|
return true;
|
|
case "classBackgroundFill":
|
|
value = classBackgroundFill;
|
|
return true;
|
|
case "perk1Name":
|
|
value = perk1Name;
|
|
return true;
|
|
case "perk2Name":
|
|
value = perk2Name;
|
|
return true;
|
|
case "perk3Name":
|
|
value = perk3Name;
|
|
return true;
|
|
case "perk1Level":
|
|
value = perk1Lvl;
|
|
return true;
|
|
case "perk2Level":
|
|
value = perk2Lvl;
|
|
return true;
|
|
case "perk3Level":
|
|
value = perk3Lvl;
|
|
return true;
|
|
case "perk1Perc":
|
|
value = perk1Perc;
|
|
return true;
|
|
case "perk2Perc":
|
|
value = perk2Perc;
|
|
return true;
|
|
case "perk3Perc":
|
|
value = perk3Perc;
|
|
return true;
|
|
case "perk1Visible":
|
|
value = "false";
|
|
if (perk1Name.Trim().Length > 0)
|
|
{
|
|
value = "true";
|
|
}
|
|
return true;
|
|
case "perk2Visible":
|
|
value = "false";
|
|
if (perk2Name.Trim().Length > 0)
|
|
{
|
|
value = "true";
|
|
}
|
|
return true;
|
|
case "perk3Visible":
|
|
value = "false";
|
|
if (perk3Name.Trim().Length > 0)
|
|
{
|
|
value = "true";
|
|
}
|
|
return true;
|
|
case "strengthLvl":
|
|
value = ((int)RebirthVariables.localVariables["$varFuriousRamsayStrengthPercUnit"]).ToString();
|
|
return true;
|
|
case "dexterityLvl":
|
|
value = ((int)RebirthVariables.localVariables["$varFuriousRamsayDexterityPercUnit"]).ToString();
|
|
return true;
|
|
case "constitutionLvl":
|
|
value = ((int)RebirthVariables.localVariables["$varFuriousRamsayConstitutionPercUnit"]).ToString();
|
|
return true;
|
|
case "intelligenceLvl":
|
|
value = ((int)RebirthVariables.localVariables["$varFuriousRamsayIntelligencePercUnit"]).ToString();
|
|
return true;
|
|
case "charismaLvl":
|
|
value = ((int)RebirthVariables.localVariables["$varFuriousRamsayCharismaPercUnit"]).ToString();
|
|
return true;
|
|
case "strengthPerc":
|
|
value = (RebirthVariables.localVariables["$varFuriousRamsayStrengthPercUnit"] % 1).ToString();
|
|
return true;
|
|
case "dexterityPerc":
|
|
value = (RebirthVariables.localVariables["$varFuriousRamsayDexterityPercUnit"] % 1).ToString();
|
|
return true;
|
|
case "constitutionPerc":
|
|
value = (RebirthVariables.localVariables["$varFuriousRamsayConstitutionPercUnit"] % 1).ToString();
|
|
return true;
|
|
case "intelligencePerc":
|
|
value = (RebirthVariables.localVariables["$varFuriousRamsayIntelligencePercUnit"] % 1).ToString();
|
|
return true;
|
|
case "charismaPerc":
|
|
value = (RebirthVariables.localVariables["$varFuriousRamsayCharismaPercUnit"] % 1).ToString();
|
|
return true;
|
|
case "rampageNum":
|
|
value = rampageNum;
|
|
return true;
|
|
case "naturalSelectionPos":
|
|
if (RebirthVariables.customScenario == "purge")
|
|
{
|
|
value = "95";
|
|
return true;
|
|
}
|
|
|
|
value = "108";
|
|
return true;
|
|
case "naturalSelectionLabel":
|
|
if (RebirthVariables.customScenario == "purge")
|
|
{
|
|
value = Localization.Get("PurgedLabel");
|
|
return true;
|
|
}
|
|
|
|
value = Localization.Get("NaturalSelectionLabel");
|
|
return true;
|
|
case "naturalSelectionNum":
|
|
if (this.LocalPlayer != null && RebirthVariables.customScenario == "purge")
|
|
{
|
|
//value = this.LocalPlayer.Buffs.GetCustomVar("$totalPurgeKills").ToString() + " ([8568ab]" + this.LocalPlayer.Buffs.GetCustomVar("$purgeKills").ToString() + "[-])";
|
|
value = this.LocalPlayer.Buffs.GetCustomVar("$totalPurgeKills").ToString();
|
|
return true;
|
|
}
|
|
|
|
value = naturalSelectionNum;
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public override void OnOpen()
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-OnOpen START");
|
|
base.OnOpen();
|
|
if (this.LocalPlayer == null && XUi.IsGameRunning())
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-OnOpen 1");
|
|
this.LocalPlayer = this.xui.playerUI.entityPlayer;
|
|
}
|
|
this.IsDirty = true;
|
|
this.RefreshBindings(true);
|
|
}
|
|
|
|
private float currentTime;
|
|
public override void Update(float _dt)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-Update START");
|
|
this.currentTime -= _dt;
|
|
base.Update(_dt);
|
|
if (this.LocalPlayer == null)
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-Update 1");
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
//Log.Out("XUiC_ClassHUDRebirth-Update 2");
|
|
this.RefreshBindings(true);
|
|
}
|
|
}
|
|
}
|