[8749] Rename quest_mail_loot_template to mail_loot_template.

Store loot in mail_loot_template indexed by mail template ids.
Provide new SendMail functions for send mail base at mail template.
This commit is contained in:
VladimirMangos 2009-10-29 08:52:47 +03:00
parent aa4524852e
commit 3c53dded97
14 changed files with 128 additions and 116 deletions

View file

@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
`version` varchar(120) default NULL, `version` varchar(120) default NULL,
`creature_ai_version` varchar(120) default NULL, `creature_ai_version` varchar(120) default NULL,
`cache_id` int(10) default '0', `cache_id` int(10) default '0',
`required_8731_01_mangos_creature_template` bit(1) default NULL `required_8749_01_mangos_mail_loot_template` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
-- --
@ -2711,6 +2711,33 @@ LOCK TABLES `locales_quest` WRITE;
/*!40000 ALTER TABLE `locales_quest` ENABLE KEYS */; /*!40000 ALTER TABLE `locales_quest` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
--
-- Table structure for table `mail_loot_template`
--
DROP TABLE IF EXISTS `mail_loot_template`;
CREATE TABLE `mail_loot_template` (
`entry` mediumint(8) unsigned NOT NULL default '0',
`item` mediumint(8) unsigned NOT NULL default '0',
`ChanceOrQuestChance` float NOT NULL default '100',
`groupid` tinyint(3) unsigned NOT NULL default '0',
`mincountOrRef` mediumint(9) NOT NULL default '1',
`maxcount` tinyint(3) unsigned NOT NULL default '1',
`lootcondition` tinyint(3) unsigned NOT NULL default '0',
`condition_value1` mediumint(8) unsigned NOT NULL default '0',
`condition_value2` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
--
-- Dumping data for table `mail_loot_template`
--
LOCK TABLES `mail_loot_template` WRITE;
/*!40000 ALTER TABLE `mail_loot_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `mail_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
-- --
-- Table structure for table `mangos_string` -- Table structure for table `mangos_string`
-- --
@ -13561,33 +13588,6 @@ LOCK TABLES `quest_start_scripts` WRITE;
/*!40000 ALTER TABLE `quest_start_scripts` ENABLE KEYS */; /*!40000 ALTER TABLE `quest_start_scripts` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
--
-- Table structure for table `quest_mail_loot_template`
--
DROP TABLE IF EXISTS `quest_mail_loot_template`;
CREATE TABLE `quest_mail_loot_template` (
`entry` mediumint(8) unsigned NOT NULL default '0',
`item` mediumint(8) unsigned NOT NULL default '0',
`ChanceOrQuestChance` float NOT NULL default '100',
`groupid` tinyint(3) unsigned NOT NULL default '0',
`mincountOrRef` mediumint(9) NOT NULL default '1',
`maxcount` tinyint(3) unsigned NOT NULL default '1',
`lootcondition` tinyint(3) unsigned NOT NULL default '0',
`condition_value1` mediumint(8) unsigned NOT NULL default '0',
`condition_value2` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
--
-- Dumping data for table `quest_mail_loot_template`
--
LOCK TABLES `quest_mail_loot_template` WRITE;
/*!40000 ALTER TABLE `quest_mail_loot_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `quest_mail_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
-- --
-- Table structure for table `quest_template` -- Table structure for table `quest_template`
-- --

View file

@ -0,0 +1,6 @@
ALTER TABLE db_version CHANGE COLUMN required_8731_01_mangos_creature_template required_8749_01_mangos_mail_loot_template bit;
RENAME TABLE quest_mail_loot_template TO mail_loot_template;
UPDATE mail_loot_template, quest_template
SET entry = quest_template.RewMailTemplateId WHERE mail_loot_template.entry = quest_template.entry;

View file

@ -145,6 +145,7 @@ pkgdata_DATA = \
8726_01_mangos_spell_proc_event.sql \ 8726_01_mangos_spell_proc_event.sql \
8728_01_realmd_account.sql \ 8728_01_realmd_account.sql \
8731_01_mangos_creature_template.sql \ 8731_01_mangos_creature_template.sql \
8749_01_mangos_mail_loot_template.sql \
README README
## Additional files to include when running 'make dist' ## Additional files to include when running 'make dist'
@ -270,4 +271,5 @@ EXTRA_DIST = \
8726_01_mangos_spell_proc_event.sql \ 8726_01_mangos_spell_proc_event.sql \
8728_01_realmd_account.sql \ 8728_01_realmd_account.sql \
8731_01_mangos_creature_template.sql \ 8731_01_mangos_creature_template.sql \
8749_01_mangos_mail_loot_template.sql \
README README

View file

@ -431,6 +431,7 @@ ChatCommand * ChatHandler::getCommandTable()
{ "locales_page_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesPageTextCommand, "", NULL }, { "locales_page_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesPageTextCommand, "", NULL },
{ "locales_points_of_interest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesPointsOfInterestCommand, "", NULL }, { "locales_points_of_interest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesPointsOfInterestCommand, "", NULL },
{ "locales_quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesQuestCommand, "", NULL }, { "locales_quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesQuestCommand, "", NULL },
{ "mail_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesMailCommand, "", NULL },
{ "mangos_string", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadMangosStringCommand, "", NULL }, { "mangos_string", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadMangosStringCommand, "", NULL },
{ "milling_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesMillingCommand, "", NULL }, { "milling_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesMillingCommand, "", NULL },
{ "npc_gossip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcGossipCommand, "", NULL }, { "npc_gossip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadNpcGossipCommand, "", NULL },
@ -443,7 +444,6 @@ ChatCommand * ChatHandler::getCommandTable()
{ "points_of_interest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadPointsOfInterestCommand, "",NULL}, { "points_of_interest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadPointsOfInterestCommand, "",NULL},
{ "prospecting_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesProspectingCommand,"", NULL }, { "prospecting_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesProspectingCommand,"", NULL },
{ "quest_end_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadQuestEndScriptsCommand, "", NULL }, { "quest_end_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadQuestEndScriptsCommand, "", NULL },
{ "quest_mail_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesQuestMailCommand, "", NULL },
{ "quest_start_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadQuestStartScriptsCommand, "", NULL }, { "quest_start_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadQuestStartScriptsCommand, "", NULL },
{ "quest_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadQuestTemplateCommand, "", NULL }, { "quest_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadQuestTemplateCommand, "", NULL },
{ "reference_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesReferenceCommand, "", NULL }, { "reference_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesReferenceCommand, "", NULL },

View file

@ -351,11 +351,11 @@ class ChatHandler
bool HandleReloadLootTemplatesFishingCommand(const char* args); bool HandleReloadLootTemplatesFishingCommand(const char* args);
bool HandleReloadLootTemplatesGameobjectCommand(const char* args); bool HandleReloadLootTemplatesGameobjectCommand(const char* args);
bool HandleReloadLootTemplatesItemCommand(const char* args); bool HandleReloadLootTemplatesItemCommand(const char* args);
bool HandleReloadLootTemplatesMailCommand(const char* args);
bool HandleReloadLootTemplatesMillingCommand(const char* args); bool HandleReloadLootTemplatesMillingCommand(const char* args);
bool HandleReloadLootTemplatesPickpocketingCommand(const char* args); bool HandleReloadLootTemplatesPickpocketingCommand(const char* args);
bool HandleReloadLootTemplatesProspectingCommand(const char* args); bool HandleReloadLootTemplatesProspectingCommand(const char* args);
bool HandleReloadLootTemplatesReferenceCommand(const char* args); bool HandleReloadLootTemplatesReferenceCommand(const char* args);
bool HandleReloadLootTemplatesQuestMailCommand(const char* args);
bool HandleReloadLootTemplatesSkinningCommand(const char* args); bool HandleReloadLootTemplatesSkinningCommand(const char* args);
bool HandleReloadLootTemplatesSpellCommand(const char* args); bool HandleReloadLootTemplatesSpellCommand(const char* args);
bool HandleReloadMangosStringCommand(const char* args); bool HandleReloadMangosStringCommand(const char* args);

View file

@ -360,12 +360,12 @@ bool ChatHandler::HandleReloadLootTemplatesProspectingCommand(const char*)
return true; return true;
} }
bool ChatHandler::HandleReloadLootTemplatesQuestMailCommand(const char*) bool ChatHandler::HandleReloadLootTemplatesMailCommand(const char*)
{ {
sLog.outString( "Re-Loading Loot Tables... (`quest_mail_loot_template`)" ); sLog.outString( "Re-Loading Loot Tables... (`mail_loot_template`)" );
LoadLootTemplates_QuestMail(); LoadLootTemplates_Mail();
LootTemplates_QuestMail.CheckLootRefs(); LootTemplates_Mail.CheckLootRefs();
SendGlobalSysMessage("DB table `quest_mail_loot_template` reloaded."); SendGlobalSysMessage("DB table `mail_loot_template` reloaded.");
return true; return true;
} }

View file

@ -40,10 +40,10 @@ LootStore LootTemplates_Disenchant( "disenchant_loot_template", "item disenc
LootStore LootTemplates_Fishing( "fishing_loot_template", "area id", true); LootStore LootTemplates_Fishing( "fishing_loot_template", "area id", true);
LootStore LootTemplates_Gameobject( "gameobject_loot_template", "gameobject entry", true); LootStore LootTemplates_Gameobject( "gameobject_loot_template", "gameobject entry", true);
LootStore LootTemplates_Item( "item_loot_template", "item entry", true); LootStore LootTemplates_Item( "item_loot_template", "item entry", true);
LootStore LootTemplates_Mail( "mail_loot_template", "mail template id", false);
LootStore LootTemplates_Milling( "milling_loot_template", "item entry (herb)", true); LootStore LootTemplates_Milling( "milling_loot_template", "item entry (herb)", true);
LootStore LootTemplates_Pickpocketing("pickpocketing_loot_template","creature pickpocket lootid", true); LootStore LootTemplates_Pickpocketing("pickpocketing_loot_template","creature pickpocket lootid", true);
LootStore LootTemplates_Prospecting( "prospecting_loot_template", "item entry (ore)", true); LootStore LootTemplates_Prospecting( "prospecting_loot_template", "item entry (ore)", true);
LootStore LootTemplates_QuestMail( "quest_mail_loot_template", "quest id (with mail template)",false);
LootStore LootTemplates_Reference( "reference_loot_template", "reference id", false); LootStore LootTemplates_Reference( "reference_loot_template", "reference id", false);
LootStore LootTemplates_Skinning( "skinning_loot_template", "creature skinning id", true); LootStore LootTemplates_Skinning( "skinning_loot_template", "creature skinning id", true);
LootStore LootTemplates_Spell( "spell_loot_template", "spell id (random item creating)",false); LootStore LootTemplates_Spell( "spell_loot_template", "spell id (random item creating)",false);
@ -1256,28 +1256,20 @@ void LoadLootTemplates_Prospecting()
LootTemplates_Prospecting.ReportUnusedIds(ids_set); LootTemplates_Prospecting.ReportUnusedIds(ids_set);
} }
void LoadLootTemplates_QuestMail() void LoadLootTemplates_Mail()
{ {
LootIdSet ids_set; LootIdSet ids_set;
LootTemplates_QuestMail.LoadAndCollectLootIds(ids_set); LootTemplates_Mail.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot // remove real entries and check existence loot
ObjectMgr::QuestMap const& questMap = objmgr.GetQuestTemplates(); ObjectMgr::QuestMap const& questMap = objmgr.GetQuestTemplates();
for(ObjectMgr::QuestMap::const_iterator itr = questMap.begin(); itr != questMap.end(); ++itr ) for(ObjectMgr::QuestMap::const_iterator itr = questMap.begin(); itr != questMap.end(); ++itr )
{ if(uint32 mail_template_id = itr->second->GetRewMailTemplateId())
if(!itr->second->GetRewMailTemplateId()) if(ids_set.count(mail_template_id))
continue; ids_set.erase(mail_template_id);
if(ids_set.count(itr->first))
ids_set.erase(itr->first);
/* disabled reporting: some quest mails not include items
else
LootTemplates_QuestMail.ReportNotExistedId(itr->first);
*/
}
// output error for any still listed (not referenced from appropriate table) ids // output error for any still listed (not referenced from appropriate table) ids
LootTemplates_QuestMail.ReportUnusedIds(ids_set); LootTemplates_Mail.ReportUnusedIds(ids_set);
} }
void LoadLootTemplates_Skinning() void LoadLootTemplates_Skinning()
@ -1354,7 +1346,7 @@ void LoadLootTemplates_Reference()
LootTemplates_Skinning.CheckLootRefs(&ids_set); LootTemplates_Skinning.CheckLootRefs(&ids_set);
LootTemplates_Disenchant.CheckLootRefs(&ids_set); LootTemplates_Disenchant.CheckLootRefs(&ids_set);
LootTemplates_Prospecting.CheckLootRefs(&ids_set); LootTemplates_Prospecting.CheckLootRefs(&ids_set);
LootTemplates_QuestMail.CheckLootRefs(&ids_set); LootTemplates_Mail.CheckLootRefs(&ids_set);
LootTemplates_Reference.CheckLootRefs(&ids_set); LootTemplates_Reference.CheckLootRefs(&ids_set);
// output error for any still listed ids (not referenced from any loot table) // output error for any still listed ids (not referenced from any loot table)

