Package marauroa.common.game

Examples of marauroa.common.game.Result


          logger.warn("invalid create character event (client unknown, not logged in or wrong ip-address)");
          return;
        }
        int maxNumberOfCharacters = Configuration.getConfiguration().getInt("limit_characters_per_account", Integer.MAX_VALUE);
        if (entry.characterCounter >= maxNumberOfCharacters) {
          Result result = Result.FAILED_TOO_MANY;
          MessageS2CCreateCharacterNACK msgCreateCharacterNACK = new MessageS2CCreateCharacterNACK(channel, result);
          msgCreateCharacterNACK.setClientID(clientid);
          msgCreateCharacterNACK.setProtocolVersion(protocolVersion);
          netMan.sendMessage(msgCreateCharacterNACK);
          return;
View Full Code Here


     * We request the creation of an character for a logged player. It
     * will also return a result of the character that we must forward to
     * player.
     */
    CharacterResult val = rpMan.createCharacter(username, character, template, address);
    Result result = val.getResult();

    if (result == Result.OK_CREATED) {
      /*
       * If the character is created notify player and send him a
       * Character list message.
View Full Code Here

      /*
       * We request RP Manager to create an account for our player. This
       * will return a <b>result</b> of the operation.
       */
      AccountResult val = rpMan.createAccount(username, pasword, email, address);
      Result result = val.getResult();

      if (result == Result.OK_CREATED) {
        /*
         * If result is OK then the account was created and we notify
         * player about that.
View Full Code Here

   * Executes all validators until one fails or all are completed.
   *
   * @return Result in case of an error, null in case of success
   */
  public Result runValidators() {
    Result result = null;
    for (final AccountParameterValidator validator : this) {
      result = validator.validate();
      if (result != null) {
        break;
      }
View Full Code Here

   * tries to create this character.
   *
   * @return CharacterResult
   */
  public CharacterResult create() {
    final Result result = validators.runValidators();
    if (result != null) {
      return new CharacterResult(result, character, template);
    }

    final TransactionPool transactionPool = SingletonRepository.getTransactionPool();
View Full Code Here

   * tries to create this account.
   *
   * @return AccountResult
   */
  public AccountResult create() {
    final Result result = validate();
    if (result != null) {
      return new AccountResult(result, username);
    }

    return insertIntoDatabase();
View Full Code Here

   */
  private Result validate() {
    final AccountCreationRules rules = new AccountCreationRules(username,
        password, email);
    final ValidatorList validators = rules.getAllRules();
    final Result result = validators.runValidators();
    return result;
  }
View Full Code Here

TOP

Related Classes of marauroa.common.game.Result

Copyright © 2018 www.massapicom. 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.