Examples of MessageC2SChooseCharacter


Examples of marauroa.common.net.message.MessageC2SChooseCharacter

   *             if timeout happens while waiting for the message.
   * @throws BannedAddressException
   */
  public synchronized boolean chooseCharacter(String character) throws TimeoutException,
          InvalidVersionException, BannedAddressException {
    Message msgCC = new MessageC2SChooseCharacter(null, character);
    netMan.addMessage(msgCC);

    int received = 0;

    while (received != 1) {
View Full Code Here

Examples of marauroa.common.net.message.MessageC2SChooseCharacter

   * @param message
   *            The ChooseCharacter message
   */
  @Override
  public void process(Message message) {
    MessageC2SChooseCharacter msg = (MessageC2SChooseCharacter) message;
    try {
      int clientid = msg.getClientID();

      PlayerEntry entry = playerContainer.get(clientid);

      /*
       * verify event so that we can trust that it comes from our player
       * and that it has completed the login stage.
       */
      if (!isValidEvent(msg, entry, ClientState.LOGIN_COMPLETE)) {
        return;
      }

      /* We set the character in the entry info */
      entry.character = msg.getCharacter();

      PlayerEntry oldEntry = playerContainer.getOldEntry(entry);
      if ((oldEntry != null) && (oldEntry.state == ClientState.GAME_BEGIN)) {
        reownOldEntry(oldEntry, entry);
        return;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.