mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 01:23:47 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
@@ -359,7 +359,7 @@ void Map::SwitchGridContainers(Creature* obj, bool on)
|
||||
|
||||
LOG_DEBUG("maps", "Switch object {} from grid[{}, {}] {}", obj->GetGUID().ToString(), cell.GridX(), cell.GridY(), on);
|
||||
NGridType* ngrid = getNGrid(cell.GridX(), cell.GridY());
|
||||
ASSERT(ngrid != nullptr);
|
||||
ASSERT(ngrid);
|
||||
|
||||
GridType& grid = ngrid->GetGridType(cell.CellX(), cell.CellY());
|
||||
|
||||
@@ -397,7 +397,7 @@ void Map::SwitchGridContainers(GameObject* obj, bool on)
|
||||
|
||||
//LOG_DEBUG(LOG_FILTER_MAPS, "Switch object {} from grid[{}, {}] {}", obj->GetGUID().ToString(), cell.data.Part.grid_x, cell.data.Part.grid_y, on);
|
||||
NGridType* ngrid = getNGrid(cell.GridX(), cell.GridY());
|
||||
ASSERT(ngrid != nullptr);
|
||||
ASSERT(ngrid);
|
||||
|
||||
GridType& grid = ngrid->GetGridType(cell.CellX(), cell.CellY());
|
||||
|
||||
@@ -471,7 +471,7 @@ bool Map::EnsureGridLoaded(const Cell& cell)
|
||||
EnsureGridCreated(GridCoord(cell.GridX(), cell.GridY()));
|
||||
NGridType* grid = getNGrid(cell.GridX(), cell.GridY());
|
||||
|
||||
ASSERT(grid != nullptr);
|
||||
ASSERT(grid);
|
||||
if (!isGridObjectDataLoaded(cell.GridX(), cell.GridY()))
|
||||
{
|
||||
//if (!isGridObjectDataLoaded(cell.GridX(), cell.GridY()))
|
||||
|
||||
@@ -71,12 +71,12 @@ Map* MapMgr::CreateBaseMap(uint32 id)
|
||||
{
|
||||
Map* map = FindBaseMap(id);
|
||||
|
||||
if (map == nullptr)
|
||||
if (!map)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(Lock);
|
||||
|
||||
map = FindBaseMap(id);
|
||||
if (map == nullptr) // pussywizard: check again after acquiring mutex
|
||||
if (!map) // pussywizard: check again after acquiring mutex
|
||||
{
|
||||
MapEntry const* entry = sMapStore.LookupEntry(id);
|
||||
ASSERT(entry);
|
||||
|
||||
@@ -66,7 +66,7 @@ void TransportMgr::LoadTransportTemplates()
|
||||
Field* fields = result->Fetch();
|
||||
uint32 entry = fields[0].Get<uint32>();
|
||||
GameObjectTemplate const* goInfo = sObjectMgr->GetGameObjectTemplate(entry);
|
||||
if (goInfo == nullptr)
|
||||
if (!goInfo)
|
||||
{
|
||||
LOG_ERROR("entities.transport", "Transport {} has no associated GameObjectTemplate from `gameobject_template` , skipped.", entry);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user