AuctionHouseBot patch added. thanx to everyone who worked on it especially Paradox. Only apply 930_characters.sql if you dont already have AHBot installed. AHBot requires an account ID and a character ID to work with, set them in trinitycore.conf and also login atleast once to this character.

--HG--
branch : trunk
This commit is contained in:
KingPin committed 2009-01-20 16:44:05 -06:00
1 parent 5a549389d6
commit e1f765a972
17 files changed
+2696 -3

No files matched your search

+17 -1
View File
@@ -30,6 +30,7 @@
#include "Unit.h"
#include "Language.h"
#include "Database/DBCStores.h"
#include "AuctionHouseBot.h"
void MailItem::deleteItem( bool inDB )
{
@@ -348,7 +349,14 @@ void WorldSession::HandleReturnToSender(WorldPacket & recv_data )
}
}
SendReturnToSender(MAIL_NORMAL, GetAccountId(), m->receiver, m->sender, m->subject, m->itemTextId, &mi, m->money, m->mailTemplateId);
if (m->sender == AHBplayerGUID)
{
SendReturnToSender(MAIL_CREATURE, GetAccountId(), m->receiver, m->sender, m->subject, m->itemTextId, &mi, m->money, m->mailTemplateId);
}
else
{
SendReturnToSender(MAIL_NORMAL, GetAccountId(), m->receiver, m->sender, m->subject, m->itemTextId, &mi, m->money, m->mailTemplateId);
}
delete m; //we can deallocate old mail
pl->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, 0);
@@ -765,6 +773,14 @@ void WorldSession::HandleMsgQueryNextMailtime(WorldPacket & /*recv_data*/ )
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)
{
if (receiver_guidlow == AHBplayerGUID)
{
if(messageType == MAIL_AUCTION && mi) // auction mail with items
{
mi->deleteIncludedItems(true);
}
return;
}
uint32 mailId = objmgr.GenerateMailID();
time_t deliver_time = time(NULL) + deliver_delay;