private void SetEntreeExpTooltip(bool?isBlack = null) { for (int i = 0; i < 2; i++) { if (isBlack == true) { continue; } var nud_lvl = i == 0 ? NUD_EntreeWhiteLV : NUD_EntreeBlackLV; var nud_exp = i == 0 ? NUD_EntreeWhiteEXP : NUD_EntreeBlackEXP; var lv = (int)nud_lvl.Value; var totalExp = FestaBlock5.GetTotalEntreeExp(lv); totalExp += (int)nud_exp.Value; var expToLevelUp = lv == 999 ? -1 : FestaBlock5.GetExpNeededForLevelUp(lv) - (int)nud_exp.Value; var tip0 = $"{(i == 0 ? "White" : "Black")} LV {lv}{Environment.NewLine}" + $"Exp.Points: {totalExp}{Environment.NewLine}" + $"To Next Lv: {expToLevelUp}"; // Reset tooltip var tip = i == 0 ? TipExpW : TipExpB; tip.RemoveAll(); tip.SetToolTip(nud_lvl, tip0); tip.SetToolTip(nud_exp, tip0); } }
private void SetNudMax(bool?isBlack = null) { if (isBlack == true) { return; } for (int i = 0; i < 2; i++) { var nud_lvl = i == 0 ? NUD_EntreeWhiteLV : NUD_EntreeBlackLV; var nud_exp = i == 0 ? NUD_EntreeWhiteEXP : NUD_EntreeBlackEXP; var lv = (int)nud_lvl.Value; var expmax = FestaBlock5.GetExpNeededForLevelUp(lv) - 1; if (nud_exp.Value > expmax) { nud_exp.Value = expmax; } nud_exp.Maximum = expmax; } }