Core/Misc: Fix static analysis issues

Fix various coverity reported issues

(cherry picked from commit 925557d1c097cd45311b38dc3a9c715579456980)
This commit is contained in:
jackpoz
2020-08-21 23:13:13 +02:00
committed by Shauren
parent 42c65c3bc2
commit bf5be28396
2 changed files with 4 additions and 1 deletions
@@ -16476,6 +16476,7 @@ void Player::RemoveRewardedQuest(uint32 questId, bool update /*= true*/)
// Remove seasonal quest also
Quest const* qInfo = sObjectMgr->GetQuestTemplate(questId);
ASSERT(qInfo);
if (qInfo->IsSeasonal())
{
uint16 eventId = qInfo->GetEventIdForQuest();
+3 -1
View File
@@ -2943,8 +2943,10 @@ void Map::GetFullTerrainStatusForPosition(PhaseShift const& phaseShift, float x,
if (vmapData.areaInfo)
data.areaInfo = boost::in_place(vmapData.areaInfo->adtId, vmapData.areaInfo->rootId, vmapData.areaInfo->groupId, vmapData.areaInfo->mogpFlags);
float mapHeight = VMAP_INVALID_HEIGHT;
GridMap* gmap = GetGrid(terrainMapId, x, y);
float mapHeight = gmap->getHeight(x, y);
if (gmap)
mapHeight = gmap->getHeight(x, y);
// area lookup
AreaTableEntry const* areaEntry = nullptr;