Esempio n. 1
0
  public PlayerProfile(String playerName, boolean addNew) {
    this.playerName = playerName;
    party = PartyManager.getInstance().getPlayerParty(playerName);

    for (AbilityType abilityType : AbilityType.values()) {
      skillsDATS.put(abilityType, 0);
    }

    for (SkillType skillType : SkillType.values()) {
      if (skillType != SkillType.ALL) {
        skills.put(skillType, 0);
        skillsXp.put(skillType, 0);
      }
    }

    if (Config.getInstance().getUseMySQL()) {
      if (!loadMySQL() && addNew) {
        addMySQLPlayer();
        loaded = true;
      }
    } else if (!load() && addNew) {
      addPlayer();
      loaded = true;
    }
  }
Esempio n. 2
0
 /** Reset the prep modes of all tools. */
 public void resetAbilityMode() {
   for (AbilityType ability : AbilityType.values()) {
     setAbilityMode(ability, false);
   }
 }