mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9974] Restore raid functionality broken after one from 3.3.x switches.
* Fixed typo in raid converting code that triggering raid disband at server restart. * Fixed current subgroup show for character and update group memebers data at move its in diff subgroups.
This commit is contained in:
parent
dc82105963
commit
94888e52cd
8 changed files with 44 additions and 16 deletions
|
|
@ -111,10 +111,10 @@ bool Group::Create(const uint64 &guid, const char * name)
|
|||
CharacterDatabase.BeginTransaction();
|
||||
CharacterDatabase.PExecute("DELETE FROM groups WHERE groupId ='%u'", m_Id);
|
||||
CharacterDatabase.PExecute("DELETE FROM group_member WHERE groupId ='%u'", m_Id);
|
||||
CharacterDatabase.PExecute("INSERT INTO groups (groupId,leaderGuid,mainTank,mainAssistant,lootMethod,looterGuid,lootThreshold,icon1,icon2,icon3,icon4,icon5,icon6,icon7,icon8,isRaid,difficulty,raiddifficulty) "
|
||||
CharacterDatabase.PExecute("INSERT INTO groups (groupId,leaderGuid,mainTank,mainAssistant,lootMethod,looterGuid,lootThreshold,icon1,icon2,icon3,icon4,icon5,icon6,icon7,icon8,groupType,difficulty,raiddifficulty) "
|
||||
"VALUES ('%u','%u','%u','%u','%u','%u','%u','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','%u','%u','%u')",
|
||||
m_Id, GUID_LOPART(m_leaderGuid), GUID_LOPART(m_mainTank), GUID_LOPART(m_mainAssistant), 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);
|
||||
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), uint32(m_raidDifficulty));
|
||||
}
|
||||
|
||||
if(!AddMember(guid, name))
|
||||
|
|
@ -128,8 +128,8 @@ bool Group::Create(const uint64 &guid, const char * name)
|
|||
|
||||
bool Group::LoadGroupFromDB(Field* fields)
|
||||
{
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
||||
// result = CharacterDatabase.Query("SELECT mainTank, mainAssistant, lootMethod, looterGuid, lootThreshold, icon1, icon2, icon3, icon4, icon5, icon6, icon7, icon8, isRaid, difficulty, raiddifficulty, leaderGuid, groupId FROM groups");
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
||||
// result = CharacterDatabase.Query("SELECT mainTank, mainAssistant, lootMethod, looterGuid, lootThreshold, icon1, icon2, icon3, icon4, icon5, icon6, icon7, icon8, groupType, difficulty, raiddifficulty, leaderGuid, groupId FROM groups");
|
||||
|
||||
m_Id = fields[17].GetUInt32();
|
||||
m_leaderGuid = MAKE_NEW_GUID(fields[16].GetUInt32(),0,HIGHGUID_PLAYER);
|
||||
|
|
@ -190,7 +190,7 @@ void Group::ConvertToRaid()
|
|||
_initRaidSubGroupsCounter();
|
||||
|
||||
if(!isBGGroup())
|
||||
CharacterDatabase.PExecute("UPDATE groups SET isRaid = 1 WHERE groupId='%u'", m_Id);
|
||||
CharacterDatabase.PExecute("UPDATE groups SET groupType = %u WHERE groupId='%u'", uint8(m_groupType), m_Id);
|
||||
SendUpdate();
|
||||
|
||||
// update quest related GO states (quest activity dependent from raid membership)
|
||||
|
|
@ -970,9 +970,9 @@ void Group::SendUpdate()
|
|||
// guess size
|
||||
WorldPacket data(SMSG_GROUP_LIST, (1+1+1+1+8+4+GetMembersCount()*20));
|
||||
data << uint8(m_groupType); // group type (flags in 3.3)
|
||||
data << uint8(isBGGroup() ? 1 : 0); // 2.0.x, isBattleGroundGroup?
|
||||
data << uint8(citr->group); // groupid
|
||||
data << uint8(citr->assistant ? 0x01 : 0x00); // 0x2 main assist, 0x4 main tank
|
||||
data << uint8(isBGGroup() ? 1 : 0); // 2.0.x, isBattleGroundGroup?
|
||||
data << uint8(GetFlags(*citr)); // group flags
|
||||
if(m_groupType & GROUPTYPE_LFD)
|
||||
{
|
||||
data << uint8(0);
|
||||
|
|
@ -991,10 +991,9 @@ void Group::SendUpdate()
|
|||
|
||||
data << citr2->name;
|
||||
data << uint64(citr2->guid);
|
||||
// online-state
|
||||
data << uint8(onlineState);
|
||||
data << uint8(onlineState); // online-state
|
||||
data << uint8(citr2->group); // groupid
|
||||
data << uint8(citr2->assistant?0x01:0); // 0x2 main assist, 0x4 main tank
|
||||
data << uint8(GetFlags(*citr2)); // group flags
|
||||
data << uint8(0); // 3.3, role?
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue