mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 13:39:46 -04:00
Core/Misc: Remove remaining COMPILER_HAS_CPP11_SUPPORT related macros
This commit is contained in:
@@ -19,11 +19,12 @@
|
||||
#ifndef _MMAP_FACTORY_H
|
||||
#define _MMAP_FACTORY_H
|
||||
|
||||
#include "Define.h"
|
||||
#include "MMapManager.h"
|
||||
#include "UnorderedMap.h"
|
||||
#include "DetourAlloc.h"
|
||||
#include "DetourNavMesh.h"
|
||||
#include "DetourNavMeshQuery.h"
|
||||
#include <unordered_map>
|
||||
|
||||
namespace MMAP
|
||||
{
|
||||
|
||||
@@ -19,17 +19,18 @@
|
||||
#ifndef _MMAP_MANAGER_H
|
||||
#define _MMAP_MANAGER_H
|
||||
|
||||
#include "UnorderedMap.h"
|
||||
#include "Define.h"
|
||||
#include "DetourAlloc.h"
|
||||
#include "DetourNavMesh.h"
|
||||
#include "DetourNavMeshQuery.h"
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
// move map related classes
|
||||
namespace MMAP
|
||||
{
|
||||
typedef UNORDERED_MAP<uint32, dtTileRef> MMapTileSet;
|
||||
typedef UNORDERED_MAP<uint32, dtNavMeshQuery*> NavMeshQuerySet;
|
||||
typedef std::unordered_map<uint32, dtTileRef> MMapTileSet;
|
||||
typedef std::unordered_map<uint32, dtNavMeshQuery*> NavMeshQuerySet;
|
||||
|
||||
// dummy struct to hold map's mmap data
|
||||
struct MMapData
|
||||
@@ -52,7 +53,7 @@ namespace MMAP
|
||||
};
|
||||
|
||||
|
||||
typedef UNORDERED_MAP<uint32, MMapData*> MMapDataSet;
|
||||
typedef std::unordered_map<uint32, MMapData*> MMapDataSet;
|
||||
|
||||
// singleton class
|
||||
// holds all all access to mmap loading unloading and meshes
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
#ifndef _VMAPMANAGER2_H
|
||||
#define _VMAPMANAGER2_H
|
||||
|
||||
#include "IVMapManager.h"
|
||||
#include "Dynamic/UnorderedMap.h"
|
||||
#include "Define.h"
|
||||
#include "IVMapManager.h"
|
||||
#include <unordered_map>
|
||||
#include <ace/Thread_Mutex.h>
|
||||
|
||||
//===========================================================
|
||||
@@ -63,8 +63,8 @@ namespace VMAP
|
||||
int iRefCount;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, StaticMapTree*> InstanceTreeMap;
|
||||
typedef UNORDERED_MAP<std::string, ManagedModel> ModelFileMap;
|
||||
typedef std::unordered_map<uint32, StaticMapTree*> InstanceTreeMap;
|
||||
typedef std::unordered_map<std::string, ManagedModel> ModelFileMap;
|
||||
|
||||
class VMapManager2 : public IVMapManager
|
||||
{
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
#define _MAPTREE_H
|
||||
|
||||
#include "Define.h"
|
||||
#include "Dynamic/UnorderedMap.h"
|
||||
#include "BoundingIntervalHierarchy.h"
|
||||
#include <unordered_map>
|
||||
|
||||
namespace VMAP
|
||||
{
|
||||
@@ -39,8 +39,8 @@ namespace VMAP
|
||||
|
||||
class StaticMapTree
|
||||
{
|
||||
typedef UNORDERED_MAP<uint32, bool> loadedTileMap;
|
||||
typedef UNORDERED_MAP<uint32, uint32> loadedSpawnMap;
|
||||
typedef std::unordered_map<uint32, bool> loadedTileMap;
|
||||
typedef std::unordered_map<uint32, uint32> loadedSpawnMap;
|
||||
private:
|
||||
uint32 iMapID;
|
||||
bool iIsTiled;
|
||||
|
||||
@@ -43,7 +43,7 @@ struct GameobjectModelData
|
||||
std::string name;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, GameobjectModelData> ModelList;
|
||||
typedef std::unordered_map<uint32, GameobjectModelData> ModelList;
|
||||
ModelList model_list;
|
||||
|
||||
void LoadGameObjectModelList()
|
||||
|
||||
@@ -231,7 +231,7 @@ class SmartScript
|
||||
SmartScriptType mScriptType;
|
||||
uint32 mEventPhase;
|
||||
|
||||
UNORDERED_MAP<int32, int32> mStoredDecimals;
|
||||
std::unordered_map<int32, int32> mStoredDecimals;
|
||||
uint32 mPathId;
|
||||
SmartAIEventList mStoredEvents;
|
||||
std::list<uint32>mRemIDs;
|
||||
|
||||
@@ -37,7 +37,7 @@ void SmartWaypointMgr::LoadFromDB()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
for (UNORDERED_MAP<uint32, WPPath*>::iterator itr = waypoint_map.begin(); itr != waypoint_map.end(); ++itr)
|
||||
for (std::unordered_map<uint32, WPPath*>::iterator itr = waypoint_map.begin(); itr != waypoint_map.end(); ++itr)
|
||||
{
|
||||
for (WPPath::iterator pathItr = itr->second->begin(); pathItr != itr->second->end(); ++pathItr)
|
||||
delete pathItr->second;
|
||||
@@ -96,7 +96,7 @@ void SmartWaypointMgr::LoadFromDB()
|
||||
|
||||
SmartWaypointMgr::~SmartWaypointMgr()
|
||||
{
|
||||
for (UNORDERED_MAP<uint32, WPPath*>::iterator itr = waypoint_map.begin(); itr != waypoint_map.end(); ++itr)
|
||||
for (std::unordered_map<uint32, WPPath*>::iterator itr = waypoint_map.begin(); itr != waypoint_map.end(); ++itr)
|
||||
{
|
||||
for (WPPath::iterator pathItr = itr->second->begin(); pathItr != itr->second->end(); ++pathItr)
|
||||
delete pathItr->second;
|
||||
|
||||
@@ -1338,7 +1338,7 @@ struct SmartScriptHolder
|
||||
bool enableTimed;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, WayPoint*> WPPath;
|
||||
typedef std::unordered_map<uint32, WayPoint*> WPPath;
|
||||
|
||||
typedef std::list<WorldObject*> ObjectList;
|
||||
typedef std::list<uint64> GuidList;
|
||||
@@ -1392,7 +1392,7 @@ public:
|
||||
delete m_guidList;
|
||||
}
|
||||
};
|
||||
typedef UNORDERED_MAP<uint32, ObjectGuidList*> ObjectListMap;
|
||||
typedef std::unordered_map<uint32, ObjectGuidList*> ObjectListMap;
|
||||
|
||||
class SmartWaypointMgr
|
||||
{
|
||||
@@ -1411,14 +1411,14 @@ class SmartWaypointMgr
|
||||
}
|
||||
|
||||
private:
|
||||
UNORDERED_MAP<uint32, WPPath*> waypoint_map;
|
||||
std::unordered_map<uint32, WPPath*> waypoint_map;
|
||||
};
|
||||
|
||||
// all events for a single entry
|
||||
typedef std::vector<SmartScriptHolder> SmartAIEventList;
|
||||
|
||||
// all events for all entries / guids
|
||||
typedef UNORDERED_MAP<int32, SmartAIEventList> SmartAIEventMap;
|
||||
typedef std::unordered_map<int32, SmartAIEventList> SmartAIEventMap;
|
||||
|
||||
// Helper Stores
|
||||
typedef std::map<uint32 /*entry*/, std::pair<uint32 /*spellId*/, SpellEffIndex /*effIndex*/> > CacheSpellContainer;
|
||||
|
||||
@@ -35,8 +35,8 @@ class WorldPacket;
|
||||
typedef std::vector<AchievementCriteriaEntry const*> AchievementCriteriaEntryList;
|
||||
typedef std::vector<AchievementEntry const*> AchievementEntryList;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, AchievementCriteriaEntryList> AchievementCriteriaListByAchievement;
|
||||
typedef UNORDERED_MAP<uint32, AchievementEntryList> AchievementListByReferencedId;
|
||||
typedef std::unordered_map<uint32, AchievementCriteriaEntryList> AchievementCriteriaListByAchievement;
|
||||
typedef std::unordered_map<uint32, AchievementEntryList> AchievementListByReferencedId;
|
||||
|
||||
struct CriteriaProgress
|
||||
{
|
||||
@@ -236,7 +236,7 @@ struct AchievementReward
|
||||
uint32 mailTemplate;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, AchievementReward> AchievementRewards;
|
||||
typedef std::unordered_map<uint32, AchievementReward> AchievementRewards;
|
||||
|
||||
struct AchievementRewardLocale
|
||||
{
|
||||
@@ -244,7 +244,7 @@ struct AchievementRewardLocale
|
||||
std::vector<std::string> text;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, AchievementRewardLocale> AchievementRewardLocales;
|
||||
typedef std::unordered_map<uint32, AchievementRewardLocale> AchievementRewardLocales;
|
||||
|
||||
struct CompletedAchievementData
|
||||
{
|
||||
@@ -252,8 +252,8 @@ struct CompletedAchievementData
|
||||
bool changed;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, CriteriaProgress> CriteriaProgressMap;
|
||||
typedef UNORDERED_MAP<uint32, CompletedAchievementData> CompletedAchievementMap;
|
||||
typedef std::unordered_map<uint32, CriteriaProgress> CriteriaProgressMap;
|
||||
typedef std::unordered_map<uint32, CompletedAchievementData> CompletedAchievementMap;
|
||||
|
||||
enum ProgressType
|
||||
{
|
||||
|
||||
@@ -145,7 +145,7 @@ class AuctionHouseMgr
|
||||
|
||||
public:
|
||||
|
||||
typedef UNORDERED_MAP<uint32, Item*> ItemMap;
|
||||
typedef std::unordered_map<uint32, Item*> ItemMap;
|
||||
|
||||
AuctionHouseObject* GetAuctionsMap(uint32 factionTemplateId);
|
||||
AuctionHouseObject* GetBidsMap(uint32 factionTemplateId);
|
||||
|
||||
@@ -27,7 +27,7 @@ class ArenaTeamMgr
|
||||
~ArenaTeamMgr();
|
||||
|
||||
public:
|
||||
typedef UNORDERED_MAP<uint32, ArenaTeam*> ArenaTeamContainer;
|
||||
typedef std::unordered_map<uint32, ArenaTeam*> ArenaTeamContainer;
|
||||
|
||||
ArenaTeam* GetArenaTeamById(uint32 arenaTeamId) const;
|
||||
ArenaTeam* GetArenaTeamByName(std::string const& arenaTeamName) const;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
typedef std::map<uint32, Battleground*> BattlegroundContainer;
|
||||
typedef std::set<uint32> BattlegroundClientIdsContainer;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, BattlegroundTypeId> BattleMastersMap;
|
||||
typedef std::unordered_map<uint32, BattlegroundTypeId> BattleMastersMap;
|
||||
|
||||
#define BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY 86400 // seconds in a day
|
||||
#define WS_ARENA_DISTRIBUTION_TIME 20001 // Custom worldstate
|
||||
|
||||
@@ -145,7 +145,7 @@ typedef std::map<uint64, LfgProposalPlayer> LfgProposalPlayerContainer;
|
||||
typedef std::map<uint64, LfgPlayerBoot> LfgPlayerBootContainer;
|
||||
typedef std::map<uint64, LfgGroupData> LfgGroupDataContainer;
|
||||
typedef std::map<uint64, LfgPlayerData> LfgPlayerDataContainer;
|
||||
typedef UNORDERED_MAP<uint32, LFGDungeonData> LFGDungeonContainer;
|
||||
typedef std::unordered_map<uint32, LFGDungeonData> LFGDungeonContainer;
|
||||
|
||||
// Data needed by SMSG_LFG_JOIN_RESULT
|
||||
struct LfgJoinResultData
|
||||
|
||||
@@ -170,7 +170,7 @@ struct CreatureTemplate
|
||||
};
|
||||
|
||||
// Benchmarked: Faster than std::map (insert/find)
|
||||
typedef UNORDERED_MAP<uint32, CreatureTemplate> CreatureTemplateContainer;
|
||||
typedef std::unordered_map<uint32, CreatureTemplate> CreatureTemplateContainer;
|
||||
|
||||
// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform
|
||||
#if defined(__GNUC__)
|
||||
@@ -218,7 +218,7 @@ struct CreatureBaseStats
|
||||
static CreatureBaseStats const* GetBaseStats(uint8 level, uint8 unitClass);
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint16, CreatureBaseStats> CreatureBaseStatsContainer;
|
||||
typedef std::unordered_map<uint16, CreatureBaseStats> CreatureBaseStatsContainer;
|
||||
|
||||
struct CreatureLocale
|
||||
{
|
||||
@@ -243,8 +243,8 @@ struct EquipmentInfo
|
||||
};
|
||||
|
||||
// Benchmarked: Faster than std::map (insert/find)
|
||||
typedef UNORDERED_MAP<uint8, EquipmentInfo> EquipmentInfoContainerInternal;
|
||||
typedef UNORDERED_MAP<uint32, EquipmentInfoContainerInternal> EquipmentInfoContainer;
|
||||
typedef std::unordered_map<uint8, EquipmentInfo> EquipmentInfoContainerInternal;
|
||||
typedef std::unordered_map<uint32, EquipmentInfoContainerInternal> EquipmentInfoContainer;
|
||||
|
||||
// from `creature` table
|
||||
struct CreatureData
|
||||
@@ -284,7 +284,7 @@ struct CreatureModelInfo
|
||||
};
|
||||
|
||||
// Benchmarked: Faster than std::map (insert/find)
|
||||
typedef UNORDERED_MAP<uint16, CreatureModelInfo> CreatureModelContainer;
|
||||
typedef std::unordered_map<uint16, CreatureModelInfo> CreatureModelContainer;
|
||||
|
||||
enum InhabitTypeValues
|
||||
{
|
||||
@@ -325,7 +325,7 @@ struct CreatureAddon
|
||||
std::vector<uint32> auras;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, CreatureAddon> CreatureAddonContainer;
|
||||
typedef std::unordered_map<uint32, CreatureAddon> CreatureAddonContainer;
|
||||
|
||||
// Vendors
|
||||
struct VendorItem
|
||||
@@ -401,7 +401,7 @@ struct TrainerSpell
|
||||
bool IsCastable() const { return learnedSpell[0] != spell; }
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32 /*spellid*/, TrainerSpell> TrainerSpellMap;
|
||||
typedef std::unordered_map<uint32 /*spellid*/, TrainerSpell> TrainerSpellMap;
|
||||
|
||||
struct TrainerSpellData
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#define _FORMATIONS_H
|
||||
|
||||
#include "Define.h"
|
||||
#include "UnorderedMap.h"
|
||||
#include <unordered_map>
|
||||
#include <map>
|
||||
|
||||
class Creature;
|
||||
@@ -36,7 +36,7 @@ struct FormationInfo
|
||||
uint16 point_2;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32/*memberDBGUID*/, FormationInfo*> CreatureGroupInfoType;
|
||||
typedef std::unordered_map<uint32/*memberDBGUID*/, FormationInfo*> CreatureGroupInfoType;
|
||||
|
||||
class FormationMgr
|
||||
{
|
||||
|
||||
@@ -538,7 +538,7 @@ struct GameObjectTemplate
|
||||
};
|
||||
|
||||
// Benchmarked: Faster than std::map (insert/find)
|
||||
typedef UNORDERED_MAP<uint32, GameObjectTemplate> GameObjectTemplateContainer;
|
||||
typedef std::unordered_map<uint32, GameObjectTemplate> GameObjectTemplateContainer;
|
||||
|
||||
class OPvPCapturePoint;
|
||||
struct TransportAnimation;
|
||||
|
||||
@@ -40,7 +40,7 @@ struct EnchStoreItem
|
||||
};
|
||||
|
||||
typedef std::vector<EnchStoreItem> EnchStoreList;
|
||||
typedef UNORDERED_MAP<uint32, EnchStoreList> EnchantmentStore;
|
||||
typedef std::unordered_map<uint32, EnchStoreList> EnchantmentStore;
|
||||
|
||||
static EnchantmentStore RandomItemEnch;
|
||||
|
||||
|
||||
@@ -744,7 +744,7 @@ struct ItemTemplate
|
||||
};
|
||||
|
||||
// Benchmarked: Faster than std::map (insert/find)
|
||||
typedef UNORDERED_MAP<uint32, ItemTemplate> ItemTemplateContainer;
|
||||
typedef std::unordered_map<uint32, ItemTemplate> ItemTemplateContainer;
|
||||
|
||||
struct ItemLocale
|
||||
{
|
||||
|
||||
@@ -116,7 +116,7 @@ class WorldObject;
|
||||
class WorldPacket;
|
||||
class ZoneScript;
|
||||
|
||||
typedef UNORDERED_MAP<Player*, UpdateData> UpdateDataMapType;
|
||||
typedef std::unordered_map<Player*, UpdateData> UpdateDataMapType;
|
||||
|
||||
class Object
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ struct PetSpell
|
||||
PetSpellType type;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, PetSpell> PetSpellMap;
|
||||
typedef std::unordered_map<uint32, PetSpell> PetSpellMap;
|
||||
typedef std::vector<uint32> AutoSpellList;
|
||||
|
||||
class Player;
|
||||
|
||||
@@ -121,8 +121,8 @@ struct SpellModifier
|
||||
Aura* const ownerAura;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, PlayerTalent*> PlayerTalentMap;
|
||||
typedef UNORDERED_MAP<uint32, PlayerSpell*> PlayerSpellMap;
|
||||
typedef std::unordered_map<uint32, PlayerTalent*> PlayerTalentMap;
|
||||
typedef std::unordered_map<uint32, PlayerSpell*> PlayerSpellMap;
|
||||
typedef std::list<SpellModifier*> SpellModList;
|
||||
|
||||
typedef std::list<uint64> WhisperListContainer;
|
||||
@@ -134,7 +134,7 @@ struct SpellCooldown
|
||||
};
|
||||
|
||||
typedef std::map<uint32, SpellCooldown> SpellCooldowns;
|
||||
typedef UNORDERED_MAP<uint32 /*instanceId*/, time_t/*releaseTime*/> InstanceTimeMap;
|
||||
typedef std::unordered_map<uint32 /*instanceId*/, time_t/*releaseTime*/> InstanceTimeMap;
|
||||
|
||||
enum TrainerSpellState
|
||||
{
|
||||
@@ -551,7 +551,7 @@ struct SkillStatusData
|
||||
SkillUpdateState uState;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, SkillStatusData> SkillStatusMap;
|
||||
typedef std::unordered_map<uint32, SkillStatusData> SkillStatusMap;
|
||||
|
||||
class Quest;
|
||||
class Spell;
|
||||
@@ -1544,7 +1544,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
uint8 unReadMails;
|
||||
time_t m_nextMailDelivereTime;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, Item*> ItemMap;
|
||||
typedef std::unordered_map<uint32, Item*> ItemMap;
|
||||
|
||||
ItemMap mMitems; //template defined in objectmgr.cpp
|
||||
|
||||
@@ -2169,7 +2169,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
/*** INSTANCE SYSTEM ***/
|
||||
/*********************************************************/
|
||||
|
||||
typedef UNORDERED_MAP< uint32 /*mapId*/, InstancePlayerBind > BoundInstancesMap;
|
||||
typedef std::unordered_map< uint32 /*mapId*/, InstancePlayerBind > BoundInstancesMap;
|
||||
|
||||
void UpdateHomebindTime(uint32 time);
|
||||
|
||||
@@ -2331,7 +2331,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
//We allow only one timed quest active at the same time. Below can then be simple value instead of set.
|
||||
typedef std::set<uint32> QuestSet;
|
||||
typedef std::set<uint32> SeasonalQuestSet;
|
||||
typedef UNORDERED_MAP<uint32, SeasonalQuestSet> SeasonalEventQuestMap;
|
||||
typedef std::unordered_map<uint32, SeasonalQuestSet> SeasonalEventQuestMap;
|
||||
QuestSet m_timedquests;
|
||||
QuestSet m_weeklyquests;
|
||||
QuestSet m_monthlyquests;
|
||||
|
||||
@@ -17699,7 +17699,7 @@ void Unit::BuildCooldownPacket(WorldPacket& data, uint8 flags, PacketCooldowns c
|
||||
data.Initialize(SMSG_SPELL_COOLDOWN, 8 + 1 + (4 + 4) * cooldowns.size());
|
||||
data << uint64(GetGUID());
|
||||
data << uint8(flags);
|
||||
for (UNORDERED_MAP<uint32, uint32>::const_iterator itr = cooldowns.begin(); itr != cooldowns.end(); ++itr)
|
||||
for (std::unordered_map<uint32, uint32>::const_iterator itr = cooldowns.begin(); itr != cooldowns.end(); ++itr)
|
||||
{
|
||||
data << uint32(itr->first);
|
||||
data << uint32(itr->second);
|
||||
|
||||
@@ -1040,7 +1040,7 @@ struct GlobalCooldown
|
||||
uint32 cast_time;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32 /*category*/, GlobalCooldown> GlobalCooldownList;
|
||||
typedef std::unordered_map<uint32 /*category*/, GlobalCooldown> GlobalCooldownList;
|
||||
|
||||
class GlobalCooldownMgr // Shared by Player and CharmInfo
|
||||
{
|
||||
@@ -1247,7 +1247,7 @@ enum SpellCooldownFlags
|
||||
SPELL_COOLDOWN_FLAG_INCLUDE_EVENT_COOLDOWNS = 0x2 ///< Starts GCD for spells that should start their cooldown on events, requires SPELL_COOLDOWN_FLAG_INCLUDE_GCD set
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, uint32> PacketCooldowns;
|
||||
typedef std::unordered_map<uint32, uint32> PacketCooldowns;
|
||||
|
||||
// delay time next attack to prevent client attack animation problems
|
||||
#define ATTACK_DISPLAY_DELAY 200
|
||||
|
||||
@@ -1620,7 +1620,7 @@ uint16 GameEventMgr::GetEventIdForQuest(Quest const* quest) const
|
||||
if (!quest)
|
||||
return 0;
|
||||
|
||||
UNORDERED_MAP<uint32, uint16>::const_iterator itr = _questToEventLinks.find(quest->GetQuestId());
|
||||
std::unordered_map<uint32, uint16>::const_iterator itr = _questToEventLinks.find(quest->GetQuestId());
|
||||
if (itr == _questToEventLinks.end())
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ class GameEventMgr
|
||||
QuestIdToEventConditionMap mQuestToEventConditions;
|
||||
GameEventNPCFlagMap mGameEventNPCFlags;
|
||||
ActiveEvents m_ActiveEvents;
|
||||
UNORDERED_MAP<uint32, uint16> _questToEventLinks;
|
||||
std::unordered_map<uint32, uint16> _questToEventLinks;
|
||||
bool isSystemInit;
|
||||
public:
|
||||
GameEventGuidMap mGameEventCreatureGuids;
|
||||
|
||||
@@ -431,7 +431,7 @@ void ObjectAccessor::UnloadAll()
|
||||
|
||||
/// Define the static members of HashMapHolder
|
||||
|
||||
template <class T> UNORDERED_MAP< uint64, T* > HashMapHolder<T>::m_objectMap;
|
||||
template <class T> std::unordered_map< uint64, T* > HashMapHolder<T>::m_objectMap;
|
||||
template <class T> typename HashMapHolder<T>::LockType HashMapHolder<T>::i_lock;
|
||||
|
||||
/// Global definitions for the hashmap storage
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "Define.h"
|
||||
#include <ace/Singleton.h>
|
||||
#include <ace/Thread_Mutex.h>
|
||||
#include "UnorderedMap.h"
|
||||
#include <unordered_map>
|
||||
|
||||
#include "UpdateData.h"
|
||||
|
||||
@@ -47,7 +47,7 @@ class HashMapHolder
|
||||
{
|
||||
public:
|
||||
|
||||
typedef UNORDERED_MAP<uint64, T*> MapType;
|
||||
typedef std::unordered_map<uint64, T*> MapType;
|
||||
typedef ACE_RW_Thread_Mutex LockType;
|
||||
|
||||
static void Insert(T* o)
|
||||
@@ -222,8 +222,8 @@ class ObjectAccessor
|
||||
static void _buildPacket(Player*, Object*, UpdateDataMapType&);
|
||||
void _update();
|
||||
|
||||
typedef UNORDERED_MAP<uint64, Corpse*> Player2CorpsesMapType;
|
||||
typedef UNORDERED_MAP<Player*, UpdateData>::value_type UpdateDataValueType;
|
||||
typedef std::unordered_map<uint64, Corpse*> Player2CorpsesMapType;
|
||||
typedef std::unordered_map<Player*, UpdateData>::value_type UpdateDataValueType;
|
||||
|
||||
std::set<Object*> i_objects;
|
||||
Player2CorpsesMapType i_player2corpse;
|
||||
|
||||
@@ -125,11 +125,11 @@ enum ScriptCommands
|
||||
SCRIPT_COMMAND_PLAYMOVIE = 34 // source = Player, datalong = movie id
|
||||
};
|
||||
|
||||
// Benchmarked: Faster than UNORDERED_MAP (insert/find)
|
||||
// Benchmarked: Faster than std::unordered_map (insert/find)
|
||||
typedef std::map<uint32, PageText> PageTextContainer;
|
||||
|
||||
// Benchmarked: Faster than std::map (insert/find)
|
||||
typedef UNORDERED_MAP<uint16, InstanceTemplate> InstanceTemplateContainer;
|
||||
typedef std::unordered_map<uint16, InstanceTemplate> InstanceTemplateContainer;
|
||||
|
||||
struct GameTele
|
||||
{
|
||||
@@ -142,7 +142,7 @@ struct GameTele
|
||||
std::wstring wnameLow;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, GameTele > GameTeleContainer;
|
||||
typedef std::unordered_map<uint32, GameTele > GameTeleContainer;
|
||||
|
||||
enum ScriptsType
|
||||
{
|
||||
@@ -444,7 +444,7 @@ struct BroadcastText
|
||||
}
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, BroadcastText> BroadcastTextContainer;
|
||||
typedef std::unordered_map<uint32, BroadcastText> BroadcastTextContainer;
|
||||
|
||||
typedef std::set<uint32> CellGuidSet;
|
||||
typedef std::map<uint32/*player guid*/, uint32/*instance*/> CellCorpseSet;
|
||||
@@ -454,8 +454,8 @@ struct CellObjectGuids
|
||||
CellGuidSet gameobjects;
|
||||
CellCorpseSet corpses;
|
||||
};
|
||||
typedef UNORDERED_MAP<uint32/*cell_id*/, CellObjectGuids> CellObjectGuidsMap;
|
||||
typedef UNORDERED_MAP<uint32/*(mapid, spawnMode) pair*/, CellObjectGuidsMap> MapObjectGuids;
|
||||
typedef std::unordered_map<uint32/*cell_id*/, CellObjectGuids> CellObjectGuidsMap;
|
||||
typedef std::unordered_map<uint32/*(mapid, spawnMode) pair*/, CellObjectGuidsMap> MapObjectGuids;
|
||||
|
||||
// Trinity string ranges
|
||||
#define MIN_TRINITY_STRING_ID 1 // 'trinity_string'
|
||||
@@ -472,19 +472,19 @@ struct TrinityStringLocale
|
||||
};
|
||||
|
||||
typedef std::map<uint64, uint64> LinkedRespawnContainer;
|
||||
typedef UNORDERED_MAP<uint32, CreatureData> CreatureDataContainer;
|
||||
typedef UNORDERED_MAP<uint32, GameObjectData> GameObjectDataContainer;
|
||||
typedef std::unordered_map<uint32, CreatureData> CreatureDataContainer;
|
||||
typedef std::unordered_map<uint32, GameObjectData> GameObjectDataContainer;
|
||||
typedef std::map<TempSummonGroupKey, std::vector<TempSummonData> > TempSummonDataContainer;
|
||||
typedef UNORDERED_MAP<uint32, CreatureLocale> CreatureLocaleContainer;
|
||||
typedef UNORDERED_MAP<uint32, GameObjectLocale> GameObjectLocaleContainer;
|
||||
typedef UNORDERED_MAP<uint32, ItemLocale> ItemLocaleContainer;
|
||||
typedef UNORDERED_MAP<uint32, ItemSetNameLocale> ItemSetNameLocaleContainer;
|
||||
typedef UNORDERED_MAP<uint32, QuestLocale> QuestLocaleContainer;
|
||||
typedef UNORDERED_MAP<uint32, NpcTextLocale> NpcTextLocaleContainer;
|
||||
typedef UNORDERED_MAP<uint32, PageTextLocale> PageTextLocaleContainer;
|
||||
typedef UNORDERED_MAP<int32, TrinityStringLocale> TrinityStringLocaleContainer;
|
||||
typedef UNORDERED_MAP<uint32, GossipMenuItemsLocale> GossipMenuItemsLocaleContainer;
|
||||
typedef UNORDERED_MAP<uint32, PointOfInterestLocale> PointOfInterestLocaleContainer;
|
||||
typedef std::unordered_map<uint32, CreatureLocale> CreatureLocaleContainer;
|
||||
typedef std::unordered_map<uint32, GameObjectLocale> GameObjectLocaleContainer;
|
||||
typedef std::unordered_map<uint32, ItemLocale> ItemLocaleContainer;
|
||||
typedef std::unordered_map<uint32, ItemSetNameLocale> ItemSetNameLocaleContainer;
|
||||
typedef std::unordered_map<uint32, QuestLocale> QuestLocaleContainer;
|
||||
typedef std::unordered_map<uint32, NpcTextLocale> NpcTextLocaleContainer;
|
||||
typedef std::unordered_map<uint32, PageTextLocale> PageTextLocaleContainer;
|
||||
typedef std::unordered_map<int32, TrinityStringLocale> TrinityStringLocaleContainer;
|
||||
typedef std::unordered_map<uint32, GossipMenuItemsLocale> GossipMenuItemsLocaleContainer;
|
||||
typedef std::unordered_map<uint32, PointOfInterestLocale> PointOfInterestLocaleContainer;
|
||||
|
||||
typedef std::multimap<uint32, uint32> QuestRelations;
|
||||
typedef std::pair<QuestRelations::const_iterator, QuestRelations::const_iterator> QuestRelationBounds;
|
||||
@@ -510,7 +510,7 @@ struct MailLevelReward
|
||||
};
|
||||
|
||||
typedef std::list<MailLevelReward> MailLevelRewardList;
|
||||
typedef UNORDERED_MAP<uint8, MailLevelRewardList> MailLevelRewardContainer;
|
||||
typedef std::unordered_map<uint8, MailLevelRewardList> MailLevelRewardContainer;
|
||||
|
||||
// We assume the rate is in general the same for all three types below, but chose to keep three for scalability and customization
|
||||
struct RepRewardRate
|
||||
@@ -612,7 +612,7 @@ struct QuestPOI
|
||||
};
|
||||
|
||||
typedef std::vector<QuestPOI> QuestPOIVector;
|
||||
typedef UNORDERED_MAP<uint32, QuestPOIVector> QuestPOIContainer;
|
||||
typedef std::unordered_map<uint32, QuestPOIVector> QuestPOIContainer;
|
||||
|
||||
struct GraveYardData
|
||||
{
|
||||
@@ -624,8 +624,8 @@ typedef std::multimap<uint32, GraveYardData> GraveYardContainer;
|
||||
typedef std::pair<GraveYardContainer::const_iterator, GraveYardContainer::const_iterator> GraveYardMapBounds;
|
||||
typedef std::pair<GraveYardContainer::iterator, GraveYardContainer::iterator> GraveYardMapBoundsNonConst;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, VendorItemData> CacheVendorItemContainer;
|
||||
typedef UNORDERED_MAP<uint32, TrainerSpellData> CacheTrainerSpellContainer;
|
||||
typedef std::unordered_map<uint32, VendorItemData> CacheVendorItemContainer;
|
||||
typedef std::unordered_map<uint32, TrainerSpellData> CacheTrainerSpellContainer;
|
||||
|
||||
enum SkillRangeType
|
||||
{
|
||||
@@ -673,7 +673,7 @@ struct DungeonEncounter
|
||||
};
|
||||
|
||||
typedef std::list<DungeonEncounter const*> DungeonEncounterList;
|
||||
typedef UNORDERED_MAP<uint32, DungeonEncounterList> DungeonEncounterContainer;
|
||||
typedef std::unordered_map<uint32, DungeonEncounterList> DungeonEncounterContainer;
|
||||
|
||||
class PlayerDumpReader;
|
||||
|
||||
@@ -687,21 +687,21 @@ class ObjectMgr
|
||||
~ObjectMgr();
|
||||
|
||||
public:
|
||||
typedef UNORDERED_MAP<uint32, Item*> ItemMap;
|
||||
typedef std::unordered_map<uint32, Item*> ItemMap;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, Quest*> QuestMap;
|
||||
typedef std::unordered_map<uint32, Quest*> QuestMap;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, AreaTrigger> AreaTriggerContainer;
|
||||
typedef std::unordered_map<uint32, AreaTrigger> AreaTriggerContainer;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, uint32> AreaTriggerScriptContainer;
|
||||
typedef std::unordered_map<uint32, uint32> AreaTriggerScriptContainer;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, AccessRequirement*> AccessRequirementContainer;
|
||||
typedef std::unordered_map<uint32, AccessRequirement*> AccessRequirementContainer;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, RepRewardRate > RepRewardRateContainer;
|
||||
typedef UNORDERED_MAP<uint32, ReputationOnKillEntry> RepOnKillContainer;
|
||||
typedef UNORDERED_MAP<uint32, RepSpilloverTemplate> RepSpilloverTemplateContainer;
|
||||
typedef std::unordered_map<uint32, RepRewardRate > RepRewardRateContainer;
|
||||
typedef std::unordered_map<uint32, ReputationOnKillEntry> RepOnKillContainer;
|
||||
typedef std::unordered_map<uint32, RepSpilloverTemplate> RepSpilloverTemplateContainer;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, PointOfInterest> PointOfInterestContainer;
|
||||
typedef std::unordered_map<uint32, PointOfInterest> PointOfInterestContainer;
|
||||
|
||||
typedef std::vector<std::string> ScriptNameContainer;
|
||||
|
||||
@@ -881,7 +881,7 @@ class ObjectMgr
|
||||
|
||||
DungeonEncounterList const* GetDungeonEncounterList(uint32 mapId, Difficulty difficulty)
|
||||
{
|
||||
UNORDERED_MAP<uint32, DungeonEncounterList>::const_iterator itr = _dungeonEncounterStore.find(MAKE_PAIR32(mapId, difficulty));
|
||||
std::unordered_map<uint32, DungeonEncounterList>::const_iterator itr = _dungeonEncounterStore.find(MAKE_PAIR32(mapId, difficulty));
|
||||
if (itr != _dungeonEncounterStore.end())
|
||||
return &itr->second;
|
||||
return NULL;
|
||||
@@ -1307,8 +1307,8 @@ class ObjectMgr
|
||||
|
||||
QuestMap _questTemplates;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, GossipText> GossipTextContainer;
|
||||
typedef UNORDERED_MAP<uint32, uint32> QuestAreaTriggerContainer;
|
||||
typedef std::unordered_map<uint32, GossipText> GossipTextContainer;
|
||||
typedef std::unordered_map<uint32, uint32> QuestAreaTriggerContainer;
|
||||
typedef std::set<uint32> TavernAreaTriggerContainer;
|
||||
typedef std::set<uint32> GameObjectForQuestContainer;
|
||||
|
||||
@@ -1389,7 +1389,7 @@ class ObjectMgr
|
||||
HalfNameContainer _petHalfName0;
|
||||
HalfNameContainer _petHalfName1;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, ItemSetNameEntry> ItemSetNameContainer;
|
||||
typedef std::unordered_map<uint32, ItemSetNameEntry> ItemSetNameContainer;
|
||||
ItemSetNameContainer _itemSetNameStore;
|
||||
|
||||
MapObjectGuids _mapObjectGuidsStore;
|
||||
|
||||
@@ -171,7 +171,7 @@ class Group
|
||||
typedef std::list<MemberSlot> MemberSlotList;
|
||||
typedef MemberSlotList::const_iterator member_citerator;
|
||||
|
||||
typedef UNORDERED_MAP< uint32 /*mapId*/, InstanceGroupBind> BoundInstancesMap;
|
||||
typedef std::unordered_map< uint32 /*mapId*/, InstanceGroupBind> BoundInstancesMap;
|
||||
protected:
|
||||
typedef MemberSlotList::iterator member_witerator;
|
||||
typedef std::set<Player*> InvitesList;
|
||||
|
||||
@@ -637,7 +637,7 @@ private:
|
||||
void CanStoreItemInTab(Item* pItem, uint8 skipSlotId, bool merge, uint32& count);
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, Member*> Members;
|
||||
typedef std::unordered_map<uint32, Member*> Members;
|
||||
typedef std::vector<RankInfo> Ranks;
|
||||
typedef std::vector<BankTab*> BankTabs;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
void ResetTimes();
|
||||
protected:
|
||||
typedef UNORDERED_MAP<uint32, Guild*> GuildContainer;
|
||||
typedef std::unordered_map<uint32, Guild*> GuildContainer;
|
||||
uint32 NextGuildId;
|
||||
GuildContainer GuildStore;
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <ace/Thread_Mutex.h>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include "UnorderedMap.h"
|
||||
#include <unordered_map>
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DBCEnums.h"
|
||||
#include "ObjectDefines.h"
|
||||
@@ -140,7 +140,7 @@ class InstanceSave
|
||||
ACE_Thread_Mutex _lock;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32 /*PAIR32(map, difficulty)*/, time_t /*resetTime*/> ResetTimeByMapDifficultyMap;
|
||||
typedef std::unordered_map<uint32 /*PAIR32(map, difficulty)*/, time_t /*resetTime*/> ResetTimeByMapDifficultyMap;
|
||||
|
||||
class InstanceSaveManager
|
||||
{
|
||||
@@ -152,7 +152,7 @@ class InstanceSaveManager
|
||||
~InstanceSaveManager();
|
||||
|
||||
public:
|
||||
typedef UNORDERED_MAP<uint32 /*InstanceId*/, InstanceSave*> InstanceSaveHashMap;
|
||||
typedef std::unordered_map<uint32 /*InstanceId*/, InstanceSave*> InstanceSaveHashMap;
|
||||
|
||||
/* resetTime is a global propery of each (raid/heroic) map
|
||||
all instances of that map reset at the same time */
|
||||
|
||||
@@ -178,7 +178,7 @@ typedef std::vector<QuestItem> QuestItemList;
|
||||
typedef std::vector<LootItem> LootItemList;
|
||||
typedef std::map<uint32, QuestItemList*> QuestItemMap;
|
||||
typedef std::list<LootStoreItem*> LootStoreItemList;
|
||||
typedef UNORDERED_MAP<uint32, LootTemplate*> LootTemplateMap;
|
||||
typedef std::unordered_map<uint32, LootTemplate*> LootTemplateMap;
|
||||
|
||||
typedef std::set<uint32> LootIdSet;
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ struct ZoneDynamicInfo
|
||||
|
||||
typedef std::map<uint32/*leaderDBGUID*/, CreatureGroup*> CreatureGroupHolderType;
|
||||
|
||||
typedef UNORDERED_MAP<uint32 /*zoneId*/, ZoneDynamicInfo> ZoneDynamicInfoMap;
|
||||
typedef std::unordered_map<uint32 /*zoneId*/, ZoneDynamicInfo> ZoneDynamicInfoMap;
|
||||
|
||||
class Map : public GridRefManager<NGridType>
|
||||
{
|
||||
@@ -482,7 +482,7 @@ class Map : public GridRefManager<NGridType>
|
||||
time_t GetLinkedRespawnTime(uint64 guid) const;
|
||||
time_t GetCreatureRespawnTime(uint32 dbGuid) const
|
||||
{
|
||||
UNORDERED_MAP<uint32 /*dbGUID*/, time_t>::const_iterator itr = _creatureRespawnTimes.find(dbGuid);
|
||||
std::unordered_map<uint32 /*dbGUID*/, time_t>::const_iterator itr = _creatureRespawnTimes.find(dbGuid);
|
||||
if (itr != _creatureRespawnTimes.end())
|
||||
return itr->second;
|
||||
|
||||
@@ -491,7 +491,7 @@ class Map : public GridRefManager<NGridType>
|
||||
|
||||
time_t GetGORespawnTime(uint32 dbGuid) const
|
||||
{
|
||||
UNORDERED_MAP<uint32 /*dbGUID*/, time_t>::const_iterator itr = _goRespawnTimes.find(dbGuid);
|
||||
std::unordered_map<uint32 /*dbGUID*/, time_t>::const_iterator itr = _goRespawnTimes.find(dbGuid);
|
||||
if (itr != _goRespawnTimes.end())
|
||||
return itr->second;
|
||||
|
||||
@@ -658,8 +658,8 @@ class Map : public GridRefManager<NGridType>
|
||||
m_activeNonPlayers.erase(obj);
|
||||
}
|
||||
|
||||
UNORDERED_MAP<uint32 /*dbGUID*/, time_t> _creatureRespawnTimes;
|
||||
UNORDERED_MAP<uint32 /*dbGUID*/, time_t> _goRespawnTimes;
|
||||
std::unordered_map<uint32 /*dbGUID*/, time_t> _creatureRespawnTimes;
|
||||
std::unordered_map<uint32 /*dbGUID*/, time_t> _goRespawnTimes;
|
||||
|
||||
ZoneDynamicInfoMap _zoneDynamicInfo;
|
||||
uint32 _defaultLight;
|
||||
|
||||
@@ -27,7 +27,7 @@ class MapInstanced : public Map
|
||||
{
|
||||
friend class MapManager;
|
||||
public:
|
||||
typedef UNORDERED_MAP< uint32, Map*> InstancedMaps;
|
||||
typedef std::unordered_map< uint32, Map*> InstancedMaps;
|
||||
|
||||
MapInstanced(uint32 id, time_t expiry);
|
||||
~MapInstanced() { }
|
||||
|
||||
@@ -126,7 +126,7 @@ class MapManager
|
||||
MapUpdater * GetMapUpdater() { return &m_updater; }
|
||||
|
||||
private:
|
||||
typedef UNORDERED_MAP<uint32, Map*> MapMapType;
|
||||
typedef std::unordered_map<uint32, Map*> MapMapType;
|
||||
typedef std::vector<bool> InstanceIds;
|
||||
|
||||
MapManager();
|
||||
|
||||
@@ -31,10 +31,10 @@ class Map;
|
||||
|
||||
typedef Movement::Spline<double> TransportSpline;
|
||||
typedef std::vector<KeyFrame> KeyFrameVec;
|
||||
typedef UNORDERED_MAP<uint32, TransportTemplate> TransportTemplates;
|
||||
typedef std::unordered_map<uint32, TransportTemplate> TransportTemplates;
|
||||
typedef std::set<Transport*> TransportSet;
|
||||
typedef UNORDERED_MAP<uint32, TransportSet> TransportMap;
|
||||
typedef UNORDERED_MAP<uint32, std::set<uint32> > TransportInstanceMap;
|
||||
typedef std::unordered_map<uint32, TransportSet> TransportMap;
|
||||
typedef std::unordered_map<uint32, std::set<uint32> > TransportInstanceMap;
|
||||
|
||||
struct KeyFrame
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ struct WaypointData
|
||||
};
|
||||
|
||||
typedef std::vector<WaypointData*> WaypointPath;
|
||||
typedef UNORDERED_MAP<uint32, WaypointPath> WaypointPathContainer;
|
||||
typedef std::unordered_map<uint32, WaypointPath> WaypointPathContainer;
|
||||
|
||||
class WaypointMgr
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ class SystemMgr
|
||||
~SystemMgr() { }
|
||||
|
||||
public:
|
||||
typedef UNORDERED_MAP<uint32, ScriptPointVector> PointMoveMap;
|
||||
typedef std::unordered_map<uint32, ScriptPointVector> PointMoveMap;
|
||||
|
||||
//Database
|
||||
void LoadScriptWaypoints();
|
||||
|
||||
@@ -951,7 +951,7 @@ class WorldSession
|
||||
WorldSession* Session;
|
||||
|
||||
private:
|
||||
typedef UNORDERED_MAP<uint16, bool> OpcodeStatusMap;
|
||||
typedef std::unordered_map<uint16, bool> OpcodeStatusMap;
|
||||
OpcodeStatusMap _isOpcodeAllowed; // could be bool array, but wouldn't be practical for game versions with non-linear opcodes
|
||||
Policy _policy;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ struct SkillDiscoveryEntry
|
||||
};
|
||||
|
||||
typedef std::list<SkillDiscoveryEntry> SkillDiscoveryList;
|
||||
typedef UNORDERED_MAP<int32, SkillDiscoveryList> SkillDiscoveryMap;
|
||||
typedef std::unordered_map<int32, SkillDiscoveryList> SkillDiscoveryMap;
|
||||
|
||||
static SkillDiscoveryMap SkillDiscoveryStore;
|
||||
|
||||
|
||||
@@ -23,14 +23,15 @@
|
||||
|
||||
#include <ace/Singleton.h>
|
||||
|
||||
#include "Define.h"
|
||||
#include "DBCStructure.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "UnorderedMap.h"
|
||||
#include "Util.h"
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
|
||||
class SpellInfo;
|
||||
class Player;
|
||||
@@ -287,7 +288,7 @@ struct SpellProcEventEntry
|
||||
uint32 cooldown; // hidden cooldown used for some spell proc events, applied to _triggered_spell_
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, SpellProcEventEntry> SpellProcEventMap;
|
||||
typedef std::unordered_map<uint32, SpellProcEventEntry> SpellProcEventMap;
|
||||
|
||||
struct SpellProcEntry
|
||||
{
|
||||
@@ -305,7 +306,7 @@ struct SpellProcEntry
|
||||
uint32 charges; // if nonzero - owerwrite procCharges field for given Spell.dbc entry, defines how many times proc can occur before aura remove, 0 - infinite
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, SpellProcEntry> SpellProcMap;
|
||||
typedef std::unordered_map<uint32, SpellProcEntry> SpellProcMap;
|
||||
|
||||
struct SpellEnchantProcEntry
|
||||
{
|
||||
@@ -314,7 +315,7 @@ struct SpellEnchantProcEntry
|
||||
uint32 procEx;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, SpellEnchantProcEntry> SpellEnchantProcEventMap;
|
||||
typedef std::unordered_map<uint32, SpellEnchantProcEntry> SpellEnchantProcEventMap;
|
||||
|
||||
struct SpellBonusEntry
|
||||
{
|
||||
@@ -324,7 +325,7 @@ struct SpellBonusEntry
|
||||
float ap_dot_bonus;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, SpellBonusEntry> SpellBonusMap;
|
||||
typedef std::unordered_map<uint32, SpellBonusEntry> SpellBonusMap;
|
||||
|
||||
enum SpellGroup
|
||||
{
|
||||
@@ -445,7 +446,7 @@ enum EffectRadiusIndex
|
||||
class PetAura
|
||||
{
|
||||
private:
|
||||
typedef UNORDERED_MAP<uint32, uint32> PetAuraMap;
|
||||
typedef std::unordered_map<uint32, uint32> PetAuraMap;
|
||||
|
||||
public:
|
||||
PetAura() : removeOnChangePet(false), damage(0) { }
|
||||
@@ -525,7 +526,7 @@ struct SpellChainNode
|
||||
uint8 rank;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, SpellChainNode> SpellChainMap;
|
||||
typedef std::unordered_map<uint32, SpellChainNode> SpellChainMap;
|
||||
|
||||
// spell_id req_spell
|
||||
typedef std::multimap<uint32, uint32> SpellRequiredMap;
|
||||
|
||||
@@ -70,15 +70,15 @@ struct CreatureTextId
|
||||
};
|
||||
|
||||
typedef std::vector<CreatureTextEntry> CreatureTextGroup; //texts in a group
|
||||
typedef UNORDERED_MAP<uint8, CreatureTextGroup> CreatureTextHolder; //groups for a creature by groupid
|
||||
typedef UNORDERED_MAP<uint32, CreatureTextHolder> CreatureTextMap; //all creatures by entry
|
||||
typedef std::unordered_map<uint8, CreatureTextGroup> CreatureTextHolder; //groups for a creature by groupid
|
||||
typedef std::unordered_map<uint32, CreatureTextHolder> CreatureTextMap; //all creatures by entry
|
||||
|
||||
typedef std::map<CreatureTextId, CreatureTextLocale> LocaleCreatureTextMap;
|
||||
|
||||
//used for handling non-repeatable random texts
|
||||
typedef std::vector<uint8> CreatureTextRepeatIds;
|
||||
typedef UNORDERED_MAP<uint8, CreatureTextRepeatIds> CreatureTextRepeatGroup;
|
||||
typedef UNORDERED_MAP<uint64, CreatureTextRepeatGroup> CreatureTextRepeatMap;//guid based
|
||||
typedef std::unordered_map<uint8, CreatureTextRepeatIds> CreatureTextRepeatGroup;
|
||||
typedef std::unordered_map<uint64, CreatureTextRepeatGroup> CreatureTextRepeatMap;//guid based
|
||||
|
||||
class CreatureTextMgr
|
||||
{
|
||||
|
||||
@@ -34,8 +34,8 @@ namespace WeatherMgr
|
||||
|
||||
namespace
|
||||
{
|
||||
typedef UNORDERED_MAP<uint32, Trinity::AutoPtr<Weather, ACE_Null_Mutex> > WeatherMap;
|
||||
typedef UNORDERED_MAP<uint32, WeatherData> WeatherZoneMap;
|
||||
typedef std::unordered_map<uint32, Trinity::AutoPtr<Weather, ACE_Null_Mutex> > WeatherMap;
|
||||
typedef std::unordered_map<uint32, WeatherData> WeatherZoneMap;
|
||||
|
||||
WeatherMap m_weathers;
|
||||
WeatherZoneMap mWeatherZoneMap;
|
||||
|
||||
@@ -502,7 +502,7 @@ private:
|
||||
CliCommandHolder& operator=(CliCommandHolder const& right) = delete;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, WorldSession*> SessionMap;
|
||||
typedef std::unordered_map<uint32, WorldSession*> SessionMap;
|
||||
|
||||
struct CharacterNameData
|
||||
{
|
||||
@@ -774,7 +774,7 @@ class World
|
||||
uint32 m_currentTime;
|
||||
|
||||
SessionMap m_sessions;
|
||||
typedef UNORDERED_MAP<uint32, time_t> DisconnectMap;
|
||||
typedef std::unordered_map<uint32, time_t> DisconnectMap;
|
||||
DisconnectMap m_disconnects;
|
||||
uint32 m_maxActiveSessionCount;
|
||||
uint32 m_maxQueuedSessionCount;
|
||||
|
||||
@@ -483,7 +483,7 @@ public:
|
||||
uint64 StomachEnterTarget;
|
||||
|
||||
//Stomach map, bool = true then in stomach
|
||||
UNORDERED_MAP<uint64, bool> Stomach_Map;
|
||||
std::unordered_map<uint64, bool> Stomach_Map;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -536,7 +536,7 @@ public:
|
||||
if (Stomach_Map.empty())
|
||||
return NULL;
|
||||
|
||||
UNORDERED_MAP<uint64, bool>::const_iterator i = Stomach_Map.begin();
|
||||
std::unordered_map<uint64, bool>::const_iterator i = Stomach_Map.begin();
|
||||
|
||||
std::list<Unit*> temp;
|
||||
std::list<Unit*>::const_iterator j;
|
||||
@@ -680,7 +680,7 @@ public:
|
||||
|
||||
DoCast(me, SPELL_PURPLE_COLORATION, true);
|
||||
|
||||
UNORDERED_MAP<uint64, bool>::iterator i = Stomach_Map.begin();
|
||||
std::unordered_map<uint64, bool>::iterator i = Stomach_Map.begin();
|
||||
|
||||
//Kick all players out of stomach
|
||||
while (i != Stomach_Map.end())
|
||||
@@ -712,7 +712,7 @@ public:
|
||||
if (StomachAcidTimer <= diff)
|
||||
{
|
||||
//Apply aura to all players in stomach
|
||||
UNORDERED_MAP<uint64, bool>::iterator i = Stomach_Map.begin();
|
||||
std::unordered_map<uint64, bool>::iterator i = Stomach_Map.begin();
|
||||
|
||||
while (i != Stomach_Map.end())
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
#include "Define.h"
|
||||
|
||||
#include "Dynamic/UnorderedMap.h"
|
||||
#include <unordered_map>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -55,12 +55,4 @@
|
||||
# error "FATAL ERROR: Unknown compiler."
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && __cplusplus == 201103L
|
||||
# define COMPILER_HAS_CPP11_SUPPORT 1
|
||||
#elif _MSC_VER >= 1700
|
||||
# define COMPILER_HAS_CPP11_SUPPORT 1
|
||||
#else
|
||||
# define COMPILER_HAS_CPP11_SUPPORT 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_HASH_NAMESPACE_H
|
||||
#define TRINITY_HASH_NAMESPACE_H
|
||||
|
||||
#include "Define.h"
|
||||
|
||||
#if COMPILER_HAS_CPP11_SUPPORT
|
||||
# define HASH_NAMESPACE_START namespace std {
|
||||
# define HASH_NAMESPACE_END }
|
||||
#elif defined(_STLPORT_VERSION)
|
||||
# define HASH_NAMESPACE_START namespace std {
|
||||
# define HASH_NAMESPACE_END }
|
||||
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1600 // VS100
|
||||
# define HASH_NAMESPACE_START namespace std {
|
||||
# define HASH_NAMESPACE_END }
|
||||
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1500 && _HAS_TR1
|
||||
# define HASH_NAMESPACE_START namespace std { namespace tr1 {
|
||||
# define HASH_NAMESPACE_END } }
|
||||
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1300
|
||||
# define HASH_NAMESPACE_START namespace stdext {
|
||||
# define HASH_NAMESPACE_END }
|
||||
|
||||
#if !_HAS_TRADITIONAL_STL
|
||||
#ifndef HASH_NAMESPACE
|
||||
#define HASH_NAMESPACE
|
||||
#else
|
||||
|
||||
// can be not used by some platforms, so provide fake forward
|
||||
HASH_NAMESPACE_START
|
||||
|
||||
template<class K>
|
||||
class hash
|
||||
{
|
||||
public:
|
||||
size_t operator() (K const&);
|
||||
};
|
||||
|
||||
HASH_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#elif COMPILER == COMPILER_INTEL
|
||||
# define HASH_NAMESPACE_START namespace std {
|
||||
# define HASH_NAMESPACE_END }
|
||||
#elif COMPILER == COMPILER_GNU && defined(__clang__) && defined(_LIBCPP_VERSION)
|
||||
# define HASH_NAMESPACE_START namespace std {
|
||||
# define HASH_NAMESPACE_END }
|
||||
#elif COMPILER == COMPILER_GNU && GCC_VERSION > 40200
|
||||
# define HASH_NAMESPACE_START namespace std { namespace tr1 {
|
||||
# define HASH_NAMESPACE_END } }
|
||||
#elif COMPILER == COMPILER_GNU && GCC_VERSION >= 30000
|
||||
# define HASH_NAMESPACE_START namespace __gnu_cxx {
|
||||
# define HASH_NAMESPACE_END }
|
||||
|
||||
#include <ext/hash_fun.h>
|
||||
#include <string>
|
||||
|
||||
HASH_NAMESPACE_START
|
||||
|
||||
template<>
|
||||
class hash<unsigned long long>
|
||||
{
|
||||
public:
|
||||
size_t operator()(const unsigned long long &__x) const { return (size_t)__x; }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class hash<T *>
|
||||
{
|
||||
public:
|
||||
size_t operator()(T * const &__x) const { return (size_t)__x; }
|
||||
};
|
||||
|
||||
template<> struct hash<std::string>
|
||||
{
|
||||
size_t operator()(const std::string &__x) const
|
||||
{
|
||||
return hash<char const*>()(__x.c_str());
|
||||
}
|
||||
};
|
||||
|
||||
HASH_NAMESPACE_END
|
||||
|
||||
#else
|
||||
# define HASH_NAMESPACE_START namespace std {
|
||||
# define HASH_NAMESPACE_END }
|
||||
#endif
|
||||
|
||||
#if COMPILER != COMPILER_MICROSOFT
|
||||
|
||||
// Visual Studio use non standard hash calculation function, so provide fake forward for other
|
||||
HASH_NAMESPACE_START
|
||||
|
||||
template<class K>
|
||||
size_t hash_value(K const&);
|
||||
|
||||
HASH_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -20,12 +20,12 @@
|
||||
#define TRINITY_OBJECTREGISTRY_H
|
||||
|
||||
#include "Define.h"
|
||||
#include "Dynamic/UnorderedMap.h"
|
||||
#include <ace/Singleton.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
|
||||
/** ObjectRegistry holds all registry item of the same type
|
||||
*/
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_UNORDERED_MAP_H
|
||||
#define TRINITY_UNORDERED_MAP_H
|
||||
|
||||
#include "HashNamespace.h"
|
||||
|
||||
#if COMPILER_HAS_CPP11_SUPPORT
|
||||
# include <unordered_map>
|
||||
#elif COMPILER == COMPILER_INTEL
|
||||
# include <ext/hash_map>
|
||||
#elif COMPILER == COMPILER_GNU && defined(__clang__) && defined(_LIBCPP_VERSION)
|
||||
# include <unordered_map>
|
||||
#elif COMPILER == COMPILER_GNU && GCC_VERSION > 40200
|
||||
# include <tr1/unordered_map>
|
||||
#elif COMPILER == COMPILER_GNU && GCC_VERSION >= 30000
|
||||
# include <ext/hash_map>
|
||||
#elif COMPILER == COMPILER_MICROSOFT && ((_MSC_VER >= 1500 && _HAS_TR1) || _MSC_VER >= 1700) // VC9.0 SP1 and later
|
||||
# include <unordered_map>
|
||||
#else
|
||||
# include <hash_map>
|
||||
#endif
|
||||
|
||||
#ifdef _STLPORT_VERSION
|
||||
# define UNORDERED_MAP std::hash_map
|
||||
# define UNORDERED_MULTIMAP std::hash_multimap
|
||||
#elif COMPILER_HAS_CPP11_SUPPORT
|
||||
# define UNORDERED_MAP std::unordered_map
|
||||
# define UNORDERED_MULTIMAP std::unordered_multimap
|
||||
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1600 // VS100
|
||||
# define UNORDERED_MAP std::tr1::unordered_map
|
||||
# define UNORDERED_MULTIMAP std::tr1::unordered_multimap
|
||||
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1500 && _HAS_TR1
|
||||
# define UNORDERED_MAP std::tr1::unordered_map
|
||||
# define UNORDERED_MULTIMAP std::tr1::unordered_multimap
|
||||
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1300
|
||||
# define UNORDERED_MAP stdext::hash_map
|
||||
# define UNORDERED_MULTIMAP stdext::hash_multimap
|
||||
#elif COMPILER == COMPILER_INTEL
|
||||
# define UNORDERED_MAP std::hash_map
|
||||
# define UNORDERED_MULTIMAP std::hash_multimap
|
||||
#elif COMPILER == COMPILER_GNU && defined(__clang__) && defined(_LIBCPP_VERSION)
|
||||
# define UNORDERED_MAP std::unordered_map
|
||||
# define UNORDERED_MULTIMAP std::unordered_multimap
|
||||
#elif COMPILER == COMPILER_GNU && GCC_VERSION > 40200
|
||||
# define UNORDERED_MAP std::tr1::unordered_map
|
||||
# define UNORDERED_MULTIMAP std::tr1::unordered_multimap
|
||||
#elif COMPILER == COMPILER_GNU && GCC_VERSION >= 30000
|
||||
# define UNORDERED_MAP __gnu_cxx::hash_map
|
||||
# define UNORDERED_MULTIMAP __gnu_cxx::hash_multimap
|
||||
#else
|
||||
# define UNORDERED_MAP std::hash_map
|
||||
# define UNORDERED_MULTIMAP std::hash_multimap
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_UNORDERED_SET_H
|
||||
#define TRINITY_UNORDERED_SET_H
|
||||
|
||||
#include "HashNamespace.h"
|
||||
|
||||
#if COMPILER_HAS_CPP11_SUPPORT
|
||||
# include <unordered_set>
|
||||
#elif COMPILER == COMPILER_INTEL
|
||||
# include <ext/hash_set>
|
||||
#elif COMPILER == COMPILER_GNU && defined(__clang__) && defined(_LIBCPP_VERSION)
|
||||
# include <unordered_set>
|
||||
#elif COMPILER == COMPILER_GNU && GCC_VERSION > 40200
|
||||
# include <tr1/unordered_set>
|
||||
#elif COMPILER == COMPILER_GNU && GCC_VERSION >= 30000
|
||||
# include <ext/hash_set>
|
||||
#elif COMPILER == COMPILER_MICROSOFT && ((_MSC_VER >= 1500 && _HAS_TR1) || _MSC_VER >= 1700) // VC9.0 SP1 and later
|
||||
# include <unordered_set>
|
||||
#else
|
||||
# include <hash_set>
|
||||
#endif
|
||||
|
||||
#ifdef _STLPORT_VERSION
|
||||
# define UNORDERED_SET std::hash_set
|
||||
using std::hash_set;
|
||||
#elif COMPILER_HAS_CPP11_SUPPORT
|
||||
# define UNORDERED_SET std::unordered_set
|
||||
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1600 // VS100
|
||||
# define UNORDERED_SET std::tr1::unordered_set
|
||||
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1500 && _HAS_TR1
|
||||
# define UNORDERED_SET std::tr1::unordered_set
|
||||
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1300
|
||||
# define UNORDERED_SET stdext::hash_set
|
||||
using stdext::hash_set;
|
||||
#elif COMPILER == COMPILER_INTEL
|
||||
# define UNORDERED_SET std::hash_set
|
||||
using std::hash_set;
|
||||
#elif COMPILER == COMPILER_GNU && defined(__clang__) && defined(_LIBCPP_VERSION)
|
||||
# define UNORDERED_SET std::unordered_set
|
||||
#elif COMPILER == COMPILER_GNU && GCC_VERSION > 40200
|
||||
# define UNORDERED_SET std::tr1::unordered_set
|
||||
#elif COMPILER == COMPILER_GNU && GCC_VERSION >= 30000
|
||||
# define UNORDERED_SET __gnu_cxx::hash_set
|
||||
#else
|
||||
# define UNORDERED_SET std::hash_set
|
||||
using std::hash_set;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -20,8 +20,7 @@
|
||||
|
||||
#include "Define.h"
|
||||
#include <time.h>
|
||||
#include "Dynamic/UnorderedMap.h"
|
||||
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
|
||||
// Values assigned have their equivalent in enum ACE_Log_Priority
|
||||
@@ -105,6 +104,6 @@ class Appender
|
||||
AppenderFlags flags;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint8, Appender*> AppenderMap;
|
||||
typedef std::unordered_map<uint8, Appender*> AppenderMap;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
#include "Appender.h"
|
||||
#include "Logger.h"
|
||||
#include "LogWorker.h"
|
||||
#include "Dynamic/UnorderedMap.h"
|
||||
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
#include <ace/Singleton.h>
|
||||
|
||||
@@ -34,8 +34,8 @@ class Log
|
||||
{
|
||||
friend class ACE_Singleton<Log, ACE_Thread_Mutex>;
|
||||
|
||||
typedef UNORDERED_MAP<std::string, Logger> LoggerMap;
|
||||
typedef UNORDERED_MAP<std::string, Logger const*> CachedLoggerContainer;
|
||||
typedef std::unordered_map<std::string, Logger> LoggerMap;
|
||||
typedef std::unordered_map<std::string, Logger const*> CachedLoggerContainer;
|
||||
|
||||
private:
|
||||
Log();
|
||||
|
||||
Reference in New Issue
Block a user