mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/Groups: Fix some battlefield related group stuff
This commit is contained in:
@@ -114,7 +114,7 @@ bool Group::Create(Player *leader)
|
||||
m_dungeonDifficulty = DUNGEON_DIFFICULTY_NORMAL;
|
||||
m_raidDifficulty = RAID_DIFFICULTY_10MAN_NORMAL;
|
||||
|
||||
if (!isBGGroup() || !isBFGroup())
|
||||
if (!isBGGroup() && !isBFGroup())
|
||||
{
|
||||
m_dungeonDifficulty = leader->GetDungeonDifficulty();
|
||||
m_raidDifficulty = leader->GetRaidDifficulty();
|
||||
@@ -343,7 +343,7 @@ bool Group::AddMember(Player* player)
|
||||
}
|
||||
|
||||
// insert into the table if we're not a battleground group
|
||||
if (!isBGGroup() || !isBFGroup())
|
||||
if (!isBGGroup() && !isBFGroup())
|
||||
CharacterDatabase.PExecute("INSERT INTO group_member (guid, memberGuid, memberFlags, subgroup, roles) VALUES(%u, %u, %u, %u, %u)",
|
||||
m_dbStoreId, GUID_LOPART(member.guid), member.flags, member.group, member.roles);
|
||||
|
||||
@@ -513,7 +513,7 @@ void Group::ChangeLeader(const uint64 &guid)
|
||||
|
||||
sScriptMgr->OnGroupChangeLeader(this, m_leaderGuid, guid);
|
||||
|
||||
if (!isBGGroup() || !isBFGroup())
|
||||
if (!isBGGroup() && !isBFGroup())
|
||||
{
|
||||
// Remove the groups permanent instance bindings
|
||||
for (uint8 i = 0; i < MAX_DIFFICULTY; ++i)
|
||||
@@ -608,7 +608,7 @@ void Group::Disband(bool hideDestroy /* = false */)
|
||||
|
||||
RemoveAllInvites();
|
||||
|
||||
if (!isBGGroup() || !isBFGroup())
|
||||
if (!isBGGroup() && !isBFGroup())
|
||||
{
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
trans->PAppend("DELETE FROM groups WHERE guid = %u", m_dbStoreId);
|
||||
@@ -1305,7 +1305,7 @@ bool Group::_setMembersGroup(const uint64 &guid, const uint8 &group)
|
||||
|
||||
SubGroupCounterIncrease(group);
|
||||
|
||||
if (!isBGGroup() || !isBFGroup())
|
||||
if (!isBGGroup() && !isBFGroup())
|
||||
CharacterDatabase.PExecute("UPDATE group_member SET subgroup='%u' WHERE memberGuid='%u'", group, GUID_LOPART(guid));
|
||||
|
||||
return true;
|
||||
@@ -1348,7 +1348,7 @@ void Group::ChangeMembersGroup(const uint64 &guid, const uint8 &group)
|
||||
SubGroupCounterDecrease(prevSubGroup);
|
||||
|
||||
// Preserve new sub group in database for non-raid groups
|
||||
if (!isBGGroup())
|
||||
if (!isBGGroup() && !isBFGroup())
|
||||
CharacterDatabase.PExecute("UPDATE group_member SET subgroup='%u' WHERE memberGuid='%u'", group, GUID_LOPART(guid));
|
||||
|
||||
Player* player = sObjectMgr->GetPlayer(guid);
|
||||
@@ -1538,7 +1538,7 @@ void Roll::targetObjectBuildLink()
|
||||
void Group::SetDungeonDifficulty(Difficulty difficulty)
|
||||
{
|
||||
m_dungeonDifficulty = difficulty;
|
||||
if (!isBGGroup() || !isBFGroup())
|
||||
if (!isBGGroup() && !isBFGroup())
|
||||
CharacterDatabase.PExecute("UPDATE groups SET difficulty = %u WHERE guid ='%u'", m_dungeonDifficulty, m_dbStoreId);
|
||||
|
||||
for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
@@ -1555,7 +1555,7 @@ void Group::SetDungeonDifficulty(Difficulty difficulty)
|
||||
void Group::SetRaidDifficulty(Difficulty difficulty)
|
||||
{
|
||||
m_raidDifficulty = difficulty;
|
||||
if (!isBGGroup() || !isBFGroup())
|
||||
if (!isBGGroup() && !isBFGroup())
|
||||
CharacterDatabase.PExecute("UPDATE groups SET raiddifficulty = %u WHERE guid ='%u'", m_raidDifficulty, m_dbStoreId);
|
||||
|
||||
for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
|
||||
Reference in New Issue
Block a user