Package com.aldaviva.autorpg.data.entities

Examples of com.aldaviva.autorpg.data.entities.Quest


  private CharacterItemManager characterItemManager;
 
  @Transactional
  public Quest start(){
    try {
      Quest quest = Quest.findRandomByInactive();
   
      List<Character> characters = Character.findRandomByOnline(Quest.CHARACTERS_PER_QUEST);
      quest.setCharacters(new HashSet<Character>(characters));
      for(Character character : quest.getCharacters()){
        character.setQuest(quest);
      }
      quest.setExpRemaining(quest.getExpTotal());
      quest.setStep(1);
      stepReached(quest);
     
      bulletinManager.publish(stepReached(quest));
     
      quest.merge();
     
      return quest;
    } catch (NotEnoughPlayersError e) {
      return null;
    } catch (EmptyResultDataAccessException e){
View Full Code Here

TOP

Related Classes of com.aldaviva.autorpg.data.entities.Quest

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.