Advertisement
Nik

ExEventMatchMessage

Nik
Jan 10th, 2014
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.81 KB | None | 0 0
  1. package l2r.gameserver.network.serverpackets;
  2.  
  3. public class ExEventMatchMessage extends L2GameServerPacket
  4. {
  5.     public enum EventMatchMessage
  6.     {
  7.         CUSTOM_TEXT,
  8.         FINISH,
  9.         START,
  10.         GAME_OVER,
  11.         ONE,
  12.         TWO,
  13.         THREE,
  14.         FOUR,
  15.         FIVE
  16.     }
  17.    
  18.     String _message;
  19.     EventMatchMessage _type;
  20.    
  21.     /**
  22.      *
  23.      * @param message - 77 max chars prefered, else the message gets cut-off.
  24.      */
  25.     public ExEventMatchMessage(String message)
  26.     {
  27.         _message = message;
  28.         _type = EventMatchMessage.CUSTOM_TEXT;
  29.     }
  30.    
  31.     public ExEventMatchMessage(EventMatchMessage message)
  32.     {
  33.         _message = "";
  34.         _type = message;
  35.     }
  36.    
  37.     @Override
  38.     protected void writeImpl()
  39.     {
  40.         writeEx(0x0F);
  41.         writeC(_type.ordinal()); // 0 - custom text, 1 - Finish, 2 - Start, 3 - Game Over, 4 - 1, 5 - 2, 6 - 3, 7 - 4, 8 - 5
  42.         writeS(_message);
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement