diff options
| author | Trazom62 <none@none> | 2010-05-05 12:40:52 +0200 | 
|---|---|---|
| committer | Trazom62 <none@none> | 2010-05-05 12:40:52 +0200 | 
| commit | eee3ebe6d6e55a18f690704bc28db3a58f0efb12 (patch) | |
| tree | 655a60eee075bce42c85ecc876472dc9e446a77c /src/game/Group.cpp | |
| parent | 3199e7b8dbae8eb6025a612073fed230566ba9c6 (diff) | |
Fix raid groups load from DB and save to DB.
Fixes issue #299.
- In table GROUPS, since rev 7841, isRaid is used to store the groupType. The DB was not updated. this is now fixed.
- Fix isRaid set to 1 when group converted to raid (shall be the groupType).
- Fix isRaidGroup check as groupType is now a set of flags.
- Fix dungeon/raid check when difficulty change.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Group.cpp')
| -rw-r--r-- | src/game/Group.cpp | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/Group.cpp b/src/game/Group.cpp index 3b45c48cb26..9b7ec6ec20d 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -109,7 +109,7 @@ bool Group::Create(const uint64 &guid, const char * name)          CharacterDatabase.BeginTransaction();          CharacterDatabase.PExecute("DELETE FROM groups WHERE leaderGuid ='%u'", GUID_LOPART(m_leaderGuid));          CharacterDatabase.PExecute("DELETE FROM group_member WHERE leaderGuid ='%u'", GUID_LOPART(m_leaderGuid)); -        CharacterDatabase.PExecute("INSERT INTO groups (leaderGuid,lootMethod,looterGuid,lootThreshold,icon1,icon2,icon3,icon4,icon5,icon6,icon7,icon8,isRaid,difficulty,raiddifficulty) " +        CharacterDatabase.PExecute("INSERT INTO groups (leaderGuid,lootMethod,looterGuid,lootThreshold,icon1,icon2,icon3,icon4,icon5,icon6,icon7,icon8,groupType,difficulty,raiddifficulty) "              "VALUES ('%u','%u','%u','%u','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','%u','%u','%u')",              GUID_LOPART(m_leaderGuid), uint32(m_lootMethod),              GUID_LOPART(m_looterGuid), uint32(m_lootThreshold), m_targetIcons[0], m_targetIcons[1], m_targetIcons[2], m_targetIcons[3], m_targetIcons[4], m_targetIcons[5], m_targetIcons[6], m_targetIcons[7], uint8(m_groupType), uint32(m_dungeonDifficulty), m_raidDifficulty); @@ -135,8 +135,8 @@ bool Group::LoadGroupFromDB(const uint64 &leaderGuid, QueryResult_AutoPtr result      if (!result)      {          external = false; -        //                                        0           1           2              3      4      5      6      7      8      9      10     11      12          13 -        result = CharacterDatabase.PQuery("SELECT lootMethod, looterGuid, lootThreshold, icon1, icon2, icon3, icon4, icon5, icon6, icon7, icon8, isRaid, difficulty, raiddifficulty FROM groups WHERE leaderGuid ='%u'", GUID_LOPART(leaderGuid)); +        //                                        0           1           2              3      4      5      6      7      8      9      10     11         12          13 +        result = CharacterDatabase.PQuery("SELECT lootMethod, looterGuid, lootThreshold, icon1, icon2, icon3, icon4, icon5, icon6, icon7, icon8, groupType, difficulty, raiddifficulty FROM groups WHERE leaderGuid ='%u'", GUID_LOPART(leaderGuid));          if (!result)              return false;      } @@ -213,7 +213,7 @@ void Group::ConvertToRaid()      _initRaidSubGroupsCounter();      if (!isBGGroup()) -        CharacterDatabase.PExecute("UPDATE groups SET isRaid = 1 WHERE leaderGuid='%u'", GUID_LOPART(m_leaderGuid)); +        CharacterDatabase.PExecute("UPDATE groups SET groupType='%u' WHERE leaderGuid='%u'", uint8(m_groupType), GUID_LOPART(m_leaderGuid));      SendUpdate();      // update quest related GO states (quest activity dependent from raid membership)  | 
