mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
Merge branch 'master' of https://github.com/ZhengPeiRu21/azerothcore-wotlk into Playerbot
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "Group.h"
|
||||
#include "Battleground.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "Config.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "GameTime.h"
|
||||
#include "GroupMgr.h"
|
||||
@@ -278,6 +279,16 @@ void Group::ConvertToLFG(bool restricted /*= true*/)
|
||||
SendUpdate();
|
||||
}
|
||||
|
||||
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))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Group::ConvertToRaid()
|
||||
{
|
||||
m_groupType = GroupType(m_groupType | GROUPTYPE_RAID);
|
||||
|
||||
@@ -245,6 +245,7 @@ public:
|
||||
uint8 GetMemberGroup(ObjectGuid guid) const;
|
||||
|
||||
void ConvertToLFG(bool restricted = true);
|
||||
bool CheckLevelForRaid();
|
||||
void ConvertToRaid();
|
||||
|
||||
void SetBattlegroundGroup(Battleground* bg);
|
||||
|
||||
Reference in New Issue
Block a user