[Share] Profession Npc+Recipes

Hey all!

I’ve been working on this NPC that gives you two professions with all their respective crafts for a couple of days.

Ran into some trouble finding out how to make him teach every recipe for each of the professions, but I got that working today and decided to share it with those who might be interested.

Profession NPC

All there’s left to do now is make him only teach the recipes for the main profession and for each profession’s specialization separately; for example, make him give you Tailoring recipes and ONLY Spellfire if you select it. Not Mooncloth, Spellfire and Shadoweave all at once.

If there’s anybody there that may help out with doing this, much appreciated.

Enjoy /emoticons/default_smile.png

suggestion : for skillcount can use the conf value? maxtradeskills

or just



[LEFT][SIZE=10px][FONT=inherit]-.- [/FONT][/SIZE]


You’d need to fix your version of HandleLearnSkillRecipesHelper() so that it skips the specializations and only teaches the standard recipes. Something like:

switch (skillLine->spellId)


	case 22222:  // these would be the IDs of the specializations you want to skip

	case 33333:

	case 44444:

	case 55555:



	   // do nothing. VS likes to have a 'default' case though


SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(skillLine->spellId);

if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, player, false))


player->learnSpell(skillLine->spellId, false);

Then you’d need to write one that teaches only the specializations when selected.

Link dead.