View file

@ -321,24 +321,24 @@ extern LootStore LootTemplates_Creature;
extern LootStore LootTemplates_Fishing; extern LootStore LootTemplates_Fishing;
extern LootStore LootTemplates_Gameobject; extern LootStore LootTemplates_Gameobject;
extern LootStore LootTemplates_Item; extern LootStore LootTemplates_Item;
extern LootStore LootTemplates_Mail;
extern LootStore LootTemplates_Milling; extern LootStore LootTemplates_Milling;
extern LootStore LootTemplates_Pickpocketing; extern LootStore LootTemplates_Pickpocketing;
extern LootStore LootTemplates_Skinning; extern LootStore LootTemplates_Skinning;
extern LootStore LootTemplates_Disenchant; extern LootStore LootTemplates_Disenchant;
extern LootStore LootTemplates_Prospecting; extern LootStore LootTemplates_Prospecting;
extern LootStore LootTemplates_QuestMail;
extern LootStore LootTemplates_Spell; extern LootStore LootTemplates_Spell;
void LoadLootTemplates_Creature(); void LoadLootTemplates_Creature();
void LoadLootTemplates_Fishing(); void LoadLootTemplates_Fishing();
void LoadLootTemplates_Gameobject(); void LoadLootTemplates_Gameobject();
void LoadLootTemplates_Item(); void LoadLootTemplates_Item();
void LoadLootTemplates_Mail();
void LoadLootTemplates_Milling(); void LoadLootTemplates_Milling();
void LoadLootTemplates_Pickpocketing(); void LoadLootTemplates_Pickpocketing();
void LoadLootTemplates_Skinning(); void LoadLootTemplates_Skinning();
void LoadLootTemplates_Disenchant(); void LoadLootTemplates_Disenchant();
void LoadLootTemplates_Prospecting(); void LoadLootTemplates_Prospecting();
void LoadLootTemplates_QuestMail();
void LoadLootTemplates_Spell(); void LoadLootTemplates_Spell();
void LoadLootTemplates_Reference(); void LoadLootTemplates_Reference();
@ -349,12 +349,12 @@ inline void LoadLootTables()
LoadLootTemplates_Fishing(); LoadLootTemplates_Fishing();
LoadLootTemplates_Gameobject(); LoadLootTemplates_Gameobject();
LoadLootTemplates_Item(); LoadLootTemplates_Item();
LoadLootTemplates_Mail();
LoadLootTemplates_Milling(); LoadLootTemplates_Milling();
LoadLootTemplates_Pickpocketing(); LoadLootTemplates_Pickpocketing();
LoadLootTemplates_Skinning(); LoadLootTemplates_Skinning();
LoadLootTemplates_Disenchant(); LoadLootTemplates_Disenchant();
LoadLootTemplates_Prospecting(); LoadLootTemplates_Prospecting();
LoadLootTemplates_QuestMail();
LoadLootTemplates_Spell(); LoadLootTemplates_Spell();
LoadLootTemplates_Reference(); LoadLootTemplates_Reference();

