ShopOpenServerPacket
in package
Response from talking to a shop NPC
Table of Contents
Properties
- $craftItems : array<string|int, ShopCraftItem>
- $tradeItems : array<string|int, ShopTradeItem>
- $byteSize : int
- $sessionId : int
- $shopName : string
Methods
- __toString() : string
- Returns a string representation of the object.
- action() : int
- Returns the packet action associated with this packet.
- deserialize() : ShopOpenServerPacket
- Deserializes an instance of `ShopOpenServerPacket` from the provided `EoReader`.
- family() : int
- Returns the packet family associated with this packet.
- getByteSize() : int
- Returns the size of the data that this was deserialized from.
- getCraftItems() : array<string|int, ShopCraftItem>
- getSessionId() : int
- getShopName() : string
- getTradeItems() : array<string|int, ShopTradeItem>
- serialize() : void
- Serializes an instance of `ShopOpenServerPacket` to the provided `EoWriter`.
- setByteSize() : void
- Sets the size of the data that this was deserialized from.
- setCraftItems() : void
- setSessionId() : void
- setShopName() : void
- setTradeItems() : void
- write() : void
- Serializes and writes this packet to the provided EoWriter.
Properties
$craftItems
public
array<string|int, ShopCraftItem>
$craftItems
= []
$tradeItems
public
array<string|int, ShopTradeItem>
$tradeItems
= []
$byteSize
private
int
$byteSize
= 0
$sessionId
private
int
$sessionId
$shopName
private
string
$shopName
= ""
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 `ShopOpenServerPacket` from the provided `EoReader`.
public
static deserialize(EoReader $reader) : ShopOpenServerPacket
Parameters
- $reader : EoReader
-
The reader that the data will be deserialized from.
Return values
ShopOpenServerPacket —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.
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.
getCraftItems()
public
getCraftItems() : array<string|int, ShopCraftItem>
Return values
array<string|int, ShopCraftItem>getSessionId()
public
getSessionId() : int
Return values
intgetShopName()
public
getShopName() : string
Return values
stringgetTradeItems()
public
getTradeItems() : array<string|int, ShopTradeItem>
Return values
array<string|int, ShopTradeItem>serialize()
Serializes an instance of `ShopOpenServerPacket` to the provided `EoWriter`.
public
static serialize(EoWriter $writer, ShopOpenServerPacket $data) : void
Parameters
- $writer : EoWriter
-
The writer that the data will be serialized to.
- $data : ShopOpenServerPacket
-
The data to serialize.
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.
setCraftItems()
public
setCraftItems(array<string|int, ShopCraftItem> $craftItems) : void
Parameters
- $craftItems : array<string|int, ShopCraftItem>
setSessionId()
public
setSessionId(int $sessionId) : void
Parameters
- $sessionId : int
setShopName()
public
setShopName(string $shopName) : void
Parameters
- $shopName : string
setTradeItems()
public
setTradeItems(array<string|int, ShopTradeItem> $tradeItems) : void
Parameters
- $tradeItems : array<string|int, ShopTradeItem>
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.