[3.3.5] Why does LearnSpell() learn all spells from skillline?


for a few days i update my svn to the fresh trinity core. Now i have a little problem with the player->LearnSpell().

Old core: The function learn only the spell id from the parameter.

New core: The function learn the spell id from the parameter and all spells in the same SkillLine

Is there a possibility to learn only the one spell and not the whole SkillLine?

Does nobody has an idea? :confused:

have you tried using the other arguments the function has?

not sure what they do though…

Mhm a new argument is uint32 fromSkill, but i set it to 0 and -1… nothing happens.

By default when you learn a spell it also teaches you the skill line of that spell (LearnSpell with fromSkill = 0) - which in turn also teaches you all spells from that skill line that are marked in dbc as autolearned with skill line (and calls LearnSpell with fromSkill = id of skill line)

You could try using fromSkill with a proper value for your purpose

A proper value? For example: If i want to learn this spell Wrath (http://wotlk.openwow.com/spell=5176 ) then i call the function: player->LearnSpell(5176, true, 0);

So which value does i need?

skill line id for 5176

Mhm does trinity has a function which get the skill line automatically?