View file

@ -899,3 +899,60 @@ void WorldSession::SendMailTo(Player* receiver, uint8 messageType, uint8 station
} }
CharacterDatabase.CommitTransaction(); CharacterDatabase.CommitTransaction();
} }
void WorldSession::SendMailTo(Player* receiver, Object* sender, uint8 stationery, uint32 receiver_guidlow, std::string subject, uint32 itemTextId, MailItemsInfo* mi, uint32 money, uint32 COD, uint32 checked, uint32 deliver_delay, uint16 mailTemplateId)
{
MailMessageType mailType;
uint32 senderGuidOrEntry;
switch(sender->GetTypeId())
{
case TYPEID_UNIT:
mailType = MAIL_CREATURE;
senderGuidOrEntry = sender->GetEntry();
break;
case TYPEID_GAMEOBJECT:
mailType = MAIL_GAMEOBJECT;
senderGuidOrEntry = sender->GetEntry();
break;
case TYPEID_ITEM:
mailType = MAIL_ITEM;
senderGuidOrEntry = sender->GetEntry();
break;
case TYPEID_PLAYER:
mailType = MAIL_NORMAL;
senderGuidOrEntry = sender->GetGUIDLow();
break;
default:
mailType = MAIL_NORMAL;
senderGuidOrEntry = receiver_guidlow;
sLog.outError( "WorldSession::SendMailTo - Mail have unexpected sender typeid (%u), sent from receiver to self", sender->GetTypeId());
break;
}
SendMailTo(receiver, mailType, stationery, senderGuidOrEntry, receiver_guidlow, subject, itemTextId, mi, money, COD, checked,deliver_delay,mailTemplateId);
}
void WorldSession::SendMailTemplateTo(Player* receiver, Object* sender, uint8 stationery, uint16 mailTemplateId, uint32 money, uint32 COD, uint32 checked, uint32 deliver_delay)
{
Loot mailLoot;
mailLoot.FillLoot(mailTemplateId, LootTemplates_Mail, receiver,true);
// fill mail
MailItemsInfo mi; // item list preparing
uint32 max_slot = mailLoot.GetMaxSlotInLootFor(receiver);
for(uint32 i = 0; mi.size() < MAX_MAIL_ITEMS && i < max_slot; ++i)
{
if (LootItem* lootitem = mailLoot.LootItemInSlot(i,receiver))
{
if (Item* item = Item::CreateItem(lootitem->itemid,lootitem->count,receiver))
{
item->SaveToDB(); // save for prevent lost at next mail load, if send fail then item will deleted
mi.AddItem(item->GetGUIDLow(), item->GetEntry(), item);
}
}
}
WorldSession::SendMailTo(receiver, sender, stationery, receiver->GetGUIDLow(), "", 0, &mi, money, COD, checked,deliver_delay,mailTemplateId);
}

