Exemplo n.º 1
0
  /** Modification d'un troll */
  @Override
  public String greetServer(String id, Troll troll) throws IllegalArgumentException {
    // TODO Auto-generated method stub

    // On met a jour les informations
    list.get(troll.getId()).setAttaque(troll.getAttaque());
    list.get(troll.getId()).setDegats(troll.getDegats());
    list.get(troll.getId()).setEsquive(troll.getEsquive());
    list.get(troll.getId()).setNom(troll.getNom());
    list.get(troll.getId()).setRace(troll.getRace());
    list.get(troll.getId()).setRegeneration(troll.getRegeneration());
    list.get(troll.getId()).setURL(troll.getURL());
    list.get(troll.getId()).setVie(troll.getVie());
    list.get(troll.getId()).setComptence1(troll.getComptence1());
    list.get(troll.getId()).setComptence2(troll.getComptence2());
    XMLtools.ecrire(list, this.getServletContext().getRealPath(filePath)); // On réécri le XML
    return "OK";
  }