Advertisement
Nik

ExPVPMatchCCRecord

Nik
Jan 11th, 2014
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.20 KB | None | 0 0
  1. package l2r.gameserver.network.serverpackets;
  2.  
  3. import java.util.List;
  4.  
  5. /**
  6.  * @author VISTALL
  7.  */
  8. public class ExPVPMatchCCRecord extends L2GameServerPacket
  9. {
  10.    
  11.     public enum PvPMatchRecordAction
  12.     {
  13.         SHOW_WITH_BUTTON, // Shows window and leaves unclosable button which can open the window again.
  14.         UPDATE, // Updates the window only when its closed. Its used when the player clicks on the button to view the updated score.
  15.         SHOW_WITHOUT_BUTTON // Shows window and removes the unclosable button.
  16.     }
  17.    
  18.     private final PvPMatchRecordAction _action;
  19.     private final List<PlayerPoints> _playerPoints;
  20.    
  21.     public ExPVPMatchCCRecord(PvPMatchRecordAction action, List<PlayerPoints> playerPoints)
  22.     {
  23.         _action = action;
  24.         _playerPoints = playerPoints;
  25.     }
  26.  
  27.     @Override
  28.     public void writeImpl()
  29.     {
  30.         writeEx(0x89);
  31.         writeD(_action.ordinal());
  32.         writeD(_playerPoints.size());
  33.         for(PlayerPoints pp : _playerPoints)
  34.         {
  35.             writeS(pp.playerName);
  36.             writeD(pp.killPoints);
  37.         }
  38.     }
  39.    
  40.     public static class PlayerPoints
  41.     {
  42.         String playerName;
  43.         int killPoints;
  44.        
  45.         public PlayerPoints(String playerName, int killPoints)
  46.         {
  47.             this.playerName = playerName;
  48.             this.killPoints = killPoints;
  49.         }
  50.     }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement