aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectGridLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/ObjectGridLoader.cpp')
-rw-r--r--src/game/ObjectGridLoader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/ObjectGridLoader.cpp b/src/game/ObjectGridLoader.cpp
index 78727fc7c0a..d3e8397baaa 100644
--- a/src/game/ObjectGridLoader.cpp
+++ b/src/game/ObjectGridLoader.cpp
@@ -28,6 +28,7 @@
#include "Corpse.h"
#include "World.h"
#include "CellImpl.h"
+#include "CreatureAI.h"
class TRINITY_DLL_DECL ObjectGridRespawnMover
{
@@ -53,11 +54,10 @@ ObjectGridRespawnMover::Visit(CreatureMapType &m)
// creature in unloading grid can have respawn point in another grid
// if it will be unloaded then it will not respawn in original grid until unload/load original grid
// move to respawn point to prevent this case. For player view in respawn grid this will be normal respawn.
- for(CreatureMapType::iterator iter=m.begin(), next; iter != m.end(); iter = next)
+ for(CreatureMapType::iterator iter = m.begin(); iter != m.end();)
{
- next = iter; ++next;
-
Creature * c = iter->getSource();
+ ++iter;
assert(!c->isWorldCreature() && "ObjectGridRespawnMover don't must be called for pets");