mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/RBAC: Create new permissions 'Instant .save', 'Allow params with .unstuck', 'Full HP after resurrect'
This commit is contained in:
@@ -678,7 +678,7 @@ public:
|
||||
|
||||
if (target)
|
||||
{
|
||||
target->ResurrectPlayer(!AccountMgr::IsPlayerAccount(target->GetSession()->GetSecurity()) ? 1.0f : 0.5f);
|
||||
target->ResurrectPlayer(target->GetSession()->HasPermission(RBAC_PERM_RESURRECT_WITH_FULL_HPS) ? 1.0f : 0.5f);
|
||||
target->SpawnCorpseBones();
|
||||
target->SaveToDB();
|
||||
}
|
||||
@@ -881,7 +881,7 @@ public:
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
|
||||
// save GM account without delay and output message
|
||||
if (!AccountMgr::IsPlayerAccount(handler->GetSession()->GetSecurity()))
|
||||
if (handler->GetSession()->HasPermission(RBAC_PERM_COMMANDS_SAVE_WITHOUT_DELAY))
|
||||
{
|
||||
if (Player* target = handler->getSelectedPlayer())
|
||||
target->SaveToDB();
|
||||
@@ -938,8 +938,8 @@ public:
|
||||
|
||||
static bool HandleUnstuckCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
//No args required for players
|
||||
if (handler->GetSession() && AccountMgr::IsPlayerAccount(handler->GetSession()->GetSecurity()))
|
||||
// No args required for players
|
||||
if (handler->GetSession() && !handler->GetSession()->HasPermission(RBAC_PERM_COMMANDS_USE_UNSTUCK_WITH_ARGS))
|
||||
{
|
||||
// 7355: "Stuck"
|
||||
if (Player* player = handler->GetSession()->GetPlayer())
|
||||
|
||||
Reference in New Issue
Block a user