Core/Misc: Some fixes here and there

Closes #7277
This commit is contained in:
Chaplain
2012-08-20 11:05:50 +02:00
committed by Shauren
parent 28c0874873
commit fb1ac16b0c
3 changed files with 21 additions and 15 deletions
+8 -2
View File
@@ -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))
+2 -2
View File
@@ -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);