2014-06-24 08:40:02 -04:00
|
|
|
[[Category Packet]]
|
|
|
|
[[Category Packet 317]]
|
|
|
|
{{packet|name=Camera oscillate|description=Updates items in an interface component.|opcode=53|type=VARIABLE_SHORT|length=N/A|revision=317}}
|
|
|
|
== Camera oscillate ==
|
|
|
|
|
|
|
|
=== Description ===
|
|
|
|
Updates the items in a given interface component.
|
|
|
|
|
|
|
|
=== Packet Structure ===
|
|
|
|
|
|
|
|
|
|
|
|
{| border=2
|
|
|
|
! Data type
|
|
|
|
! Description
|
|
|
|
|-
|
|
|
|
| U [[Data Types#Standard data types|Short]]
|
|
|
|
| Interface ID.
|
|
|
|
|-
|
|
|
|
| U [[Data Types#Standard data types|Short]]
|
|
|
|
| Amount of items.
|
|
|
|
|-
|
|
|
|
|}
|
|
|
|
|
|
|
|
The rest in pseudo-code:
|
|
|
|
|
2014-06-24 08:41:33 -04:00
|
|
|
for (i = 0; i < amt_of_items; i++) {
|
2014-06-24 08:40:02 -04:00
|
|
|
item_amount = read_u_byte(); // Item Amount: U Byte
|
|
|
|
|
2014-06-24 08:41:18 -04:00
|
|
|
if (item_amount == 255)
|
2014-06-24 08:40:02 -04:00
|
|
|
item_amount = read_int_me_b(); // Item Amount (if entered as 255 previously - to allow bigger amounts than 254): Integer Middle-Endian Big (Inverse middle)
|
2014-06-24 08:41:18 -04:00
|
|
|
|
2014-06-24 08:40:02 -04:00
|
|
|
item_id = read_u_short_le_a(); // Item ID: U Short Little Endian Special A
|
2014-06-24 08:41:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
* Someone please fix the code block's syntax, thank you :-)
|