View file

@ -12714,56 +12714,8 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
} }
// Send reward mail // Send reward mail
if (pQuest->GetRewMailTemplateId()) if (uint32 mail_template_id = pQuest->GetRewMailTemplateId())
{ WorldSession::SendMailTemplateTo(this, questGiver, MAIL_STATIONERY_NORMAL, mail_template_id, 0, 0, MAIL_CHECK_MASK_NONE, pQuest->GetRewMailDelaySecs());
MailMessageType mailType;
uint32 senderGuidOrEntry;
switch(questGiver->GetTypeId())
{
case TYPEID_UNIT:
mailType = MAIL_CREATURE;
senderGuidOrEntry = questGiver->GetEntry();
break;
case TYPEID_GAMEOBJECT:
mailType = MAIL_GAMEOBJECT;
senderGuidOrEntry = questGiver->GetEntry();
break;
case TYPEID_ITEM:
mailType = MAIL_ITEM;
senderGuidOrEntry = questGiver->GetEntry();
break;
case TYPEID_PLAYER:
mailType = MAIL_NORMAL;
senderGuidOrEntry = questGiver->GetGUIDLow();
break;
default:
mailType = MAIL_NORMAL;
senderGuidOrEntry = GetGUIDLow();
break;
}
Loot questMailLoot;
questMailLoot.FillLoot(pQuest->GetQuestId(), LootTemplates_QuestMail, this,true);
// fill mail
MailItemsInfo mi; // item list preparing
uint32 max_slot = questMailLoot.GetMaxSlotInLootFor(this);
for(uint32 i = 0; mi.size() < MAX_MAIL_ITEMS && i < max_slot; ++i)
{
if (LootItem* lootitem = questMailLoot.LootItemInSlot(i,this))
{
if (Item* item = Item::CreateItem(lootitem->itemid,lootitem->count,this))
{
item->SaveToDB(); // save for prevent lost at next mail load, if send fail then item will deleted
mi.AddItem(item->GetGUIDLow(), item->GetEntry(), item);
}
}
}
WorldSession::SendMailTo(this, mailType, MAIL_STATIONERY_NORMAL, senderGuidOrEntry, GetGUIDLow(), "", 0, &mi, 0, 0, MAIL_CHECK_MASK_NONE,pQuest->GetRewMailDelaySecs(),pQuest->GetRewMailTemplateId());
}
if (pQuest->IsDaily()) if (pQuest->IsDaily())
{ {

View file

@ -1297,6 +1297,7 @@ class MANGOS_DLL_SPEC Player : public Unit
void CompleteQuest( uint32 quest_id ); void CompleteQuest( uint32 quest_id );
void IncompleteQuest( uint32 quest_id ); void IncompleteQuest( uint32 quest_id );
void RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver, bool announce = true ); void RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver, bool announce = true );
void FailQuest( uint32 quest_id ); void FailQuest( uint32 quest_id );
bool SatisfyQuestSkillOrClass( Quest const* qInfo, bool msg ); bool SatisfyQuestSkillOrClass( Quest const* qInfo, bool msg );
bool SatisfyQuestLevel( Quest const* qInfo, bool msg ); bool SatisfyQuestLevel( Quest const* qInfo, bool msg );

