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