Exemplo n.º 1
0
 public static void parseDefense(Personnage perso) {
   for (Prisme Prisme : World.AllPrisme()) {
     if ((Prisme._inFight == 0 || Prisme._inFight == -2)
         && perso.get_align() == Prisme.getalignement()) {
       SocketManager.SEND_CP_INFO_DEFENSEURS_PRISME(
           perso, DefenseursDuPrisme(Prisme._id, Prisme._Carte, Prisme._FightID));
     }
   }
 }
Exemplo n.º 2
0
 public static void parseAttack(Personnage perso) {
   for (Prisme Prisme : World.AllPrisme()) {
     if ((Prisme._inFight == 0 || Prisme._inFight == -2)
         && perso.get_align() == Prisme.getalignement()) {
       SocketManager.SEND_Cp_INFO_ATTAQUANT_PRISME(
           perso, AttaquantsDuPrisme(Prisme._id, Prisme._Carte, Prisme._FightID));
     }
   }
 }
Exemplo n.º 3
0
 /*
  TODO : Gestion du paquet Af + position dans la file d'attente.
 */
 public static void PendingSystem(Compte C) {
   if (C == null) return;
   if (C._position <= 1) {
     try {
       Thread.sleep(750);
       if (C == null || C.getRealmThread()._out == null) return;
       SocketManager.MULTI_SEND_Af_PACKET(
           C.getRealmThread()._out,
           1,
           RealmServer._totalAbo,
           RealmServer._totalNonAbo,
           "" + 1,
           RealmServer._queueID);
       C._position = -1;
       RealmServer._totalAbo--;
     } catch (InterruptedException e) {
       SocketManager.REALM_SEND_ALREADY_CONNECTED(C.getRealmThread()._out);
       RealmServer.addToLog("Erreur : " + e.getMessage());
     }
   } else {
     try {
       Thread.sleep(750 * C._position);
       if (C == null || C.getRealmThread()._out == null) return;
       SocketManager.MULTI_SEND_Af_PACKET(
           C.getRealmThread()._out,
           1,
           RealmServer._totalAbo,
           RealmServer._totalNonAbo,
           "" + 1,
           RealmServer._queueID);
       C._position = -1;
       RealmServer._totalAbo--;
     } catch (InterruptedException e) {
       SocketManager.REALM_SEND_ALREADY_CONNECTED(C.getRealmThread()._out);
       RealmServer.addToLog("Erreur : " + e.getMessage());
     }
   }
 }