Help with profession trainers

Hello, I am trying to duplicate some of the profession trainers and I copied the data from an existing profession trainer from creature_template, I also copied the data from npc_trainer table but the trainer doesn’t work. When I click on the trainer nothing happens.

EDIT: I even tried to make a custom trainer with a gossip menu in c++ :


player->PlayerTalkClass->ClearMenus();
player->ADD_GOSSIP_ITEM(0, “Inscription Trainer”, GOSSIP_SENDER_MAIN, 1000);
player->ADD_GOSSIP_ITEM(0, “Goods”, GOSSIP_SENDER_MAIN, 2000);
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, npc->GetGUID());
}
else
{
ChatHandler(player->GetSession()).PSendSysMessage(COMBAT_MSG);
player->PlayerTalkClass->SendCloseGossip();
}
return true;
}
}

bool OnGossipSelect(Player* player, Creature* npc, uint32 sender, uint32 action)
{
	if (npc->GetEntry() == INSCRIPTION_TRAINER)
	{
		if (!player)
			return false;

		player->PlayerTalkClass->ClearMenus();
		switch (action)
		{
		case 1000:
			player->PlayerTalkClass->SendCloseGossip();
			player->GetSession()->SendTrainerList(npc->GetGUID());
			break;
                            ...

and no luck, the gossip shows but when I select the option, nothing happens.

Is there anything that I missed ? Please help.

so you want to send a trainer list from a specified npc_trainer id? such as the multi vendor patch of rochet?

Yes. That, or simply to find a way to duplicate the regular profession trainers from DB without having to c++ script.

The player[COLOR=rgb(102,102,0)]->[COLOR=rgb(102,0,102)]GetSessionCOLOR=rgb(102,102,0)->[COLOR=rgb(102,0,102)]SendTrainerListCOLOR=rgb(102,102,0); function doesn’t seem to do it. The NPC has gossip+trainer+profession trainer flags, has trainer_type set to 2 (tradeskills), it also has data in npc_trainer copied from an inscription trainer.

So, I guess no one knows how the profession trainer system works? /emoticons/default_sad.png