mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-06 08:59:11 +01:00
Core/Dungeon Finder: Fix a crash in Join when there are no dungeons available for that group (And probably other random crashes that appear when having DF enabled)
Core/Dungeon Finder: Tab2spaces + remove trailing spaces in LFG* files. Notes to self: - assign NULL to a pointer parameter will not change the pointer value outside the scope of the function - deleting a const_iterator can lead to mem corruption --HG-- branch : trunk
This commit is contained in:
@@ -31,16 +31,13 @@ void BuildPlayerLockDungeonBlock(WorldPacket &data, LfgLockStatusSet* lockSet)
|
||||
data << uint8(0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
data << uint32(lockSet->size()); // Size of lock dungeons
|
||||
for (LfgLockStatusSet::iterator it = lockSet->begin(); it != lockSet->end(); ++it)
|
||||
for (LfgLockStatusSet::const_iterator it = lockSet->begin(); it != lockSet->end(); ++it)
|
||||
{
|
||||
data << uint32((*it)->dungeon); // Dungeon entry + type
|
||||
data << uint32((*it)->lockstatus); // Lock status
|
||||
delete (*it);
|
||||
}
|
||||
delete lockSet;
|
||||
lockSet = NULL;
|
||||
}
|
||||
|
||||
void BuildPartyLockDungeonBlock(WorldPacket &data, LfgLockStatusMap* lockMap)
|
||||
@@ -57,8 +54,6 @@ void BuildPartyLockDungeonBlock(WorldPacket &data, LfgLockStatusMap* lockMap)
|
||||
data << uint64(MAKE_NEW_GUID(it->first, 0, HIGHGUID_PLAYER)); // Player guid
|
||||
BuildPlayerLockDungeonBlock(data, it->second);
|
||||
}
|
||||
delete lockMap;
|
||||
lockMap = NULL;
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgJoinOpcode(WorldPacket &recv_data)
|
||||
|
||||
Reference in New Issue
Block a user