aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobmaps <spambot42@yandex.ru>2011-06-28 06:34:34 +0700
committertobmaps <spambot42@yandex.ru>2011-06-28 06:34:34 +0700
commitdaf97501b92fbc3e8a38f15256f177d25a402832 (patch)
tree771c627e8e8741bff8e7ab2826d986a143289ca2
parentf580cddc09c9c08d91a7b45a2999a822465e9c23 (diff)
Core/Groups: Fix some battlefield related group stuff
-rwxr-xr-xsrc/server/game/Groups/Group.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 4fb8e43cc7a..c9281da741b 100755
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -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())