mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[8769] Implement mails sending at player levelup.
This commit is contained in:
parent
d009994f59
commit
e078d0dd03
12 changed files with 149 additions and 3 deletions
|
|
@ -179,6 +179,19 @@ struct PetLevelInfo
|
|||
uint16 armor;
|
||||
};
|
||||
|
||||
struct MailLevelReward
|
||||
{
|
||||
MailLevelReward() : raceMask(0), mailTemplateId(0), senderEntry(0) {}
|
||||
MailLevelReward(uint32 _raceMask, uint32 _mailTemplateId, uint32 _senderEntry) : raceMask(_raceMask), mailTemplateId(_mailTemplateId), senderEntry(_senderEntry) {}
|
||||
|
||||
uint32 raceMask;
|
||||
uint32 mailTemplateId;
|
||||
uint32 senderEntry;
|
||||
};
|
||||
|
||||
typedef std::list<MailLevelReward> MailLevelRewardList;
|
||||
typedef UNORDERED_MAP<uint8,MailLevelRewardList> MailLevelRewardMap;
|
||||
|
||||
struct ReputationOnKillEntry
|
||||
{
|
||||
uint32 repfaction1;
|
||||
|
|
@ -515,6 +528,7 @@ class ObjectMgr
|
|||
void LoadNpcOptionLocales();
|
||||
void LoadPointOfInterestLocales();
|
||||
void LoadInstanceTemplate();
|
||||
void LoadMailLevelRewards();
|
||||
|
||||
void LoadGossipText();
|
||||
|
||||
|
|
@ -584,6 +598,19 @@ class ObjectMgr
|
|||
typedef std::multimap<int32, uint32> ExclusiveQuestGroups;
|
||||
ExclusiveQuestGroups mExclusiveQuestGroups;
|
||||
|
||||
MailLevelReward const* GetMailLevelReward(uint32 level,uint32 raceMask)
|
||||
{
|
||||
MailLevelRewardMap::const_iterator map_itr = m_mailLevelRewardMap.find(level);
|
||||
if (map_itr == m_mailLevelRewardMap.end())
|
||||
return NULL;
|
||||
|
||||
for(MailLevelRewardList::const_iterator set_itr = map_itr->second.begin(); set_itr != map_itr->second.end(); ++set_itr)
|
||||
if (set_itr->raceMask & raceMask)
|
||||
return &*set_itr;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
WeatherZoneChances const* GetWeatherChances(uint32 zone_id) const
|
||||
{
|
||||
WeatherZoneMap::const_iterator itr = mWeatherZoneMap.find(zone_id);
|
||||
|
|
@ -844,6 +871,8 @@ class ObjectMgr
|
|||
void ConvertCreatureAddonAuras(CreatureDataAddon* addon, char const* table, char const* guidEntryStr);
|
||||
void LoadQuestRelationsHelper(QuestRelations& map,char const* table);
|
||||
|
||||
MailLevelRewardMap m_mailLevelRewardMap;
|
||||
|
||||
typedef std::map<uint32,PetLevelInfo*> PetLevelInfoMap;
|
||||
// PetLevelInfoMap[creature_id][level]
|
||||
PetLevelInfoMap petInfo; // [creature_id][level]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue