示例#1
0
 public void removeAll_ExepteObvijevanStats() {
   setObvijevanPos(0);
   Personnage.Stats StatsSansObvi = new Personnage.Stats();
   for (Map.Entry<Integer, Integer> entry : Stats.getMap().entrySet()) {
     int statID = ((Integer) entry.getKey()).intValue();
     if ((statID != 971) && (statID != 972) && (statID != 973) && (statID != 974)) continue;
     StatsSansObvi.addOneStat(statID, ((Integer) entry.getValue()).intValue());
   }
   Stats = StatsSansObvi;
 }
示例#2
0
  public void parseStringToStats(String strStats) {
    String[] split = strStats.split(",");
    for (String s : split) {
      try {
        String[] stats = s.split("#");
        int statID = Integer.parseInt(stats[0], 16);

        // Stats spécials
        if (statID == 997 || statID == 996) {
          txtStats.put(statID, stats[4]);
          continue;
        }
        // Si stats avec Texte (Signature, apartenance, etc)
        if ((!stats[3].equals("") && !stats[3].equals("0"))) {
          txtStats.put(statID, stats[3]);
          continue;
        }

        String jet = stats[4];
        boolean follow = true;
        for (int a : Constants.ARMES_EFFECT_IDS) {
          if (a == statID) {
            int id = statID;
            String min = stats[1];
            String max = stats[2];
            String args = min + ";" + max + ";-1;-1;0;" + jet;
            Effects.add(new SpellEffect(id, args, 0, -1));
            follow = false;
          }
        }
        if (!follow) continue; // Si c'était un effet Actif d'arme ou une signature
        int value = Integer.parseInt(stats[1], 16);
        Stats.addOneStat(statID, value);
      } catch (Exception e) {
        continue;
      }
      ;
    }
  }