diff options
author | click <none@none> | 2010-05-03 16:30:53 +0200 |
---|---|---|
committer | click <none@none> | 2010-05-03 16:30:53 +0200 |
commit | 9fbdcbb706d51ee696e453d311da6bdad515731d (patch) | |
tree | 9998977a81fe3e66a0ce87a85de9ddfb9979d11b /src/game/Group.cpp | |
parent | 2c31b77129cb74f28a1fde8927c6d49d49f8c1c7 (diff) |
Revert parts of a previous transaction-fix (would create a nested transaction), add missing support for rollback in battleground-group creation
--HG--
branch : trunk
Diffstat (limited to 'src/game/Group.cpp')
-rw-r--r-- | src/game/Group.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/Group.cpp b/src/game/Group.cpp index 0d9fc5eadf7..1bc542ec08a 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -116,7 +116,10 @@ bool Group::Create(const uint64 &guid, const char * name) } if (!AddMember(guid, name)) + { + CharacterDatabase.RollbackTransaction(); return false; + } if (!isBGGroup()) CharacterDatabase.CommitTransaction(); @@ -1288,7 +1291,7 @@ void Group::_setLeader(const uint64 &guid) "DELETE FROM group_instance WHERE leaderguid='%u' AND (permanent = 1 OR " "instance IN (SELECT instance FROM character_instance WHERE guid = '%u')" ")", GUID_LOPART(m_leaderGuid), GUID_LOPART(slot->guid) -); + ); Player *player = objmgr.GetPlayer(slot->guid); if (player) |