@@ -336,10 +336,16 @@ namespace VMAP
|
||||
void TileAssembler::exportGameobjectModels()
|
||||
{
|
||||
FILE* model_list = fopen((iSrcDir + "/" + "temp_gameobject_models").c_str(), "rb");
|
||||
FILE* model_list_copy = fopen((iDestDir + "/" + GAMEOBJECT_MODELS).c_str(), "wb");
|
||||
if (!model_list || !model_list_copy)
|
||||
if (!model_list)
|
||||
return;
|
||||
|
||||
FILE* model_list_copy = fopen((iDestDir + "/" + GAMEOBJECT_MODELS).c_str(), "wb");
|
||||
if (!model_list_copy)
|
||||
{
|
||||
fclose(model_list);
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 name_length, displayId;
|
||||
char buff[500];
|
||||
while (!feof(model_list))
|
||||
|
||||
@@ -1239,11 +1239,11 @@ LfgAnswer LFGMgr::GetCompatibles(std::string key)
|
||||
void LFGMgr::GetCompatibleDungeons(LfgDungeonSet& dungeons, const PlayerSet& players, LfgLockPartyMap& lockMap)
|
||||
{
|
||||
lockMap.clear();
|
||||
for (PlayerSet::const_iterator it = players.begin(); it != players.end() && dungeons.size(); ++it)
|
||||
for (PlayerSet::const_iterator it = players.begin(); it != players.end() && !dungeons.empty(); ++it)
|
||||
{
|
||||
uint64 guid = (*it)->GetGUID();
|
||||
LfgLockMap cachedLockMap = GetLockedDungeons(guid);
|
||||
for (LfgLockMap::const_iterator it2 = cachedLockMap.begin(); it2 != cachedLockMap.end() && dungeons.size(); ++it2)
|
||||
for (LfgLockMap::const_iterator it2 = cachedLockMap.begin(); it2 != cachedLockMap.end() && !dungeons.empty(); ++it2)
|
||||
{
|
||||
uint32 dungeonId = (it2->first & 0x00FFFFFF); // Compare dungeon ids
|
||||
LfgDungeonSet::iterator itDungeon = dungeons.find(dungeonId);
|
||||
|
||||
@@ -382,7 +382,7 @@ bool processArgv(int argc, char ** argv, const char *versionString)
|
||||
{
|
||||
bool result = true;
|
||||
hasInputPathParam = false;
|
||||
bool preciseVectorData = false;
|
||||
preciseVectorData = false;
|
||||
|
||||
for(int i = 1; i < argc; ++i)
|
||||
{
|
||||
@@ -482,7 +482,7 @@ int main(int argc, char ** argv)
|
||||
for (size_t i=0; i < archiveNames.size(); ++i)
|
||||
{
|
||||
MPQArchive *archive = new MPQArchive(archiveNames[i].c_str());
|
||||
if(!gOpenArchives.size() || gOpenArchives.front() != archive)
|
||||
if (gOpenArchives.empty() || gOpenArchives.front() != archive)
|
||||
delete archive;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user