Core/RBAC: Create 'Skip instance required bosses check' permission

This commit is contained in:
Spp
2013-02-25 11:50:13 +01:00
parent 8810fcb575
commit 1638092f18
3 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
-- Add new permission
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES (13, 'Skip Instance required bosses check');
-- Add new role
INSERT INTO `rbac_roles` (`id`, `name`) VALUES (9, 'Skip Instance required bosses check');
-- Add the permission to the role
INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES (9, 13);
-- Add it to all GM+ groups
INSERT INTO `rbac_group_roles` (`groupId`, `roleId`) VALUES
(2, 9),
(3, 9),
(4, 9);

View File

@@ -59,6 +59,7 @@ enum RBACPermissions
RBAC_PERM_GAMEMASTER_COMMANDS,
RBAC_PERM_ADMINISTRATOR_COMMANDS,
RBAC_PERM_LOG_GM_TRADE,
RBAC_PERM_SKIP_CHECK_INSTANCE_REQUIRED_BOSSES = 13,
RBAC_PERM_MAX
};

View File

@@ -954,7 +954,7 @@ class instance_icecrown_citadel : public InstanceMapScript
bool CheckRequiredBosses(uint32 bossId, Player const* player = NULL) const
{
if (player && AccountMgr::IsGMAccount(player->GetSession()->GetSecurity()))
if (player && player->GetSession()->HasPermission(RBAC_PERM_SKIP_CHECK_INSTANCE_REQUIRED_BOSSES))
return true;
switch (bossId)