Table of Contents

Add multiple Items In Container (0x3C)

Moongate Packet Classes

  • AddMultipleItemsToContainerPacket (Outgoing, Variable, length -1) from src/Moongate.Network.Packets/Outgoing/Entity/AddMultipleItemsToContainerPacket.cs

Current Moongate Behavior

Moongate currently has packet classes for this opcode.

Packet Build

Type Field
BYTE[1] cmd
BYTE[2] packet length
BYTE[2] number of Items to add

loop items:

    • BYTE[4] item serial
Type Field
BYTE[2] item ID (objtype)
BYTE[1] unknown (0x00)
BYTE[2] item amount (stack)
BYTE[2] xLoc
BYTE[2] yLoc
BYTE[1] Backpack grid index (see notes)
BYTE[4] Container serial
BYTE[2] item color

endloop

Subcommand Build

N/A

Notes

  1. The backpack grid index exists since 6.0.1.7 2D and 2.45.5.6 KR.

  2. For shops, this packet is used to populate the item list while packet 0x74 is used to provide descriptions and prices. Note that if the for-sale container has objtype 0x2AF8, the items in 0x74 must be sorted by increasing X coordinates. For any other container objtype, the items in 0x74 must be listed in the reversed order from this packet.

3) For older clients server has to send the loop without this grid index byte: loop items:

    • BYTE[4] item serial
  • BYTE[2] item ID (objtype)

  • BYTE[1] unknown (0x00)

  • BYTE[2] item amount (stack)

  • BYTE[2] xLoc

  • BYTE[2] yLoc

  • BYTE[4] Container serial

  • BYTE[2] item color

endloop