Azerothcore-wotlk: can't learn scripted spells via command

Created on 26 Mar 2019  路  9Comments  路  Source: azerothcore/azerothcore-wotlk

When you try to learn a spell from spell_script_names table, you got error "spell cannot be learned by using a command". If I remove its row from the table it will work what the hell ?

Hash: 4193898

Fix included

Most helpful comment

ideally this should be configurable via DB to be consistent with other commands, but a quickfix is better than nothing so well done @poszer

All 9 comments

@ladiszlai please add your AC version

@FrancescoBorzi newest fresh compiled core

@ladiszlai ok but still please add the hash commit to keep track of when this issue was experienced

@ladiszlai, look at this

if (handler->GetSession()->GetSecurity() < SEC_CONSOLE && (bounds.first != bounds.second || spellDifficultyId))
{
    handler->PSendSysMessage("Spell %u cannot be learnt using a command!", spell);
    handler->SetSentErrorMessage(true);
    return false;
}

To learn spells you need to have GM level 4 (SEC_CONSOLE)

@Winfidonarleyan Is there a fourth level ? I have level 3 GM acc and I could learn spells which was not using scripts.

@ladiszlai need change condition

ideally this should be configurable via DB to be consistent with other commands, but a quickfix is better than nothing so well done @poszer

i guess to have this fully done via DB is called "RBAC" :P

Thank you for fixing this :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CyberFoxHax picture CyberFoxHax  路  3Comments

fallen26 picture fallen26  路  3Comments

PivanDepolo picture PivanDepolo  路  3Comments

Franklampardst picture Franklampardst  路  4Comments

wetbrownsauce picture wetbrownsauce  路  3Comments