aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectGridLoader.h
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-31 14:40:54 -0600
committermegamage <none@none>2009-03-31 14:40:54 -0600
commitb91529fd8e97232d272cd609bc7d07730d24b2d1 (patch)
treeb6ef724894fa1c141e0b537db71a409dd3c1e7d1 /src/game/ObjectGridLoader.h
parentf2df7bbdcc7ba952083d3eb96230ee2eea391fd8 (diff)
*Backport some code from TC2.
--HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectGridLoader.h')
-rw-r--r--src/game/ObjectGridLoader.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/game/ObjectGridLoader.h b/src/game/ObjectGridLoader.h
index d076d0ba29b..768f1f994db 100644
--- a/src/game/ObjectGridLoader.h
+++ b/src/game/ObjectGridLoader.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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