Esempio n. 1
0
  public static String parseMPtoGuild(int GuildID) {
    Guild G = World.getGuild(GuildID);
    byte enclosMax = (byte) Math.floor(G.get_lvl() / 10);
    StringBuilder packet = new StringBuilder();
    packet.append(enclosMax);

    for (Entry<Short, Carte.MountPark> mp : MountPark.entrySet()) {
      if (mp.getValue().get_guild() != null && mp.getValue().get_guild().get_id() == GuildID) {
        packet
            .append("|")
            .append(mp.getValue().get_map().get_id())
            .append(";")
            .append(mp.getValue().get_size())
            .append(";")
            .append(mp.getValue().getObjectNumb()); // Nombre d'objets pour le dernier
      } else {
        continue;
      }
    }
    return packet.toString();
  }
Esempio n. 2
0
 public static boolean guildNameIsUsed(String name) {
   for (Guild g : Guildes.values()) if (g.get_name().equalsIgnoreCase(name)) return true;
   return false;
 }
Esempio n. 3
0
 public static boolean guildEmblemIsUsed(String emb) {
   for (Guild g : Guildes.values()) {
     if (g.get_emblem().equals(emb)) return true;
   }
   return false;
 }
Esempio n. 4
0
 public static void addGuild(Guild g, boolean save) {
   Guildes.put(g.get_id(), g);
   if (save) SQLManager.SAVE_NEWGUILD(g);
 }