[9342] Fixed group creating :(

Also prevent not read tail packet spam in soem cases in group handlers.
This commit is contained in:
VladimirMangos 2010-02-09 16:59:59 +03:00
parent c49771337c
commit c2f8d39920
4 changed files with 51 additions and 42 deletions

View file

@ -5600,7 +5600,17 @@ void ObjectMgr::PackGroupIds()
do
{
Field *fields = result->Fetch();
groupIds.insert(fields[0].GetUInt32());
uint32 id = fields[0].GetUInt32();
if (id == 0)
{
CharacterDatabase.PExecute("DELETE FROM groups WHERE groupId = '%u'", id);
CharacterDatabase.PExecute("DELETE FROM group_member WHERE groupId = '%u'", id);
continue;
}
groupIds.insert(id);
}
while (result->NextRow());
delete result;