fix(Core/Commands): Learn spell for GM lvl 3 (#1651)

- Allow Learn spell from spell_script_names.
- To learn spells you need to have GM level 3 (SEC_ADMINISTRATOR) instead of GM level 4 ( SEC_CONSOLE)
This commit is contained in:
Poszer
2019-03-30 00:10:12 +01:00
committed by Barbz
parent dfd034332e
commit b4a89be4cd

View File

@@ -92,7 +92,7 @@ public:
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spell); SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spell);
uint32 spellDifficultyId = sSpellMgr->GetSpellDifficultyId(spell); uint32 spellDifficultyId = sSpellMgr->GetSpellDifficultyId(spell);
if (handler->GetSession()->GetSecurity() < SEC_CONSOLE && (bounds.first != bounds.second || spellDifficultyId)) if (handler->GetSession()->GetSecurity() < SEC_ADMINISTRATOR && (bounds.first != bounds.second || spellDifficultyId))
{ {
handler->PSendSysMessage("Spell %u cannot be learnt using a command!", spell); handler->PSendSysMessage("Spell %u cannot be learnt using a command!", spell);
handler->SetSentErrorMessage(true); handler->SetSentErrorMessage(true);