diff options
author | maximius <none@none> | 2009-09-27 02:24:25 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-09-27 02:24:25 -0700 |
commit | f980dd9ac6c1679caac7a41d806d65c90a02939f (patch) | |
tree | add2748b3fcfd38d00883789dc692c087deed77f /src/game/Spell.cpp | |
parent | a635bdd0ccdf77c56c45ee1a6d456b3a2ef43ff3 (diff) |
*Merge [8524] New cell search algorithm implemented. You can now choose different
visibility distances on continents, in BG/Arenas and instances. Author: Ambal
*Some warning cleanup
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 1c0444cf782..4e9bfa9e804 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -507,12 +507,12 @@ WorldObject* Spell::FindCorpseUsing() TypeContainerVisitor<MaNGOS::WorldObjectSearcher<T>, GridTypeMapContainer > grid_searcher(searcher); CellLock<GridReadGuard> cell_lock(cell, p); - cell_lock->Visit(cell_lock, grid_searcher, *m_caster->GetMap()); + cell_lock->Visit(cell_lock, grid_searcher, *m_caster->GetMap(), *m_caster, max_range); if (!result) { TypeContainerVisitor<MaNGOS::WorldObjectSearcher<T>, WorldTypeMapContainer > world_searcher(searcher); - cell_lock->Visit(cell_lock, world_searcher, *m_caster->GetMap()); + cell_lock->Visit(cell_lock, world_searcher, *m_caster->GetMap(), *m_caster, max_range); } return result; @@ -4687,7 +4687,7 @@ SpellCastResult Spell::CheckCast(bool strict) TypeContainerVisitor<MaNGOS::CreatureLastSearcher<MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher); CellLock<GridReadGuard> cell_lock(cell, p); - cell_lock->Visit(cell_lock, grid_creature_searcher, *m_caster->GetMap()); + cell_lock->Visit(cell_lock, grid_creature_searcher, *m_caster->GetMap(), *m_caster, range); if(p_Creature ) { @@ -5621,7 +5621,8 @@ SpellCastResult Spell::CheckItems() TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectFocusCheck>, GridTypeMapContainer > object_checker(checker); CellLock<GridReadGuard> cell_lock(cell, p); - cell_lock->Visit(cell_lock, object_checker, *m_caster->GetMap()); + Map& map = *m_caster->GetMap(); + cell_lock->Visit(cell_lock, object_checker, map, *m_caster, map.GetVisibilityDistance()); if(!ok) return SPELL_FAILED_REQUIRES_SPELL_FOCUS; |