Table of Contents

Open Buy Window (0x74)

Moongate Packet Classes

  • VendorBuyListPacket

Current Moongate Behavior

Moongate now uses 0x74 for the classic vendor buy list flow. The server pairs this packet with:

  1. two worn vendor shop containers on layers ShopBuy and ShopResale
  2. 0x3C item content for the buy container
  3. 0x24 to open the vendor container model 0x0030

The runtime orchestration lives in IPlayerSellBuyService / PlayerSellBuyService.

Packet Build

Type Field
BYTE[1] cmd
BYTE[2] blockSize
BYTE[4] containerSerial
BYTE[1] # of items

of items worth of item segments

Type Field
BYTE[4] price
BYTE length of text description
BYTE[text length] item description

Subcommand Build

N/A

Notes

To open a buy window, the protocol is as follows:

  1. Wear the "for-sale" container in layer 1A on the vendor

  2. Wear the "bought" container in layer 1B on the vendor

3) For each container:

  • 3a) Send "Add multiple items in container" (packet 0x3C) 3b) This packet (0x74) with items in a special order (see below)
  1. Draw container (0x24) with model number of 0x0030

Items in this packet must be presented in the reversed order of 0x3C for most container objtypes, regardless of coordinates or slots. For the objtype 0x2AF8, items must be sorted in this packet by increasing X coordinates (see packet 0x3C for more details).

The containerSerial is claimed to be (vendorID | 0x40000000), but that does not seem to be required.

Other orderings may be required for the enhanced (SA) client.