Core/Groups: Forgotten changes from group id recycling reimplementation, also cleanup queries should be sync (and due to their one time execution have no need to be prepared statements)

This commit is contained in:
leak
2011-03-01 01:42:18 +01:00
parent 6b1837cecb
commit 709c395421
4 changed files with 7 additions and 17 deletions
+2 -2
View File
@@ -4511,7 +4511,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
// the player was uninvited already on logout so just remove from group
QueryResult resultGroup = CharacterDatabase.PQuery("SELECT guid FROM group_member WHERE memberGuid=%u", guid);
if (resultGroup)
if (Group* group = sObjectMgr->GetGroupByGUID((*resultGroup)[0].GetUInt32()))
if (Group* group = sObjectMgr->GetGroupByStorageId((*resultGroup)[0].GetUInt32()))
RemoveFromGroup(group, playerguid);
// Remove signs from petitions (also remove petitions if owner);
@@ -17538,7 +17538,7 @@ void Player::_LoadGroup(PreparedQueryResult result)
//QueryResult *result = CharacterDatabase.PQuery("SELECT guid FROM group_member WHERE memberGuid=%u", GetGUIDLow());
if (result)
{
if (Group* group = sObjectMgr->GetGroupByGUID((*result)[0].GetUInt32()))
if (Group* group = sObjectMgr->GetGroupByStorageId((*result)[0].GetUInt32()))
{
uint8 subgroup = group->GetMemberGroup(GetGUID());
SetGroup(group, subgroup);