Core: Fix more warnings

--HG--
branch : trunk
This commit is contained in:
Spp
2010-08-30 15:25:15 +02:00
parent b0d85ac185
commit 405f312918
103 changed files with 564 additions and 468 deletions
+2 -2
View File
@@ -749,13 +749,13 @@ Map::Remove(T *obj, bool remove)
CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
sLog.outError("Map::Remove: Object " I64FMT " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
sLog.outError("Map::Remove: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
else
{
Cell cell(p);
if (loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)))
{
sLog.outStaticDebug("Remove object " I64FMT " from grid[%u,%u]", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y);
sLog.outStaticDebug("Remove object " UI64FMTD " from grid[%u,%u]", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y);
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
ASSERT(grid != NULL);
+7 -2
View File
@@ -188,7 +188,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save,
}
// some instances only have one difficulty
MapDifficulty const* mapDiff = GetDownscaledMapDifficultyData(GetId(),difficulty);
GetDownscaledMapDifficultyData(GetId(),difficulty);
sLog.outDebug("MapInstanced::CreateInstance: %s map instance %d for %d created with difficulty %s", save?"":"new ", InstanceId, GetId(), difficulty?"heroic":"normal");
@@ -211,7 +211,12 @@ BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battlegroun
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(),bg->GetMinLevel());
uint8 spawnMode = bracketEntry ? bracketEntry->difficulty : REGULAR_DIFFICULTY;
uint8 spawnMode;
if (bracketEntry)
spawnMode = bracketEntry->difficulty;
else
spawnMode = REGULAR_DIFFICULTY;
BattlegroundMap *map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this, spawnMode);
ASSERT(map->IsBattlegroundOrArena());