aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectGridLoader.h
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-29 11:58:19 -0600
committermegamage <none@none>2009-03-29 11:58:19 -0600
commite528611141ca0923503933a0fe4d0f0720efaf91 (patch)
treec6a3232a199cc203e09fabea0ffdc7bb5a715060 /src/game/ObjectGridLoader.h
parent3733af4d6ae2615a09c421b5a6a47c4085575f91 (diff)
*Fix a crash.
--HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectGridLoader.h')
-rw-r--r--src/game/ObjectGridLoader.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/game/ObjectGridLoader.h b/src/game/ObjectGridLoader.h
index 7b5c827b7ea..768f1f994db 100644
--- a/src/game/ObjectGridLoader.h
+++ b/src/game/ObjectGridLoader.h
@@ -85,7 +85,6 @@ class TRINITY_DLL_DECL ObjectGridStoper
public:
ObjectGridStoper(NGridType &grid) : i_grid(grid) {}
- void MoveToRespawnN();
void StopN()
{
for(unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
@@ -106,6 +105,30 @@ class TRINITY_DLL_DECL ObjectGridStoper
NGridType &i_grid;
};
+class TRINITY_DLL_DECL ObjectGridCleaner
+{
+ public:
+ ObjectGridCleaner(NGridType &grid) : i_grid(grid) {}
+
+ void CleanN()
+ {
+ for(unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
+ {
+ for(unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
+ {
+ GridLoader<Player, AllWorldObjectTypes, AllGridObjectTypes> loader;
+ loader.Stop(i_grid(x, y), *this);
+ }
+ }
+ }
+
+ void Stop(GridType &grid);
+ void Visit(CreatureMapType &m);
+ template<class T> void Visit(GridRefManager<T> &);
+ private:
+ NGridType &i_grid;
+};
+
typedef GridLoader<Player, AllWorldObjectTypes, AllGridObjectTypes> GridLoaderType;
#endif