diff options
author | silver1ce <none@none> | 2010-02-03 05:23:32 +0200 |
---|---|---|
committer | silver1ce <none@none> | 2010-02-03 05:23:32 +0200 |
commit | 02acc6604362f577168536122596729243cbe400 (patch) | |
tree | 7cc8f086b4f860b12682b5e53ba42ab1603d8451 /src/framework/GameSystem/Grid.h | |
parent | 23b1a482c9e26254b8ce24559e8191bd7d1b98fe (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/Grid.h')
-rw-r--r-- | src/framework/GameSystem/Grid.h | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/src/framework/GameSystem/Grid.h b/src/framework/GameSystem/Grid.h index b52ca9f878d..a928bbba9a6 100644 --- a/src/framework/GameSystem/Grid.h +++ b/src/framework/GameSystem/Grid.h @@ -60,25 +60,20 @@ class TRINITY_DLL_DECL Grid /** an object of interested enters the grid */ - template<class SPECIFIC_OBJECT> void AddWorldObject(SPECIFIC_OBJECT *obj, OBJECT_HANDLE hdl) + template<class SPECIFIC_OBJECT> void AddWorldObject(SPECIFIC_OBJECT *obj) { - if(!i_objects.template insert<SPECIFIC_OBJECT>(hdl, obj)) + if(!i_objects.template insert<SPECIFIC_OBJECT>(obj)) assert(false); } /** an object of interested exits the grid */ - template<class SPECIFIC_OBJECT> void RemoveWorldObject(SPECIFIC_OBJECT *obj, OBJECT_HANDLE hdl) + template<class SPECIFIC_OBJECT> void RemoveWorldObject(SPECIFIC_OBJECT *obj) { - if(!i_objects.template remove<SPECIFIC_OBJECT>(obj, hdl)) + if(!i_objects.template remove<SPECIFIC_OBJECT>(obj)) assert(false); } - /** Accessors: Returns a specific type of object in the WORDL_OBJECT_TYPES - */ - template<class SPECIFIC_OBJECT> const SPECIFIC_OBJECT* GetWorldObject(OBJECT_HANDLE hdl, SPECIFIC_OBJECT* fake) const { return i_objects.template find<SPECIFIC_OBJECT>(hdl); } - template<class SPECIFIC_OBJECT> SPECIFIC_OBJECT* GetWorldObject(OBJECT_HANDLE hdl, SPECIFIC_OBJECT *fake) { return i_objects.template find<SPECIFIC_OBJECT>(hdl, fake); } - /** Refreshes/update the grid. This required for remote grids. */ void RefreshGrid(void) { /* TBI */} @@ -109,24 +104,19 @@ class TRINITY_DLL_DECL Grid */ unsigned int ActiveObjectsInGrid(void) const { return /*m_activeGridObjects.size()+*/i_objects.template Count<ACTIVE_OBJECT>(); } - /** Accessors: Returns a specific type of object in the GRID_OBJECT_TYPES - */ - template<class SPECIFIC_OBJECT> const SPECIFIC_OBJECT* GetGridObject(OBJECT_HANDLE hdl, SPECIFIC_OBJECT *fake) const { return i_container.template find<SPECIFIC_OBJECT>(hdl, fake); } - template<class SPECIFIC_OBJECT> SPECIFIC_OBJECT* GetGridObject(OBJECT_HANDLE hdl, SPECIFIC_OBJECT *fake) { return i_container.template find<SPECIFIC_OBJECT>(hdl, fake); } - /** Inserts a container type object into the grid. */ - template<class SPECIFIC_OBJECT> void AddGridObject(SPECIFIC_OBJECT *obj, OBJECT_HANDLE hdl) + template<class SPECIFIC_OBJECT> void AddGridObject(SPECIFIC_OBJECT *obj) { - if(!i_container.template insert<SPECIFIC_OBJECT>(hdl, obj)) + if(!i_container.template insert<SPECIFIC_OBJECT>(obj)) assert(false); } /** Removes a containter type object from the grid */ - template<class SPECIFIC_OBJECT> void RemoveGridObject(SPECIFIC_OBJECT *obj, OBJECT_HANDLE hdl) + template<class SPECIFIC_OBJECT> void RemoveGridObject(SPECIFIC_OBJECT *obj) { - if(!i_container.template remove<SPECIFIC_OBJECT>(obj, hdl)) + if(!i_container.template remove<SPECIFIC_OBJECT>(obj)) assert(false); } |