Пример #1
0
  public void sendResponse(EventResponse Message) {
    if (Grizzly.getConfig().get("net.grizzly.packetlog").equals("1")) {
      Grizzly.write("[" + Message.header() + "] " + Message.body() + " sent by " + this.ip());
      Grizzly.write("[" + Message.header() + "] " + Message.SimpleResponse);
    }

    this.Channel.write(Message);
  }
Пример #2
0
 public void effect(int EffectID) {
   this.CurrentEffect = EffectID;
   EventResponse Message = new EventResponse();
   Message.Initialize(HeaderLibrary.SendRoomEffectEvent);
   Message.addInt(Integer.valueOf(this.getHabbo().getID()));
   Message.addInt(Integer.valueOf(this.CurrentEffect));
   Message.addInt(Integer.valueOf(0));
   this.getActor().CurrentRoom.sendMessage(Message);
 }
  public static EventResponse compose(MessengerHandler Handler) {
    EventResponse Message = new EventResponse();
    Message.Initialize(HeaderLibrary.InitializePendingFriendRequestsEvent);
    Message.addInt(Integer.valueOf(Handler.GrabRequests().size()));
    Message.addInt(Integer.valueOf(Handler.GrabRequests().size()));
    Iterator var3 = Handler.GrabRequests().values().iterator();

    while (var3.hasNext()) {
      User mUser = (User) var3.next();
      Message.addInt(Integer.valueOf(mUser.getID()));
      Message.addString(mUser.getUsername());
      Message.addString(mUser.getLook());
    }

    return Message;
  }
Пример #4
0
 public static EventResponse compose(int ID) {
   EventResponse Message = new EventResponse();
   Message.Initialize(HeaderLibrary.RemoveRoomItemEvent);
   Message.addString(Integer.valueOf(ID));
   return Message;
 }