All pastes #954687 Raw Edit

Someone

public text v1 · immutable
#954687 ·published 2008-03-24 01:32 UTC
rendered paste body
Index: src/game/Map.cpp
===================================================================
--- src/game/Map.cpp	(revision 5482)
+++ src/game/Map.cpp	(working copy)
@@ -1454,6 +1454,16 @@
     player->GetSession()->SendPacket(&packet);
 }
 
+inline void Map::setNGrid(NGridType* grid, uint32 x, uint32 y)
+{
+    if(x >= MAX_NUMBER_OF_GRIDS || y >= MAX_NUMBER_OF_GRIDS)
+    {
+        sLog.outError("map::setNGrid() Invalid grid coordinates found: %d, %d!",x,y);
+        assert(false);
+    }
+    i_grids[x][y] = grid;
+}
+
 uint32 Map::GetPlayersCountExceptGMs() const
 {
     uint32 count = 0;
Index: src/game/Map.h
===================================================================
--- src/game/Map.h	(revision 5482)
+++ src/game/Map.h	(working copy)
@@ -114,7 +114,7 @@
 #define MAX_HEIGHT            100000.0f                     // can be use for find ground height at surface
 #define INVALID_HEIGHT       -100000.0f                     // for check, must be equal to VMAP_INVALID_HEIGHT, real value for unknown height is VMAP_INVALID_HEIGHT_VALUE
 
-class MANGOS_DLL_DECL Map : public GridRefManager<NGridType>, public MaNGOS::ObjectLevelLockable<Map, ZThread::Mutex>
+class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::ObjectLevelLockable<Map, ZThread::Mutex>
 {
     public:
         typedef std::list<Player*> PlayerList;
@@ -266,15 +266,7 @@
         bool isGridObjectDataLoaded(uint32 x, uint32 y) const { return getNGrid(x,y)->isGridObjectDataLoaded(); }
         void setGridObjectDataLoaded(bool pLoaded, uint32 x, uint32 y) { getNGrid(x,y)->setGridObjectDataLoaded(pLoaded); }
 
-        inline void setNGrid(NGridType* grid, uint32 x, uint32 y)
-        {
-            if(x >= MAX_NUMBER_OF_GRIDS || y >= MAX_NUMBER_OF_GRIDS)
-            {
-                sLog.outError("map::setNGrid() Invalid grid coordinates found: %d, %d!",x,y);
-                assert(false);
-            }
-            i_grids[x][y] = grid;
-        }
+        inline void setNGrid(NGridType* grid, uint32 x, uint32 y);
     protected:
         typedef MaNGOS::ObjectLevelLockable<Map, ZThread::Mutex>::Lock Guard;