diff --git a/src/game/Camera.h b/src/game/Camera.h index 76259b2aa..1d16c0062 100644 --- a/src/game/Camera.h +++ b/src/game/Camera.h @@ -81,7 +81,9 @@ class MANGOS_DLL_SPEC ViewPoint { friend class Camera; - std::list m_cameras; + typedef std::list CameraList; + + CameraList m_cameras; GridType * m_grid; void Attach(Camera* c) { m_cameras.push_back(c); } @@ -91,7 +93,7 @@ class MANGOS_DLL_SPEC ViewPoint { if (!m_cameras.empty()) { - for(std::list::iterator itr = m_cameras.begin(); itr != m_cameras.end();) + for(CameraList::iterator itr = m_cameras.begin(); itr != m_cameras.end();) { Camera *c = *(itr++); (c->*handler)(); diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index dae71aa24..251f1d009 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -466,7 +466,7 @@ void Spell::FillTargetMap() if(IsAreaAuraEffect(m_spellInfo->Effect[i])) AddUnitTarget(m_caster, SpellEffectIndex(i)); - std::list tmpUnitMap; + UnitList tmpUnitMap; // TargetA/TargetB dependent from each other, we not switch to full support this dependences // but need it support in some know cases @@ -646,7 +646,7 @@ void Spell::FillTargetMap() if(m_caster->GetTypeId() == TYPEID_PLAYER) { Player *me = (Player*)m_caster; - for (std::list::const_iterator itr = tmpUnitMap.begin(); itr != tmpUnitMap.end(); ++itr) + for (UnitList::const_iterator itr = tmpUnitMap.begin(); itr != tmpUnitMap.end(); ++itr) { Unit *owner = (*itr)->GetOwner(); Unit *u = owner ? owner : (*itr); @@ -659,7 +659,7 @@ void Spell::FillTargetMap() } } - for (std::list::iterator itr = tmpUnitMap.begin(); itr != tmpUnitMap.end();) + for (UnitList::iterator itr = tmpUnitMap.begin(); itr != tmpUnitMap.end();) { if (!CheckTarget (*itr, SpellEffectIndex(i))) { @@ -670,7 +670,7 @@ void Spell::FillTargetMap() ++itr; } - for(std::list::const_iterator iunit = tmpUnitMap.begin(); iunit != tmpUnitMap.end(); ++iunit) + for(UnitList::const_iterator iunit = tmpUnitMap.begin(); iunit != tmpUnitMap.end(); ++iunit) AddUnitTarget((*iunit), SpellEffectIndex(i)); } } @@ -1669,7 +1669,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& unMaxTargets = EffectChainTarget; float max_range = radius + unMaxTargets * CHAIN_SPELL_JUMP_RADIUS; - std::list tempTargetUnitMap; + UnitList tempTargetUnitMap; { MaNGOS::AnyAoETargetUnitInObjectRangeCheck u_check(m_caster, max_range); @@ -1684,7 +1684,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& //Now to get us a random target that's in the initial range of the spell uint32 t = 0; - std::list::iterator itr = tempTargetUnitMap.begin(); + UnitList::iterator itr = tempTargetUnitMap.begin(); while(itr!= tempTargetUnitMap.end() && (*itr)->IsWithinDist(m_caster, radius)) ++t, ++itr; @@ -1702,7 +1702,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& t = unMaxTargets - 1; Unit *prev = pUnitTarget; - std::list::iterator next = tempTargetUnitMap.begin(); + UnitList::iterator next = tempTargetUnitMap.begin(); while(t && next != tempTargetUnitMap.end()) { @@ -1730,7 +1730,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& m_targets.m_targetMask = 0; unMaxTargets = EffectChainTarget; float max_range = radius + unMaxTargets * CHAIN_SPELL_JUMP_RADIUS; - std::list tempTargetUnitMap; + UnitList tempTargetUnitMap; { MaNGOS::AnyFriendlyUnitInObjectRangeCheck u_check(m_caster, max_range); MaNGOS::UnitListSearcher searcher(tempTargetUnitMap, u_check); @@ -1744,7 +1744,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& //Now to get us a random target that's in the initial range of the spell uint32 t = 0; - std::list::iterator itr = tempTargetUnitMap.begin(); + UnitList::iterator itr = tempTargetUnitMap.begin(); while(itr != tempTargetUnitMap.end() && (*itr)->IsWithinDist(m_caster, radius)) ++t, ++itr; @@ -1762,7 +1762,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& t = unMaxTargets - 1; Unit *prev = pUnitTarget; - std::list::iterator next = tempTargetUnitMap.begin(); + UnitList::iterator next = tempTargetUnitMap.begin(); while(t && next != tempTargetUnitMap.end()) { @@ -1816,7 +1816,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& //FIXME: This very like horrible hack and wrong for most spells max_range = radius + unMaxTargets * CHAIN_SPELL_JUMP_RADIUS; - std::list tempTargetUnitMap; + UnitList tempTargetUnitMap; { MaNGOS::AnyAoEVisibleTargetUnitInObjectRangeCheck u_check(pUnitTarget, originalCaster, max_range); MaNGOS::UnitListSearcher searcher(tempTargetUnitMap, u_check); @@ -1833,7 +1833,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& targetUnitMap.push_back(pUnitTarget); uint32 t = unMaxTargets - 1; Unit *prev = pUnitTarget; - std::list::iterator next = tempTargetUnitMap.begin(); + UnitList::iterator next = tempTargetUnitMap.begin(); while (t && next != tempTargetUnitMap.end()) { @@ -2361,7 +2361,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& targetUnitMap.push_back(pUnitTarget); uint32 t = unMaxTargets - 1; Unit *prev = pUnitTarget; - std::list::iterator next = tempTargetUnitMap.begin(); + UnitList::iterator next = tempTargetUnitMap.begin(); while(t && next != tempTargetUnitMap.end()) { diff --git a/src/game/Spell.h b/src/game/Spell.h index f058a9229..6fb22cf11 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -655,13 +655,13 @@ namespace MaNGOS { struct MANGOS_DLL_DECL SpellNotifierPlayer { - std::list &i_data; + Spell::UnitList &i_data; Spell &i_spell; const uint32& i_index; float i_radius; WorldObject* i_originalCaster; - SpellNotifierPlayer(Spell &spell, std::list &data, const uint32 &i, float radius) + SpellNotifierPlayer(Spell &spell, Spell::UnitList &data, const uint32 &i, float radius) : i_data(data), i_spell(spell), i_index(i), i_radius(radius) { i_originalCaster = i_spell.GetAffectiveCasterObject(); @@ -690,7 +690,7 @@ namespace MaNGOS struct MANGOS_DLL_DECL SpellNotifierCreatureAndPlayer { - std::list *i_data; + Spell::UnitList *i_data; Spell &i_spell; SpellNotifyPushType i_push_type; float i_radius; @@ -698,7 +698,7 @@ namespace MaNGOS WorldObject* i_originalCaster; bool i_playerControlled; - SpellNotifierCreatureAndPlayer(Spell &spell, std::list &data, float radius, SpellNotifyPushType type, + SpellNotifierCreatureAndPlayer(Spell &spell, Spell::UnitList &data, float radius, SpellNotifyPushType type, SpellTargets TargetType = SPELL_TARGETS_NOT_FRIENDLY, WorldObject* originalCaster = NULL) : i_data(&data), i_spell(spell), i_push_type(type), i_radius(radius), i_TargetType(TargetType), i_originalCaster(originalCaster) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 807e21804..6727fae82 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -572,7 +572,7 @@ void AreaAura::Update(uint32 diff) Unit* owner = caster->GetCharmerOrOwner(); if (!owner) owner = caster; - std::list targets; + Spell::UnitList targets; switch(m_areaAuraType) { @@ -668,7 +668,7 @@ void AreaAura::Update(uint32 diff) } } - for(std::list::iterator tIter = targets.begin(); tIter != targets.end(); tIter++) + for(Spell::UnitList::iterator tIter = targets.begin(); tIter != targets.end(); tIter++) { // flag for seelction is need apply aura to current iteration target bool apply = true; @@ -7730,7 +7730,7 @@ void Aura::PeriodicDummyTick() if (target->hasUnitState(UNIT_STAT_STUNNED) || target->isFeared()) return; - std::list targets; + Spell::UnitList targets; { // eff_radius ==0 float radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(spell->rangeIndex)); @@ -7743,7 +7743,7 @@ void Aura::PeriodicDummyTick() if(targets.empty()) return; - std::list::const_iterator itr = targets.begin(); + Spell::UnitList::const_iterator itr = targets.begin(); std::advance(itr, rand()%targets.size()); Unit* victim = *itr; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c388ce152..dc16c7811 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11367" + #define REVISION_NR "11368" #endif // __REVISION_NR_H__