The `mail` table
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 | UNSIGNED | NO | 41 | |||
mailTemplateId | SMALLINT | UNSIGNED | NO | 0 | |||
sender | INT | UNSIGNED | NO | 0 | Character Global Unique Identifier | ||
receiver | INT | UNSIGNED | NO | 0 | Character Global Unique Identifier | ||
subject | LONGTEXT | SIGNED | YES | ||||
body | LONGTEXT | SIGNED | YES | ||||
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 | TINYINT | UNSIGNED | NO | 0 | |||
auctionId | INT | UNSIGNED | NO | 0 |
Description of the fields
This field contains unique ID of any messages.
Don't have autoincrement !!!
This field can contain these values:
Id from MailTemplate.dbc
In this field is entered sender character.guid.
Here is receiver's character.guid.
Here is stored mail subject.
If stationery is 62, subject has formatted data:
itemEntry:0:response:lotId:itemCount
Flag | Comment |
---|---|
0 | AUCTION_OUTBIDDED |
1 | AUCTION_WON |
2 | AUCTION_SUCCESSFUL |
3 | AUCTION_EXPIRED |
4 | AUCTION_CANCELLED_TO_BIDDER |
5 | AUCTION_CANCELED |
6 | AUCTION_SALE_PENDING |
* lotId: id field from auctionhouse table
The text contained in the mail. Max length is 8000 characters.
If stationery is 62, body has formatted data:
hexID:bid:buyout:deposit:cut:delay:eta
This formatted data seen only in mail with notification about successful auction or about pending mail with money.
Here is timestamp which stores date for auto-return mail to sender or delete if stationery is 62 (AuctionHouse).
Here is timestamp which stores date when mail must be delivered to receiver. Can be delayed mails from AuctionHouse.
The ammout of money in mail, or money to pay when is COD.
Default: 0 - No COD,
when is set to 1, that field `money` stores gold for COD.
Flag | Comment |
---|---|
0 | MAIL_CHECK_MASK_NONE |
1 | MAIL_CHECK_MASK_READ |
2 | MAIL_CHECK_MASK_RETURNED |
4 | MAIL_CHECK_MASK_COPIED |
8 | MAIL_CHECK_MASK_COD_PAYMENT |
16 | MAIL_CHECK_MASK_HAS_BODY |
Only if stationery is 62.
Lot id from AuctionHouse. Can be negative vector in case of delayed mail with money sended by Auction to Lot-owner. For example:
auctionId = 777 : mail to Lot-owner, contains money for sended Lot id 777. Delivered money.
auctionId = -777 : mail contains info that Lot id 777 is sold. Money will be delivered in next mail, time of deliver is set in ''%%deliver_time%%'' field.