Core/Instances: Implemented DungeonEncounter.dbc for creating completed encounters mask to use in packets
Core/Dungeon Finder: Implemented new way of giving random dungeon rewards, linked to DungeonEncounter.dbc
This commit is contained in:
@@ -557,7 +557,27 @@ struct LanguageDesc
|
||||
};
|
||||
|
||||
extern LanguageDesc lang_description[LANGUAGES_COUNT];
|
||||
LanguageDesc const* GetLanguageDescByID(uint32 lang);
|
||||
LanguageDesc const* GetLanguageDescByID(uint32 lang);
|
||||
|
||||
enum EncounterCreditType
|
||||
{
|
||||
ENCOUNTER_CREDIT_KILL_CREATURE = 0,
|
||||
ENCOUNTER_CREDIT_CAST_SPELL = 1,
|
||||
};
|
||||
|
||||
struct DungeonEncounter
|
||||
{
|
||||
DungeonEncounter(DungeonEncounterEntry const* _dbcEntry, EncounterCreditType _creditType, uint32 _creditEntry, uint32 _lastEncounterDungeon)
|
||||
: dbcEntry(_dbcEntry), creditType(_creditType), creditEntry(_creditEntry), lastEncounterDungeon(_lastEncounterDungeon) { }
|
||||
|
||||
DungeonEncounterEntry const* dbcEntry;
|
||||
EncounterCreditType creditType;
|
||||
uint32 creditEntry;
|
||||
uint32 lastEncounterDungeon;
|
||||
};
|
||||
|
||||
typedef std::list<DungeonEncounter const*> DungeonEncounterList;
|
||||
typedef UNORDERED_MAP<uint32,DungeonEncounterList> DungeonEncounterMap;
|
||||
|
||||
class PlayerDumpReader;
|
||||
|
||||
@@ -796,6 +816,14 @@ class ObjectMgr
|
||||
return NULL;
|
||||
}
|
||||
|
||||
DungeonEncounterList const* GetDungeonEncounterList(uint32 mapId, Difficulty difficulty)
|
||||
{
|
||||
UNORDERED_MAP<uint32, DungeonEncounterList>::const_iterator itr = mDungeonEncounters.find(MAKE_PAIR32(mapId, difficulty));
|
||||
if (itr != mDungeonEncounters.end())
|
||||
return &itr->second;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void LoadGuilds();
|
||||
void LoadArenaTeams();
|
||||
void LoadGroups();
|
||||
@@ -884,6 +912,7 @@ class ObjectMgr
|
||||
void LoadGossipMenuItemsLocales();
|
||||
void LoadPointOfInterestLocales();
|
||||
void LoadInstanceTemplate();
|
||||
void LoadInstanceEncounters();
|
||||
void LoadMailLevelRewards();
|
||||
void LoadVehicleAccessories();
|
||||
void LoadVehicleScaling();
|
||||
@@ -1253,6 +1282,7 @@ class ObjectMgr
|
||||
AreaTriggerMap mAreaTriggers;
|
||||
AreaTriggerScriptMap mAreaTriggerScripts;
|
||||
AccessRequirementMap mAccessRequirements;
|
||||
DungeonEncounterMap mDungeonEncounters;
|
||||
|
||||
RepRewardRateMap m_RepRewardRateMap;
|
||||
RepOnKillMap mRepOnKill;
|
||||
|
||||
Reference in New Issue
Block a user