aboutsummaryrefslogtreecommitdiff
path: root/src/game/GameObject.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-09-27 02:24:25 -0700
committermaximius <none@none>2009-09-27 02:24:25 -0700
commitf980dd9ac6c1679caac7a41d806d65c90a02939f (patch)
treeadd2748b3fcfd38d00883789dc692c087deed77f /src/game/GameObject.cpp
parenta635bdd0ccdf77c56c45ee1a6d456b3a2ef43ff3 (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/GameObject.cpp')
-rw-r--r--src/game/GameObject.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index e92fcb70863..d22acfe57b3 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -858,7 +858,7 @@ void GameObject::TriggeringLinkedGameObject( uint32 trapEntry, Unit* target)
TypeContainerVisitor<Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck>, GridTypeMapContainer > object_checker(checker);
CellLock<GridReadGuard> cell_lock(cell, p);
- cell_lock->Visit(cell_lock, object_checker, *GetMap());
+ cell_lock->Visit(cell_lock, object_checker, *GetMap(), *target, range);
}
// found correct GO
@@ -880,7 +880,7 @@ GameObject* GameObject::LookupFishingHoleAround(float range)
CellLock<GridReadGuard> cell_lock(cell, p);
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::NearestGameObjectFishingHole>, GridTypeMapContainer > grid_object_checker(checker);
- cell_lock->Visit(cell_lock, grid_object_checker, *GetMap());
+ cell_lock->Visit(cell_lock, grid_object_checker, *GetMap(), *this, range);
return ok;
}
@@ -1128,7 +1128,8 @@ void GameObject::Use(Unit* user)
//fish catched
player->UpdateFishingSkill();
- GameObject* ok = LookupFishingHoleAround(DEFAULT_VISIBILITY_DISTANCE);
+ //TODO: find reasonable value for fishing hole search
+ GameObject* ok = LookupFishingHoleAround(20.0f + CONTACT_DISTANCE);
if (ok)
{
player->SendLoot(ok->GetGUID(),LOOT_FISHINGHOLE);