diff options
author | megamage <none@none> | 2009-04-08 12:20:39 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-08 12:20:39 -0500 |
commit | 2ebeb198add74c6d4bf73bf687e7e747355dbfe3 (patch) | |
tree | 51f01a1f42fdf7e60651856ed425515744d08865 /src/game/ObjectGridLoader.cpp | |
parent | bd7955c5a94bd2967942c2df9925ca095dcbbfec (diff) |
*Check if grid is loaded before switch container.
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectGridLoader.cpp')
-rw-r--r-- | src/game/ObjectGridLoader.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/game/ObjectGridLoader.cpp b/src/game/ObjectGridLoader.cpp index d14389725b3..d69499d8014 100644 --- a/src/game/ObjectGridLoader.cpp +++ b/src/game/ObjectGridLoader.cpp @@ -52,11 +52,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->isPet() && "ObjectGridRespawnMover don't must be called for pets"); |