[svn] * Switch from hashmap to unordered map. - cleanup source - mangos. Help - Aokromes
--HG-- branch : trunk rename : src/framework/Utilities/HashMap.h => src/framework/Utilities/UnorderedMap.h
This commit is contained in:
@@ -45,7 +45,7 @@ enum ChatType
|
||||
#define TEXT_SOURCE_RANGE -1000000 //the amount of entries each text source has available
|
||||
|
||||
// Text Maps
|
||||
HM_NAMESPACE::hash_map<int32, StringTextData> TextMap;
|
||||
UNORDERED_MAP<int32, StringTextData> TextMap;
|
||||
|
||||
|
||||
//*** End Global data ***
|
||||
@@ -55,10 +55,10 @@ HM_NAMESPACE::hash_map<int32, StringTextData> TextMap;
|
||||
std::list<EventAI_Event> EventAI_Event_List;
|
||||
|
||||
//Event AI summon structure. Used exclusivly by mob_event_ai.cpp.
|
||||
HM_NAMESPACE::hash_map<uint32, EventAI_Summon> EventAI_Summon_Map;
|
||||
UNORDERED_MAP<uint32, EventAI_Summon> EventAI_Summon_Map;
|
||||
|
||||
//Event AI error prevention structure. Used at runtime to prevent error log spam of same creature id.
|
||||
//HM_NAMESPACE::hash_map<uint32, EventAI_CreatureError> EventAI_CreatureErrorPreventionList;
|
||||
//UNORDERED_MAP<uint32, EventAI_CreatureError> EventAI_CreatureErrorPreventionList;
|
||||
|
||||
uint32 EAI_ErrorLevel;
|
||||
//*** End EventAI data ***
|
||||
@@ -1792,7 +1792,7 @@ void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target)
|
||||
return;
|
||||
}
|
||||
|
||||
HM_NAMESPACE::hash_map<int32, StringTextData>::iterator i = TextMap.find(textEntry);
|
||||
UNORDERED_MAP<int32, StringTextData>::iterator i = TextMap.find(textEntry);
|
||||
|
||||
if (i == TextMap.end())
|
||||
{
|
||||
|
||||
@@ -864,7 +864,7 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI
|
||||
//Duration
|
||||
Creature* pCreature = NULL;
|
||||
|
||||
HM_NAMESPACE::hash_map<uint32, EventAI_Summon>::iterator i = EventAI_Summon_Map.find(param3);
|
||||
UNORDERED_MAP<uint32, EventAI_Summon>::iterator i = EventAI_Summon_Map.find(param3);
|
||||
|
||||
if (i == EventAI_Summon_Map.end())
|
||||
{
|
||||
|
||||
@@ -195,7 +195,7 @@ struct EventAI_Summon
|
||||
};
|
||||
|
||||
//EventSummon_Map
|
||||
extern HM_NAMESPACE::hash_map<uint32, EventAI_Summon> EventAI_Summon_Map;
|
||||
extern UNORDERED_MAP<uint32, EventAI_Summon> EventAI_Summon_Map;
|
||||
|
||||
//EventAI Error handling
|
||||
extern uint32 EAI_ErrorLevel;
|
||||
@@ -208,7 +208,7 @@ struct EventAI_CreatureError
|
||||
};
|
||||
|
||||
//Error prevention list
|
||||
extern HM_NAMESPACE::hash_map<uint32, EventAI_CreatureError> EventAI_CreatureErrorPreventionList;
|
||||
extern UNORDERED_MAP<uint32, EventAI_CreatureError> EventAI_CreatureErrorPreventionList;
|
||||
|
||||
//Defines
|
||||
#define EVENTAI_EMPTY_EVENTLIST "SD2: Eventlist for Creature %i is empty but creature is using Mob_EventAI. Preventing EventAI on this creature."
|
||||
|
||||
@@ -475,7 +475,7 @@ struct TRINITY_DLL_DECL cthunAI : public Scripted_NoMovementAI
|
||||
uint64 StomachEnterTarget;
|
||||
|
||||
//Stomach map, bool = true then in stomach
|
||||
HM_NAMESPACE::hash_map<uint64, bool> Stomach_Map;
|
||||
UNORDERED_MAP<uint64, bool> Stomach_Map;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -534,7 +534,7 @@ struct TRINITY_DLL_DECL cthunAI : public Scripted_NoMovementAI
|
||||
if (Stomach_Map.empty())
|
||||
return NULL;
|
||||
|
||||
HM_NAMESPACE::hash_map<uint64, bool>::iterator i = Stomach_Map.begin();
|
||||
UNORDERED_MAP<uint64, bool>::iterator i = Stomach_Map.begin();
|
||||
|
||||
std::list<Unit*> temp;
|
||||
std::list<Unit*>::iterator j;
|
||||
@@ -681,7 +681,7 @@ struct TRINITY_DLL_DECL cthunAI : public Scripted_NoMovementAI
|
||||
|
||||
DoCast(m_creature, SPELL_RED_COLORATION, true);
|
||||
|
||||
HM_NAMESPACE::hash_map<uint64, bool>::iterator i = Stomach_Map.begin();
|
||||
UNORDERED_MAP<uint64, bool>::iterator i = Stomach_Map.begin();
|
||||
|
||||
//Kick all players out of stomach
|
||||
while (i != Stomach_Map.end())
|
||||
@@ -713,7 +713,7 @@ struct TRINITY_DLL_DECL cthunAI : public Scripted_NoMovementAI
|
||||
if (StomachAcidTimer < diff)
|
||||
{
|
||||
//Apply aura to all players in stomach
|
||||
HM_NAMESPACE::hash_map<uint64, bool>::iterator i = Stomach_Map.begin();
|
||||
UNORDERED_MAP<uint64, bool>::iterator i = Stomach_Map.begin();
|
||||
|
||||
while (i != Stomach_Map.end())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user