internal long XPRequired(int level, int tier) { if (level >= 10) { tier++; } else { level++; } return(Quadratic.F_longQuad(level * (tier + 1), 13, 0, 0)); }
internal void GainXP(long amount) { if (amount < 0 || essence.tier < Tier) { return; } long req = Quadratic.F_longQuad(level + 1, ReferenceData.xpToLvlAbility * (Tier + 1), 0, 0); while (xp >= req) { level++; xp -= req; req = Quadratic.F_longQuad(level + 1, ReferenceData.xpToLvlAbility * (Tier + 1), 0, 0); } }