NpcPlayerServerPacket
in package
Main NPC update message
Table of Contents
Properties
- $attacks : array<string|int, NpcUpdateAttack>
- $chats : array<string|int, NpcUpdateChat>
- $positions : array<string|int, NpcUpdatePosition>
- $byteSize : int
- $hp : int
- $tp : int
Methods
- __toString() : string
- Returns a string representation of the object.
- action() : int
- Returns the packet action associated with this packet.
- deserialize() : NpcPlayerServerPacket
- Deserializes an instance of `NpcPlayerServerPacket` from the provided `EoReader`.
- family() : int
- Returns the packet family associated with this packet.
- getAttacks() : array<string|int, NpcUpdateAttack>
- getByteSize() : int
- Returns the size of the data that this was deserialized from.
- getChats() : array<string|int, NpcUpdateChat>
- getHp() : int
- getPositions() : array<string|int, NpcUpdatePosition>
- getTp() : int
- serialize() : void
- Serializes an instance of `NpcPlayerServerPacket` to the provided `EoWriter`.
- setAttacks() : void
- setByteSize() : void
- Sets the size of the data that this was deserialized from.
- setChats() : void
- setHp() : void
- setPositions() : void
- setTp() : void
- write() : void
- Serializes and writes this packet to the provided EoWriter.
Properties
$attacks
public
array<string|int, NpcUpdateAttack>
$attacks
= []
$chats
public
array<string|int, NpcUpdateChat>
$chats
= []
$positions
public
array<string|int, NpcUpdatePosition>
$positions
= []
$byteSize
private
int
$byteSize
= 0
$hp
private
int
$hp
$tp
private
int
$tp
Methods
__toString()
Returns a string representation of the object.
public
__toString() : string
Return values
stringaction()
Returns the packet action associated with this packet.
public
static action() : int
Return values
int —The packet action associated with this packet.
deserialize()
Deserializes an instance of `NpcPlayerServerPacket` from the provided `EoReader`.
public
static deserialize(EoReader $reader) : NpcPlayerServerPacket
Parameters
- $reader : EoReader
-
The reader that the data will be deserialized from.
Return values
NpcPlayerServerPacket —The deserialized data.
family()
Returns the packet family associated with this packet.
public
static family() : int
Return values
int —The packet family associated with this packet.
getAttacks()
public
getAttacks() : array<string|int, NpcUpdateAttack>
Return values
array<string|int, NpcUpdateAttack>getByteSize()
Returns the size of the data that this was deserialized from.
public
getByteSize() : int
Return values
int —The size of the data that this was deserialized from.
getChats()
public
getChats() : array<string|int, NpcUpdateChat>
Return values
array<string|int, NpcUpdateChat>getHp()
public
getHp() : int
Return values
intgetPositions()
public
getPositions() : array<string|int, NpcUpdatePosition>
Return values
array<string|int, NpcUpdatePosition>getTp()
public
getTp() : int
Return values
intserialize()
Serializes an instance of `NpcPlayerServerPacket` to the provided `EoWriter`.
public
static serialize(EoWriter $writer, NpcPlayerServerPacket $data) : void
Parameters
- $writer : EoWriter
-
The writer that the data will be serialized to.
- $data : NpcPlayerServerPacket
-
The data to serialize.
setAttacks()
public
setAttacks(array<string|int, NpcUpdateAttack> $attacks) : void
Parameters
- $attacks : array<string|int, NpcUpdateAttack>
setByteSize()
Sets the size of the data that this was deserialized from.
public
setByteSize(int $byteSize) : void
Parameters
- $byteSize : int
-
The size of the data that this was deserialized from.
setChats()
public
setChats(array<string|int, NpcUpdateChat> $chats) : void
Parameters
- $chats : array<string|int, NpcUpdateChat>
setHp()
public
setHp(int $hp) : void
Parameters
- $hp : int
setPositions()
public
setPositions(array<string|int, NpcUpdatePosition> $positions) : void
Parameters
- $positions : array<string|int, NpcUpdatePosition>
setTp()
public
setTp(int $tp) : void
Parameters
- $tp : int
write()
Serializes and writes this packet to the provided EoWriter.
public
write(EoWriter $writer) : void
Parameters
- $writer : EoWriter
-
The writer that this packet will be written to.