mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
Merge branch 'master' into Playerbot
# Conflicts: # src/server/game/World/World.h
This commit is contained in:
@@ -283,7 +283,7 @@ bool Group::CheckLevelForRaid()
|
||||
{
|
||||
for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
|
||||
if (Player* player = ObjectAccessor::FindPlayer(citr->guid))
|
||||
if (player->getLevel() < sConfigMgr->GetOption<int32>("Group.Raid.LevelRestriction", 10))
|
||||
if (player->GetLevel() < sConfigMgr->GetOption<int32>("Group.Raid.LevelRestriction", 10))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -1714,10 +1714,9 @@ void Group::UpdatePlayerOutOfRange(Player* player)
|
||||
WorldPacket data;
|
||||
player->GetSession()->BuildPartyMemberStatsChangedPacket(player, &data);
|
||||
|
||||
Player* member;
|
||||
for (GroupReference* itr = GetFirstMember(); itr != nullptr; itr = itr->next())
|
||||
{
|
||||
member = itr->GetSource();
|
||||
Player* member = itr->GetSource();
|
||||
if (member && (!member->IsInMap(player) || !member->IsWithinDist(player, member->GetSightRange(player), false)))
|
||||
member->GetSession()->SendPacket(&data);
|
||||
}
|
||||
@@ -1915,7 +1914,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
|
||||
if (!reference)
|
||||
return ERR_BATTLEGROUND_JOIN_FAILED;
|
||||
|
||||
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bgTemplate->GetMapId(), reference->getLevel());
|
||||
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bgTemplate->GetMapId(), reference->GetLevel());
|
||||
if (!bracketEntry)
|
||||
return ERR_BATTLEGROUND_JOIN_FAILED;
|
||||
|
||||
@@ -1946,7 +1945,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
|
||||
return ERR_BATTLEGROUND_JOIN_FAILED;
|
||||
|
||||
// not in the same battleground level braket, don't let join
|
||||
PvPDifficultyEntry const* memberBracketEntry = GetBattlegroundBracketByLevel(bracketEntry->mapId, member->getLevel());
|
||||
PvPDifficultyEntry const* memberBracketEntry = GetBattlegroundBracketByLevel(bracketEntry->mapId, member->GetLevel());
|
||||
if (memberBracketEntry != bracketEntry)
|
||||
return ERR_BATTLEGROUND_JOIN_RANGE_INDEX;
|
||||
|
||||
@@ -2228,6 +2227,11 @@ bool Group::IsCreated() const
|
||||
return GetMembersCount() > 0;
|
||||
}
|
||||
|
||||
GroupType Group::GetGroupType() const
|
||||
{
|
||||
return m_groupType;
|
||||
}
|
||||
|
||||
ObjectGuid Group::GetLeaderGUID() const
|
||||
{
|
||||
return m_leaderGuid;
|
||||
|
||||
@@ -214,6 +214,7 @@ public:
|
||||
bool isBFGroup() const;
|
||||
bool isBGGroup() const;
|
||||
bool IsCreated() const;
|
||||
GroupType GetGroupType() const;
|
||||
ObjectGuid GetLeaderGUID() const;
|
||||
Player* GetLeader();
|
||||
ObjectGuid GetGUID() const;
|
||||
|
||||
Reference in New Issue
Block a user