Merge branch 'master' into 4.3.4
Conflicts: src/server/game/AI/EventAI/CreatureEventAI.cpp src/server/game/AI/EventAI/CreatureEventAIMgr.cpp src/server/game/AI/EventAI/CreatureEventAIMgr.h src/server/game/Battlegrounds/Battleground.h src/server/game/Chat/Chat.h src/server/game/Entities/Player/Player.cpp src/server/game/Globals/ObjectMgr.cpp src/server/game/Globals/ObjectMgr.h src/server/game/Guilds/Guild.cpp src/server/game/Handlers/CharacterHandler.cpp src/server/game/Handlers/MailHandler.cpp src/server/game/Miscellaneous/SharedDefines.h src/server/game/Server/Protocol/Opcodes.cpp src/server/game/Spells/SpellInfo.cpp src/server/game/World/World.cpp src/server/scripts/Commands/cs_modify.cpp src/server/scripts/Commands/cs_reload.cpp src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp src/server/shared/Database/Implementation/CharacterDatabase.cpp
This commit is contained in:
commit
7f061fc57f
825 files changed
+10499
-8116
No files matched your search
@@ -33,6 +33,7 @@
|
||||
#include "LFGMgr.h"
|
||||
#include "DynamicTree.h"
|
||||
#include "Vehicle.h"
|
||||
#include "Battleground.h"
|
||||
|
||||
union u_map_magic
|
||||
{
|
||||
@@ -144,7 +145,7 @@ void Map::LoadMap(int gx, int gy, bool reload)
|
||||
|
||||
// load grid map for base map
|
||||
if (!m_parentMap->GridMaps[gx][gy])
|
||||
m_parentMap->EnsureGridCreated(GridCoord(63-gx, 63-gy));
|
||||
m_parentMap->EnsureGridCreated_i(GridCoord(63-gx, 63-gy));
|
||||
|
||||
((MapInstanced*)(m_parentMap))->AddGridMapReference(GridCoord(gx, gy));
|
||||
GridMaps[gx][gy] = m_parentMap->GridMaps[gx][gy];
|
||||
@@ -307,32 +308,34 @@ void Map::DeleteFromWorld(Player* player)
|
||||
delete player;
|
||||
}
|
||||
|
||||
void Map::EnsureGridCreated(const GridCoord &p)
|
||||
{
|
||||
TRINITY_GUARD(ACE_Thread_Mutex, Lock);
|
||||
EnsureGridCreated_i(p);
|
||||
}
|
||||
|
||||
//Create NGrid so the object can be added to it
|
||||
//But object data is not loaded here
|
||||
void Map::EnsureGridCreated(const GridCoord &p)
|
||||
void Map::EnsureGridCreated_i(const GridCoord &p)
|
||||
{
|
||||
if (!getNGrid(p.x_coord, p.y_coord))
|
||||
{
|
||||
TRINITY_GUARD(ACE_Thread_Mutex, Lock);
|
||||
if (!getNGrid(p.x_coord, p.y_coord))
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_MAPS, "Creating grid[%u, %u] for map %u instance %u", p.x_coord, p.y_coord, GetId(), i_InstanceId);
|
||||
sLog->outDebug(LOG_FILTER_MAPS, "Creating grid[%u, %u] for map %u instance %u", p.x_coord, p.y_coord, GetId(), i_InstanceId);
|
||||
|
||||
setNGrid(new NGridType(p.x_coord*MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry, sWorld->getBoolConfig(CONFIG_GRID_UNLOAD)),
|
||||
p.x_coord, p.y_coord);
|
||||
setNGrid(new NGridType(p.x_coord*MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry, sWorld->getBoolConfig(CONFIG_GRID_UNLOAD)),
|
||||
p.x_coord, p.y_coord);
|
||||
|
||||
// build a linkage between this map and NGridType
|
||||
buildNGridLinkage(getNGrid(p.x_coord, p.y_coord));
|
||||
// build a linkage between this map and NGridType
|
||||
buildNGridLinkage(getNGrid(p.x_coord, p.y_coord));
|
||||
|
||||
getNGrid(p.x_coord, p.y_coord)->SetGridState(GRID_STATE_IDLE);
|
||||
getNGrid(p.x_coord, p.y_coord)->SetGridState(GRID_STATE_IDLE);
|
||||
|
||||
//z coord
|
||||
int gx = (MAX_NUMBER_OF_GRIDS - 1) - p.x_coord;
|
||||
int gy = (MAX_NUMBER_OF_GRIDS - 1) - p.y_coord;
|
||||
//z coord
|
||||
int gx = (MAX_NUMBER_OF_GRIDS - 1) - p.x_coord;
|
||||
int gy = (MAX_NUMBER_OF_GRIDS - 1) - p.y_coord;
|
||||
|
||||
if (!GridMaps[gx][gy])
|
||||
LoadMapAndVMap(gx, gy);
|
||||
}
|
||||
if (!GridMaps[gx][gy])
|
||||
LoadMapAndVMap(gx, gy);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user