Template:CMSG Header: Difference between revisions
Jump to navigation
Jump to search
m (Attempt to solve opcode always being visible) |
(Add size parameter) |
||
Line 1: | Line 1: | ||
<includeonly>{{#vardefine:opcode|{{{opcode|}}}}}{| class="wikitable" | <includeonly>{{#vardefine:opcode|{{{opcode|}}}}}{{#vardefine:size|{{{size|}}}}}{| class="wikitable" | ||
|+ CMSG Header | |+ CMSG Header | ||
! Offset | ! Offset | ||
Line 7: | Line 7: | ||
! Description | ! Description | ||
|- | |- | ||
| 0x0 || 2 / Big || uint16 || size || Size of the packet including the opcode field. | | 0x0 || 2 / Big || uint16 || size || Size of the packet including the opcode field.{{#if:{{#var:size}}|<br>Always {{{size}}}.}} | ||
|- | |- | ||
| 0x2 || 4 / Little || uint32 || opcode || [[Opcodes|Opcode]] for the packet.<br>Determines the structure of the body.{{#if:{{#var:opcode}}|<br>Always {{{opcode}}}.}} | | 0x2 || 4 / Little || uint32 || opcode || [[Opcodes|Opcode]] for the packet.<br>Determines the structure of the body.{{#if:{{#var:opcode}}|<br>Always {{{opcode}}}.}} | ||
Line 14: | Line 14: | ||
<noinclude> | <noinclude> | ||
Add a table with the header for CMSG [[World Packet]]s. | Add a table with the header for CMSG [[World Packet]]s. | ||
No parameters, for the [[World Packet]] page. | |||
<pre>{{CMSG_Header}}</pre> | |||
{{CMSG_Header}} | {{CMSG_Header}} | ||
With the opcode parameter, for individual packet pages. | |||
<pre>{{CMSG_Header|opcode=0x20}}</pre> | |||
{{CMSG_Header|opcode=0x20}} | {{CMSG_Header|opcode=0x20}} | ||
Or with the size parameter, for individual packet pages. | |||
<pre>{{CMSG_Header|size=100}}</pre> | |||
{{CMSG_Header|opcode=0x20}} | |||
</noinclude> | </noinclude> |
Revision as of 21:09, 23 May 2021
Add a table with the header for CMSG World Packets.
No parameters, for the World Packet page.
{{CMSG_Header}}
Offset | Size / Endianness | Type | Name | Description |
---|---|---|---|---|
0x0 | 2 / Big | uint16 | size | Size of the packet including the opcode field. |
0x2 | 4 / Little | uint32 | opcode | Opcode for the packet. Determines the structure of the body. |
With the opcode parameter, for individual packet pages.
{{CMSG_Header|opcode=0x20}}
Offset | Size / Endianness | Type | Name | Description |
---|---|---|---|---|
0x0 | 2 / Big | uint16 | size | Size of the packet including the opcode field. |
0x2 | 4 / Little | uint32 | opcode | Opcode for the packet. Determines the structure of the body. Always 0x20. |
Or with the size parameter, for individual packet pages.
{{CMSG_Header|size=100}}
Offset | Size / Endianness | Type | Name | Description |
---|---|---|---|---|
0x0 | 2 / Big | uint16 | size | Size of the packet including the opcode field. |
0x2 | 4 / Little | uint32 | opcode | Opcode for the packet. Determines the structure of the body. Always 0x20. |