mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
refactor(Core/Common): code cleanup (part 12) (#7520)
This commit is contained in:
@@ -160,7 +160,7 @@ namespace VMAP
|
||||
|
||||
// check if tile shall be used for liquid level
|
||||
// checking for 0x08 *might* be enough, but disabled tiles always are 0x?F:
|
||||
if ((iFlags[tx + ty * iTilesX] & 0x0F) == 0x0F)
|
||||
if (iFlags && (iFlags[tx + ty * iTilesX] & 0x0F) == 0x0F)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -182,6 +182,11 @@ namespace VMAP
|
||||
0 1
|
||||
*/
|
||||
|
||||
if (!iHeight)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const uint32 rowOffset = iTilesX + 1;
|
||||
if (dx > dy) // case (a)
|
||||
{
|
||||
@@ -289,7 +294,7 @@ namespace VMAP
|
||||
bool result = true;
|
||||
uint32 chunkSize, count;
|
||||
|
||||
if (result && fwrite(&iBound, sizeof(G3D::AABox), 1, wf) != 1) { result = false; }
|
||||
if (fwrite(&iBound, sizeof(G3D::AABox), 1, wf) != 1) { result = false; }
|
||||
if (result && fwrite(&iMogpFlags, sizeof(uint32), 1, wf) != 1) { result = false; }
|
||||
if (result && fwrite(&iGroupWMOID, sizeof(uint32), 1, wf) != 1) { result = false; }
|
||||
|
||||
@@ -343,7 +348,7 @@ namespace VMAP
|
||||
delete iLiquid;
|
||||
iLiquid = nullptr;
|
||||
|
||||
if (result && fread(&iBound, sizeof(G3D::AABox), 1, rf) != 1) { result = false; }
|
||||
if (fread(&iBound, sizeof(G3D::AABox), 1, rf) != 1) { result = false; }
|
||||
if (result && fread(&iMogpFlags, sizeof(uint32), 1, rf) != 1) { result = false; }
|
||||
if (result && fread(&iGroupWMOID, sizeof(uint32), 1, rf) != 1) { result = false; }
|
||||
|
||||
@@ -621,7 +626,7 @@ namespace VMAP
|
||||
{
|
||||
//if (fread(&chunkSize, sizeof(uint32), 1, rf) != 1) result = false;
|
||||
|
||||
if (result && fread(&count, sizeof(uint32), 1, rf) != 1) { result = false; }
|
||||
if (fread(&count, sizeof(uint32), 1, rf) != 1) { result = false; }
|
||||
if (result) { groupModels.resize(count); }
|
||||
//if (result && fread(&groupModels[0], sizeof(GroupModel), count, rf) != count) result = false;
|
||||
for (uint32 i = 0; i < count && result; ++i)
|
||||
|
||||
Reference in New Issue
Block a user