目录

mail 表


<-返回:Characters 数据库

This table contains main data about all mails in the game.

表结构

FieldTypeAttributesKeyNullDefaultExtraComment
idINTUNSIGNEDPRINO0 Identifier
messageTypeTINYINTUNSIGNED NO0
stationeryTINYINTUNSIGNED NO41
mailTemplateIdSMALLINTUNSIGNED NO0
senderINTUNSIGNED NO0 Character Global Unique Identifier
receiverINTUNSIGNED NO0 Character Global Unique Identifier
subjectLONGTEXTSIGNED YES
bodyLONGTEXTSIGNED YES
has_itemsTINYINTUNSIGNED NO0
expire_timeINTUNSIGNED NO0
deliver_timeINTUNSIGNED NO0
moneyINTUNSIGNED NO0
codINTUNSIGNED NO0
checkedTINYINTUNSIGNED NO0
auctionIdINTUNSIGNED NO0

字段说明


id

This field contains unique ID of any messages.

Don't have autoincrement !!!

messageType

stationery

This field can contain these values:

mailTemplateId

Id from MailTemplate.dbc

sender

In this field is entered sender character.guid.

receiver

Here is receiver's character.guid.

subject

Here is stored mail subject.

If stationery is 62, subject has formatted data:

itemEntry:0:response:lotId:itemCount

FlagComment
0AUCTION_OUTBIDDED
1AUCTION_WON
2AUCTION_SUCCESSFUL
3AUCTION_EXPIRED
4AUCTION_CANCELLED_TO_BIDDER
5AUCTION_CANCELED
6AUCTION_SALE_PENDING

body

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.

has_items

Default: 0,

When is set to 1, that mail can contain items.

For items look at mail_items table.

expire_time

Here is timestamp which stores date for auto-return mail to sender or delete if stationery is 62 (AuctionHouse).

deliver_time

Here is timestamp which stores date when mail must be delivered to receiver. Can be delayed mails from AuctionHouse.

money

The ammout of money in mail, or money to pay when is COD.

cod

Default: 0 - No COD,

when is set to 1, that field `money` stores gold for COD.

checked

FlagComment
0MAIL_CHECK_MASK_NONE
1MAIL_CHECK_MASK_READ
2MAIL_CHECK_MASK_RETURNED
4MAIL_CHECK_MASK_COPIED
8MAIL_CHECK_MASK_COD_PAYMENT
16MAIL_CHECK_MASK_HAS_BODY

auctionId

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.