public void GainExperience(long amount) { if (Banking.GetSkillLevelUnboosted() >= AutoCollectLevel) { return; } Banking.Experience += amount; if (Banking.Experience >= (long)Skill.GetExperienceRequired(Banking.GetSkillLevelUnboosted())) { LevelUp(); } }
public void LevelUp() { if (Banking.GetSkillLevelUnboosted() >= AutoCollectLevel) { return; } if (Banking.GetSkillLevelUnboosted() % 2 == 0) { MessageManager.AddMessage(Name + " leveled up! Their banking level is now " + Banking.GetSkillLevelUnboosted() + "."); InventorySize++; Inventory.IncreaseMaxSizeBy(1); } else { MessageManager.AddMessage(Name + " leveled up!"); } Banking.SetSkillLevel(Banking.GetSkillLevelUnboosted() + 1); if (Banking.Experience >= Skill.GetExperienceRequired(Banking.GetSkillLevelUnboosted())) { LevelUp(); } }