Class EventService


  • @Service
    public class EventService
    extends java.lang.Object
    Event related utility methods. Created by andi on 25.03.17.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private com.google.common.eventbus.AsyncEventBus clientServerEventBus  
      private java.util.Random rnd  
    • Constructor Summary

      Constructors 
      Constructor Description
      EventService()  
    • Field Detail

      • rnd

        @Autowired
        private java.util.Random rnd
      • clientServerEventBus

        @Autowired
        @Qualifier("serverClientEventBus")
        private com.google.common.eventbus.AsyncEventBus clientServerEventBus
    • Constructor Detail

      • EventService

        public EventService()
    • Method Detail

      • calculateSpouseDeath

        public java.util.Optional<ISpouseData> calculateSpouseDeath​(IPlayer player,
                                                                    ICity city)
      • postToHumanPlayer

        public void postToHumanPlayer​(IDialogState state,
                                      IPlayer player,
                                      java.lang.String messageKey,
                                      java.lang.Object... messageParams)
        Post a message that will end up in the message queue.
        Parameters:
        state - dialog state for the display message
        player - player to whom the message is posted
        messageKey - text key of the display state message
        messageParams - message parameters for the message