Dungeon Finder: Add vote kick support
--HG-- branch : trunk
This commit is contained in:
@@ -22029,11 +22029,37 @@ PartyResult Player::CanUninviteFromGroup() const
|
||||
if (!grp)
|
||||
return ERR_NOT_IN_GROUP;
|
||||
|
||||
if (!grp->IsLeader(GetGUID()) && !grp->IsAssistant(GetGUID()))
|
||||
return ERR_NOT_LEADER;
|
||||
if (grp->isLFGGroup())
|
||||
{
|
||||
if (grp->GetLfgKicks() == GROUP_MAX_LFG_KICKS)
|
||||
return ERR_PARTY_LFG_BOOT_LIMIT;
|
||||
|
||||
if (InBattleground())
|
||||
return ERR_INVITE_RESTRICTED;
|
||||
if (grp->isLfgKickActive())
|
||||
return ERR_PARTY_LFG_BOOT_IN_PROGRESS;
|
||||
|
||||
if (grp->GetMembersCount() <= GROUP_LFG_KICK_VOTES_NEEDED)
|
||||
return ERR_PARTY_LFG_BOOT_TOO_FEW_PLAYERS;
|
||||
|
||||
if (grp->isLfgDungeonComplete())
|
||||
return ERR_PARTY_LFG_BOOT_DUNGEON_COMPLETE;
|
||||
|
||||
if (grp->isRollLootActive())
|
||||
return ERR_PARTY_LFG_BOOT_LOOT_ROLLS;
|
||||
|
||||
/* Missing support for these types
|
||||
return ERR_PARTY_LFG_BOOT_IN_COMBAT; // also have a cooldown (some secs after combat finish
|
||||
return ERR_PARTY_LFG_BOOT_COOLDOWN_S;
|
||||
return ERR_PARTY_LFG_BOOT_NOT_ELIGIBLE_S;
|
||||
*/
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!grp->IsLeader(GetGUID()) && !grp->IsAssistant(GetGUID()))
|
||||
return ERR_NOT_LEADER;
|
||||
|
||||
if (InBattleground())
|
||||
return ERR_INVITE_RESTRICTED;
|
||||
}
|
||||
|
||||
return ERR_PARTY_RESULT_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user