RuneHive-Game
Loading...
Searching...
No Matches
SendItemOnInterfaceZoom.java
Go to the documentation of this file.
1package com.runehive.net.packet.out;
2
3import com.runehive.net.codec.ByteOrder;
4import com.runehive.game.world.entity.mob.player.Player;
5import com.runehive.net.packet.OutgoingPacket;
6
7/**
8 * Handles sending the SendItemOnInterfaceZoom packet.
9 *
10 * @author Daniel
11 */
13
14 private final int id;
15 private final int zoom;
16 private final int model;
17
18 public SendItemOnInterfaceZoom(int id, int zoom, int model) {
19 super(246, 6);
20 this.id = id;
21 this.zoom = zoom;
22 this.model = model;
23 }
24
25 @Override
26 public boolean encode(Player player) {
27 builder.writeShort(id, ByteOrder.LE)
28 .writeShort(zoom)
29 .writeShort(model);
30 return true;
31 }
32}
This class represents a character controlled by a player.
Definition Player.java:125
OutgoingPacket(int opcode, int capacity)
Represents the order in which bytes are written.
Definition ByteOrder.java:8
LE
Represents Little-endian.