azerothcore / azerothcore-wotlk

Complete Open Source and Modular solution for MMO
http://www.azerothcore.org
GNU Affero General Public License v3.0
6.43k stars 2.58k forks source link

".learn all my class" missing spells #2687

Open BarbzYHOOL opened 4 years ago

BarbzYHOOL commented 4 years ago
SMALL DESCRIPTION:

Missing spells when you use the command .learn all my class. I think this affects the module mod-learn-all-spells so it's kinda important

EXPECTED BEHAVIOUR:

Learn ALL spells from the trainer (and from class quests and from class items?)

CURRENT BEHAVIOUR:

Missing spells, check the trainer, he still has spells to teach you at level 80.

STEPS TO REPRODUCE THE PROBLEM:

example with a horde druid:

  1. go from 1 to 80 with .level 79
  2. then go to a druid trainer with .tele elderrise and see the missing spells
EXTRA NOTES:
BRANCH(ES):

master

AC HASH/COMMIT:

8760a9f5c9739726cda09a96c44c11d4a6813e72

OPERATING SYSTEM:
MODULES:

mod-learn-all-spells

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/88852908-learn-all-my-class-missing-spells?utm_campaign=plugin&utm_content=tracker%2F40032087&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F40032087&utm_medium=issues&utm_source=github).
BarbzYHOOL commented 4 years ago

it also teaches all the spells from talent

but we also have a command .learn all my talents so it should not mix spells and talents

aradep commented 3 years ago

Confirmed on 2a17125.

The command is also adding wrong spells.

image

Missing Spells
Death Knight Path of Frost Rune of Spellbreaking Rune of Spellshattering Rune of Lichbane Rune of Swordbreaking Rune of Swordshattering Rune of the Fallen Crusader Rune of the Nerubian Carapace Rune of the Stoneskin Gargoyle
Druid Track Humanoids Feline Grace Savage Defense
Hunter Eagle Eye Beast Lore Parry Dual Wield Mail Track Hidden
Paladin Parry Summon Warhorse Plate Mail
Rogue Parry Detect Traps
Shaman Call of the Elements Call of the Ancestors Call of the Spirits Far Sight Mail
Warlock Sense Demons Soulshatter Summon Felsteed
Warrior Parry Dual Wield Plate Mail
MassimoPerini commented 1 year ago

Hi, the problem with the spells seems to be caused by if (spellInfo->SpellFamilyName != family) under static bool HandleLearnAllMySpellsCommand(ChatHandler* handler)

spellInfo->SpellFamilyName is always 0 for those spells, while family = classEntry->spellfamily; is the spell family of the character, defined in ChrClasses.dbc (SpellClassSet) (e.g., 7 for Druid).

I fixed spellInfo->SpellFamilyName for the spells belonging to a single class (e.g., Path of Frost), but I'm not sure how to handle spells belonging to multiple classes (e.g., Parry)

Kitzunu commented 2 months ago

The problem is that they are all in SPELLFAMILY_GENERIC which is why they are filtered out when checking for SpellFamilyName