aboutsummaryrefslogtreecommitdiff
path: root/src/framework/GameSystem/NGrid.h
diff options
context:
space:
mode:
authorsilver1ce <none@none>2010-02-03 05:23:32 +0200
committersilver1ce <none@none>2010-02-03 05:23:32 +0200
commit02acc6604362f577168536122596729243cbe400 (patch)
tree7cc8f086b4f860b12682b5e53ba42ab1603d8451 /src/framework/GameSystem/NGrid.h
parent23b1a482c9e26254b8ce24559e8191bd7d1b98fe (diff)
cleanup into grid containers
grid containers doesn't contains guid keys, so guid parameter is useless, removed find functions(anyway result of search would be null always) --HG-- branch : trunk
Diffstat (limited to 'src/framework/GameSystem/NGrid.h')
-rw-r--r--src/framework/GameSystem/NGrid.h26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/framework/GameSystem/NGrid.h b/src/framework/GameSystem/NGrid.h
index 7f7c6f1a9fb..6cbe7d6a84c 100644
--- a/src/framework/GameSystem/NGrid.h
+++ b/src/framework/GameSystem/NGrid.h
@@ -119,14 +119,14 @@ class TRINITY_DLL_DECL NGrid
void ResetTimeTracker(time_t interval) { i_GridInfo.ResetTimeTracker(interval); }
void UpdateTimeTracker(time_t diff) { i_GridInfo.UpdateTimeTracker(diff); }
- template<class SPECIFIC_OBJECT> void AddWorldObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj, OBJECT_HANDLE hdl)
+ template<class SPECIFIC_OBJECT> void AddWorldObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj)
{
- getGridType(x, y).AddWorldObject(obj, hdl);
+ getGridType(x, y).AddWorldObject(obj);
}
- template<class SPECIFIC_OBJECT> void RemoveWorldObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj, OBJECT_HANDLE hdl)
+ template<class SPECIFIC_OBJECT> void RemoveWorldObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj)
{
- getGridType(x, y).RemoveWorldObject(obj, hdl);
+ getGridType(x, y).RemoveWorldObject(obj);
}
template<class T, class TT> void Visit(TypeContainerVisitor<T, TypeMapContainer<TT> > &visitor)
@@ -150,24 +150,14 @@ class TRINITY_DLL_DECL NGrid
return count;
}
- template<class SPECIFIC_OBJECT> const SPECIFIC_OBJECT* GetGridObject(const uint32 x, const uint32 y, OBJECT_HANDLE hdl) const
+ template<class SPECIFIC_OBJECT> bool AddGridObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj)
{
- return getGridType(x, y).template GetGridObject<SPECIFIC_OBJECT>(hdl);
+ return getGridType(x, y).AddGridObject(obj);
}
- template<class SPECIFIC_OBJECT> SPECIFIC_OBJECT* GetGridObject(const uint32 x, const uint32 y, OBJECT_HANDLE hdl)
+ template<class SPECIFIC_OBJECT> bool RemoveGridObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj)
{
- return getGridType(x, y).template GetGridObject<SPECIFIC_OBJECT>(hdl);
- }
-
- template<class SPECIFIC_OBJECT> bool AddGridObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj, OBJECT_HANDLE hdl)
- {
- return getGridType(x, y).AddGridObject(hdl, obj);
- }
-
- template<class SPECIFIC_OBJECT> bool RemoveGridObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj, OBJECT_HANDLE hdl)
- {
- return getGridType(x, y).RemoveGridObject(obj, hdl);
+ return getGridType(x, y).RemoveGridObject(obj);
}
private: