Core/PacketIO: Updated to 11.0.0

This commit is contained in:
Shauren
2024-08-02 13:25:41 +02:00
parent 7fb9168d57
commit e59eef5432
99 changed files with 5064 additions and 3635 deletions

View File

@@ -198,6 +198,7 @@ bool Group::Create(Player* leader)
stmt->setUInt32(index++, uint8(m_raidDifficulty));
stmt->setUInt32(index++, uint8(m_legacyRaidDifficulty));
stmt->setUInt64(index++, m_masterLooterGuid.GetCounter());
stmt->setInt8(index++, int8(m_pingRestriction));
CharacterDatabase.Execute(stmt);
@@ -243,6 +244,8 @@ void Group::LoadGroupFromDB(Field* fields)
m_masterLooterGuid = ObjectGuid::Create<HighGuid::Player>(fields[16].GetUInt64());
m_pingRestriction = RestrictPingsTo(fields[18].GetInt8());
if (m_groupFlags & GROUP_FLAG_LFG)
sLFGMgr->_LoadFromDB(fields, GetGUID());
}
@@ -867,6 +870,8 @@ void Group::SendUpdateToPlayer(ObjectGuid playerGUID, MemberSlot const* slot) co
partyUpdate.SequenceNum = player->NextGroupUpdateSequenceNumber(m_groupCategory);
partyUpdate.PingRestriction = m_pingRestriction;
partyUpdate.MyIndex = -1;
uint8 index = 0;
for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr, ++index)
@@ -1899,23 +1904,20 @@ void Group::SetEveryoneIsAssistant(bool apply)
SendUpdate();
}
bool Group::IsRestrictPingsToAssistants() const
RestrictPingsTo Group::GetRestrictPings() const
{
return (m_groupFlags & GROUP_FLAG_RESTRICT_PINGS) != 0;
return m_pingRestriction;
}
void Group::SetRestrictPingsToAssistants(bool restrictPingsToAssistants)
void Group::SetRestrictPingsTo(RestrictPingsTo restrictTo)
{
if (restrictPingsToAssistants)
m_groupFlags = GroupFlags(m_groupFlags | GROUP_FLAG_RESTRICT_PINGS);
else
m_groupFlags = GroupFlags(m_groupFlags & ~GROUP_FLAG_RESTRICT_PINGS);
m_pingRestriction = restrictTo;
if (!isBGGroup() && !isBFGroup())
{
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_TYPE);
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_PING_RESTRICTION);
stmt->setUInt16(0, m_groupFlags);
stmt->setInt8(0, int8(m_pingRestriction));
stmt->setUInt32(1, m_dbStoreId);
CharacterDatabase.Execute(stmt);