This table contains main data about all mails in the game.
Structure
| Field | Type | Attributes | Key | Null | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| id | int | unsigned | PRI | NO | 0 | Identifier | |
| messageType | tinyint | unsigned | NO | 0 | |||
| stationery | tinyint | signed | NO | 41 | |||
| mailTemplateId | smallint | unsigned | NO | 0 | |||
| sender | int | unsigned | NO | 0 | Character Global Unique Identifier | ||
| receiver | int | unsigned | MUL | NO | 0 | Character Global Unique Identifier | |
| subject | longtext | YES | NULL | ||||
| body | longtext | YES | NULL | ||||
| has_items | tinyint | unsigned | NO | 0 | |||
| expire_time | int | unsigned | NO | 0 | |||
| deliver_time | int | unsigned | NO | 0 | |||
| money | int | unsigned | NO | 0 | |||
| cod | int | unsigned | NO | 0 | |||
| checked | int | unsigned | NO | 0 | |||
Description of fields
id
This field contains the unique ID across all messages.
messageType
| ID | Name | Comment |
|---|---|---|
| 0 | MAIL_NORMAL | |
| 2 | MAIL_AUCTION | send by auction house |
| 3 | MAIL_CREATURE | send by npc |
| 4 | MAIL_GAMEOBJECT | send by object |
| 5 | MAIL_CALENDAR | calendar event notification |
stationery
Defines the background texture of the mail.
enum MailStationery gathered from Stationery ID
| ID | Name | Comment |
|---|---|---|
| 1 | MAIL_STATIONERY_TEST | |
| 41 | MAIL_STATIONERY_DEFAULT | |
| 61 | MAIL_STATIONERY_GM | |
| 62 | MAIL_STATIONERY_AUCTION | |
| 64 | MAIL_STATIONERY_VAL | Valentine |
| 65 | MAIL_STATIONERY_CHR | Christmas |
| 67 | MAIL_STATIONERY_ORP | Orphan |
mailTemplateId
MailTemplate ID if available.
sender
Can be one of:
- character guid
- AuctionHouse ID
- creature entry
- gameobject entry
- calendar event id
- 0 (unknown sender case)
receiver
character guid of the receiving player.
subject
The mail subject is stored here.
body
The text contained in the mail.
has_items
Flag if the mail can contain items.
- 0: no items attached
- 1: check mail_items
expire_time
Unix timestamp storing when the mail will be returned to sender. (or deleted if already returned or sent by non-player)
deliver_time
Unix timestamp when the mail will be received. Affected by worldserver.conf MailDeliveryDelay
money
Amount of copper either as attached or 'Cash On Delivery'
cod
Determines if money is an attachment or COD due.
- 0: money attachment
- 1: COD to be paid
checked
| Value | Flag | Name | Comment |
|---|---|---|---|
| 0 | 0x00 | MAIL_CHECK_MASK_NONE | |
| 1 | 0x01 | MAIL_CHECK_MASK_READ | |
| 2 | 0x02 | MAIL_CHECK_MASK_RETURNED | This mail was returned. Do not allow returning mail back again. |
| 4 | 0x04 | MAIL_CHECK_MASK_COPIED | This mail was copied. Do not allow making a copy of items in mail. |
| 8 | 0x08 | MAIL_CHECK_MASK_COD_PAYMENT | |
| 16 | 0x10 | MAIL_CHECK_MASK_HAS_BODY | This mail has body text. |
