Class RPEvent

All Implemented Interfaces:
Cloneable, Iterable<String>, Serializable
Direct Known Subclasses:
AttackEvent, BestiaryEvent, BuddyLoginEvent, BuddyLogoutEvent, ExamineEvent, GlobalVisualEffectEvent, GroupChangeEvent, GroupInviteEvent, HealedEvent, ImageEffectEvent, PlayerLoggedOnEvent, PlayerLoggedOutEvent, PrivateTextEvent, ProgressStatusEvent, ReachedAchievementEvent, ShowItemListEvent, ShowOutfitListEvent, SoundEvent, TextEvent, TradeStateChangeEvent, TransitionGraphEvent, ViewChangeEvent

public class RPEvent extends SlotOwner
This class implements an event. It is something that happens along the turn duration and it is hard to represent as an attribute because it just happen and disappear after that or because it happens several times per turn.

One interesting example of this would be private chat.
When you write private messages, it is added inside the target player, but you can't represent that as an attribute because it two private chat messages happen at the same time, one of them would be lost.

So solution to this problem is add each them as RPEvent.

A RPEvent is always linked to an RPObject.

Author:
miguel, hendrik
  • Constructor Details

    • RPEvent

      public RPEvent(String name)
      Constructor
      Parameters:
      name - name of this RPEvent
    • RPEvent

      public RPEvent()
      Constructor
  • Method Details

    • clone

      public Object clone()
      This method create a copy of the slot
      Overrides:
      clone in class Attributes
    • fill

      public void fill(RPEvent event)
      Copy constructor
      Parameters:
      event - the object that is going to be copied.
    • setOwner

      public void setOwner(RPObject owner)
      Set the owner of this RPEvent.
      Parameters:
      owner -
    • getName

      public String getName()
      Return the name of the event
      Returns:
      name of the event
    • writeObject

      public void writeObject(OutputSerializer out) throws IOException
      Description copied from class: Attributes
      This method serialize the object with the default level of detail, that removes private and hidden attributes
      Specified by:
      writeObject in interface Serializable
      Overrides:
      writeObject in class Attributes
      Parameters:
      out - the output serializer
      Throws:
      IOException - in case of an IO-error
    • writeObject

      public void writeObject(OutputSerializer out, DetailLevel level) throws IOException
      Serialize
      Overrides:
      writeObject in class Attributes
      Parameters:
      out - the output serializer.
      level - the detail level of the serialization
      Throws:
      IOException - in case of an IO error
    • readObject

      public void readObject(InputSerializer in) throws IOException
      Deserialize
      Specified by:
      readObject in interface Serializable
      Overrides:
      readObject in class Attributes
      Parameters:
      in - the input serializer
      Throws:
      IOException - in case of unexpected attributes
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Attributes
    • equals

      public boolean equals(Object obj)
      Returns true if two objects are exactly equal
      Overrides:
      equals in class Attributes
      Parameters:
      obj - the object to compare with this one.
      Returns:
      true if they are equal, or false otherwise.
    • toString

      public String toString()
      Description copied from class: Attributes
      This method returns a String that represent the object
      Overrides:
      toString in class SlotOwner
      Returns:
      a string representing the object.