From cd2417eb2f5d8864ec6cb47f57e9720e2909204b Mon Sep 17 00:00:00 2001 From: Yehonal Date: Thu, 1 Sep 2016 14:53:40 +0200 Subject: Using IsGMAccount instead of direct check --- src/scripts/Commands/cs_modify.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/scripts/Commands/cs_modify.cpp') diff --git a/src/scripts/Commands/cs_modify.cpp b/src/scripts/Commands/cs_modify.cpp index 7dc571f5bb..d05078869d 100644 --- a/src/scripts/Commands/cs_modify.cpp +++ b/src/scripts/Commands/cs_modify.cpp @@ -18,6 +18,7 @@ EndScriptData */ #include "Player.h" #include "ReputationMgr.h" #include "ScriptMgr.h" +#include "AccountMgr.h" class modify_commandscript : public CommandScript { @@ -473,7 +474,7 @@ public: } Player* target = handler->getSelectedPlayerOrSelf(); - if (handler->GetSession()->GetSecurity() < SEC_GAMEMASTER) + if (AccountMgr::IsGMAccount(handler->GetSession()->GetSecurity())) target = handler->GetSession()->GetPlayer(); if (!target) { @@ -523,7 +524,7 @@ public: } Player* target = handler->getSelectedPlayerOrSelf(); - if (handler->GetSession()->GetSecurity() < SEC_GAMEMASTER) + if (AccountMgr::IsGMAccount(handler->GetSession()->GetSecurity())) target = handler->GetSession()->GetPlayer(); if (!target) { @@ -570,7 +571,7 @@ public: } Player* target = handler->getSelectedPlayerOrSelf(); - if (handler->GetSession()->GetSecurity() < SEC_GAMEMASTER) + if (AccountMgr::IsGMAccount(handler->GetSession()->GetSecurity())) target = handler->GetSession()->GetPlayer(); if (!target) { @@ -617,7 +618,7 @@ public: } Player* target = handler->getSelectedPlayerOrSelf(); - if (handler->GetSession()->GetSecurity() < SEC_GAMEMASTER) + if (AccountMgr::IsGMAccount(handler->GetSession()->GetSecurity())) target = handler->GetSession()->GetPlayer(); if (!target) { @@ -664,7 +665,7 @@ public: } Player* target = handler->getSelectedPlayerOrSelf(); - if (handler->GetSession()->GetSecurity() < SEC_GAMEMASTER) + if (AccountMgr::IsGMAccount(handler->GetSession()->GetSecurity())) target = handler->GetSession()->GetPlayer(); if (!target) { -- cgit v1.2.3