Core/PacketIO: Updated and enabled some battleground packets

This commit is contained in:
Shauren
2015-04-17 00:06:24 +02:00
parent 5c3d8c1e87
commit 280a0b8e35
18 changed files with 571 additions and 626 deletions

View File

@@ -1840,7 +1840,7 @@ void Group::UpdateLooterGuid(WorldObject* pLootedObject, bool ifneed)
}
}
GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* bgOrTemplate, BattlegroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 /*MaxPlayerCount*/, bool isRated, uint32 arenaSlot)
GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* bgOrTemplate, BattlegroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 /*MaxPlayerCount*/, bool isRated, uint32 arenaSlot, ObjectGuid& errorGuid)
{
// check if this group is LFG group
if (isLFGGroup())
@@ -1881,7 +1881,10 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
return ERR_BATTLEGROUND_JOIN_FAILED;
// don't allow cross-faction join as group
if (member->GetTeam() != team)
{
errorGuid = member->GetGUID();
return ERR_BATTLEGROUND_JOIN_TIMED_OUT;
}
// not in the same battleground level braket, don't let join
PvPDifficultyEntry const* memberBracketEntry = GetBattlegroundBracketByLevel(bracketEntry->MapID, member->getLevel());
if (memberBracketEntry != bracketEntry)