public void GetLevelTest() { Database.LoadExperienceTable(); Assert.AreEqual(63, SkillsController.GetLevel(407014)); Assert.AreEqual(64, SkillsController.GetLevel(407015)); Assert.AreEqual(64, SkillsController.GetLevel(407016)); Assert.AreEqual(99, SkillsController.GetLevel(13034431)); Assert.AreEqual(125, SkillsController.GetLevel(171077457)); Assert.AreEqual(126, SkillsController.GetLevel(188884740)); Assert.AreEqual(126, SkillsController.GetLevel(200000000)); }
private void SimEvents(Skill skill, string skillName) { EventManager.Instance.SkillButtonClicked(skillName); EventManager.Instance.XpGained(skill.xp); int newLvl = SkillsController.GetLevel(skill.xp); skill.currentLevel = newLvl; if (skill.boostedLevel < skill.currentLevel) { skill.boostedLevel = skill.currentLevel; } int totalLvl = skillsController.GetTotalLevel(); EventManager.Instance.LevelUp(skill.skillName, skill.currentLevel, totalLvl); }