mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-28 16:16:27 +00:00
feat(Core/Mail): Server mail (#10628)
This commit is contained in:
@@ -667,6 +667,7 @@ typedef std::array<std::unordered_map<uint32, QuestGreeting>, 2> QuestGreetingCo
|
||||
|
||||
typedef std::unordered_map<uint32, VendorItemData> CacheVendorItemContainer;
|
||||
typedef std::unordered_map<uint32, TrainerSpellData> CacheTrainerSpellContainer;
|
||||
typedef std::unordered_map<uint32, ServerMail> ServerMailContainer;
|
||||
|
||||
enum SkillRangeType
|
||||
{
|
||||
@@ -1040,6 +1041,7 @@ public:
|
||||
void LoadInstanceTemplate();
|
||||
void LoadInstanceEncounters();
|
||||
void LoadMailLevelRewards();
|
||||
void LoadMailServerTemplates();
|
||||
void LoadVehicleTemplateAccessories();
|
||||
void LoadVehicleAccessories();
|
||||
|
||||
@@ -1169,6 +1171,8 @@ public:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
[[nodiscard]] ServerMailContainer const& GetAllServerMailStore() const { return _serverMailStore; }
|
||||
|
||||
[[nodiscard]] BroadcastText const* GetBroadcastText(uint32 id) const
|
||||
{
|
||||
BroadcastTextContainer::const_iterator itr = _broadcastTextStore.find(id);
|
||||
@@ -1404,6 +1408,7 @@ public:
|
||||
[[nodiscard]] bool IsTransportMap(uint32 mapId) const { return _transportMaps.count(mapId) != 0; }
|
||||
|
||||
[[nodiscard]] uint32 GetQuestMoneyReward(uint8 level, uint32 questMoneyDifficulty) const;
|
||||
void SendServerMail(Player* player, uint32 id, uint32 reqLevel, uint32 reqPlayTime, uint32 rewardMoneyA, uint32 rewardMoneyH, uint32 rewardItemA, uint32 rewardItemCountA, uint32 rewardItemH, uint32 rewardItemCountH, std::string subject, std::string body, uint8 active) const;
|
||||
|
||||
private:
|
||||
// first free id for selected id type
|
||||
@@ -1558,6 +1563,8 @@ private:
|
||||
CacheVendorItemContainer _cacheVendorItemStore;
|
||||
CacheTrainerSpellContainer _cacheTrainerSpellStore;
|
||||
|
||||
ServerMailContainer _serverMailStore;
|
||||
|
||||
std::set<uint32> _difficultyEntries[MAX_DIFFICULTY - 1]; // already loaded difficulty 1 value in creatures, used in CheckCreatureTemplate
|
||||
std::set<uint32> _hasDifficultyEntries[MAX_DIFFICULTY - 1]; // already loaded creatures with difficulty 1 values, used in CheckCreatureTemplate
|
||||
|
||||
|
||||
Reference in New Issue
Block a user