View file

@ -226,6 +226,8 @@ class MANGOS_DLL_SPEC WorldSession
bool SendItemInfo( uint32 itemid, WorldPacket data ); bool SendItemInfo( uint32 itemid, WorldPacket data );
static void SendReturnToSender(uint8 messageType, uint32 sender_acc, uint32 sender_guid, uint32 receiver_guid, const std::string& subject, uint32 itemTextId, MailItemsInfo *mi, uint32 money, uint16 mailTemplateId = 0); static void SendReturnToSender(uint8 messageType, uint32 sender_acc, uint32 sender_guid, uint32 receiver_guid, const std::string& subject, uint32 itemTextId, MailItemsInfo *mi, uint32 money, uint16 mailTemplateId = 0);
static void SendMailTo(Player* receiver, uint8 messageType, uint8 stationery, uint32 sender_guidlow_or_entry, uint32 received_guidlow, std::string subject, uint32 itemTextId, MailItemsInfo* mi, uint32 money, uint32 COD, uint32 checked, uint32 deliver_delay = 0, uint16 mailTemplateId = 0); static void SendMailTo(Player* receiver, uint8 messageType, uint8 stationery, uint32 sender_guidlow_or_entry, uint32 received_guidlow, std::string subject, uint32 itemTextId, MailItemsInfo* mi, uint32 money, uint32 COD, uint32 checked, uint32 deliver_delay = 0, uint16 mailTemplateId = 0);
static void SendMailTo(Player* receiver, Object* sender, uint8 stationery, uint32 received_guidlow, std::string subject, uint32 itemTextId, MailItemsInfo* mi, uint32 money, uint32 COD, uint32 checked, uint32 deliver_delay = 0, uint16 mailTemplateId = 0);
static void SendMailTemplateTo(Player* receiver, Object* sender, uint8 stationery, uint16 mailTemplateId, uint32 money, uint32 COD, uint32 checked, uint32 deliver_delay = 0);
//auction //auction
void SendAuctionHello( uint64 guid, Creature * unit ); void SendAuctionHello( uint64 guid, Creature * unit );

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "8748" #define REVISION_NR "8749"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__

View file

@ -1,6 +1,6 @@
#ifndef __REVISION_SQL_H__ #ifndef __REVISION_SQL_H__
#define __REVISION_SQL_H__ #define __REVISION_SQL_H__
#define REVISION_DB_CHARACTERS "required_8721_01_characters_guild" #define REVISION_DB_CHARACTERS "required_8721_01_characters_guild"
#define REVISION_DB_MANGOS "required_8731_01_mangos_creature_template" #define REVISION_DB_MANGOS "required_8749_01_mangos_mail_loot_template"
#define REVISION_DB_REALMD "required_8728_01_realmd_account" #define REVISION_DB_REALMD "required_8728_01_realmd_account"
#endif // __REVISION_SQL_H__ #endif // __REVISION_SQL_H__