Hey Folks,
As I was making some modifications to the mail system for my own test server balrok said on IRC ( asked him something about it) while you're looking at it try to make the BG Marks mails expire after 3 days (Now they expire after 30), so I thought why not, some extra practice.
However I've checked the code now so far I've found the following
MailStationery (Mail.h)
enum MailStationery
{
MAIL_STATIONERY_UNKNOWN = 0x01,
MAIL_STATIONERY_NORMAL = 0x29,
MAIL_STATIONERY_GM = 0x3D,
MAIL_STATIONERY_AUCTION = 0x3E,
MAIL_STATIONERY_VAL = 0x40,
MAIL_STATIONERY_CHR = 0x41
};
The code used to send marks (In Battleground.cpp)
WorldSession::SendMailTo(plr, MAIL_CREATURE, MAIL_STATIONERY_NORMAL, bmEntry, plr->GetGUIDLow(), subject, itemTextId , &mi, 0, 0, MAIL_CHECK_MASK_NONE);
and well the SendMailTo function in Mail.cpp
void WorldSession::SendMailTo(Player* receiver, uint8 messageType, uint8 stationery, uint32 sender_guidlow_or_entry, uint32 receiver_guidlow, std::string subject, uint32 itemTextId, MailItemsInfo* mi, uint32 money, uint32 COD, uint32 checked, uint32 deliver_delay, uint16 mailTemplateId)
Which has
uint32 expire_delay;
if(messageType == MAIL_AUCTION && !mi && !money) // auction mail without any items and money
expire_delay = HOUR;
else
expire_delay = (COD > 0) ? 3*DAY : 30*DAY;
So to fix it we would need to add an elseif to the if statement or something similiar. however I don't see any way to determine if an in-game mail is coming from "the BG", well we could check what item is being sent with the mail but I dunno if that's concidered hacky, other then that the stationery is not other then normal mails and so isn't the template.
Like to hear some thoughts, etc. on this.
Regards, Xeross