This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION:] How to create a class specific trainer?  (Read 1701 times)

Serifaz

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 293
    • View Profile
[QUESTION:] How to create a class specific trainer?
« on: September 28, 2015, 05:37:52 pm »
Ok so checked out the post Here!
I followed what I could for direction on how to make a class specific trainer...
But I'm failing.
Big surprise right?
Anyways I am using TrinityCore
I copied a current trainer from the database, and changed the (trainer_class) entry to my custom class, which is 12.
I have created an entry in the skillline.dbc and skilllineability.dbc for the new spells I made,
but when I go in game after adding the spell to the trainer in the (npc_trainer) table.
The trainer still will open its training window for all classes and the spells don't appear in the training window. even when on the correct class.
Any ideas?

Not sure if I provided enough info.Just let me know :)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: [QUESTION:] How to create a class specific trainer?
« Reply #1 on: September 28, 2015, 05:52:18 pm »
gossip_menu_option - this table handles what is being shown in gossip menu. Are you sure that TC (and/or) client can work with class with ID 12 when handling this? May be both client or emu issue. Its quite likely that your trainer is OK and problem is in gossip menu. Check that out.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

Serifaz

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 293
    • View Profile
Re: [QUESTION:] How to create a class specific trainer?
« Reply #2 on: September 28, 2015, 06:13:59 pm »
Yes I have a new gossip_menu_option entry and one in gossip_menu
Is it possible that it isn't assigning correctly?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Serifaz

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 293
    • View Profile
Re: [QUESTION:] How to create a class specific trainer?
« Reply #3 on: September 28, 2015, 07:41:10 pm »
What modifications to the core, if any would need to be made?
I have searched high and low for trainer entries of different classes and can't find anything.
If there in there. do you know what file I should look at?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: [QUESTION:] How to create a class specific trainer?
« Reply #4 on: September 28, 2015, 10:04:32 pm »
Trainers tend to have quite often gossip_menu=0 (at least it works flawlessly). There is base gossip_menu with ID 0 which is, in fact, template menu for whatever kind of NPC you might want to need. Maybe you can just try that menu 0.

Anyway, don't ask me about core - I have no experience with C++ and TrinityCore's sources at all. But I know that TC2 loves to have some things in enums which have to be edited together with DBCs and DB. If you have succesfuly added new class with ID 12, you actually know much more about this than me :D. Take a look into code where gossip menu options showing is being implemented, thats all I can really say.

In fact, gossip menu has set in DB only that it shows "train me" option when NPC having that menu option has trainer flag. But there is not specified for what class is that gossip menu option meant. That is set in creature_template.trainer_class.


Well, if you can't solve this in a clean way, there is actually a way around. You can set in creature_template.trainer_spell that player needs to know some spell to unlock "train me" option in gossip menu. So you can fill in some spell which only your custom class knows and there you go. However, this won't work for learning dual talent specialization and resetting talents.


EDIT: Btw, a stupid question, does your trainer have Class Trainer in NPC flag, instead of just Trainer? Just to make sure.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [QUESTION:] How to create a class specific trainer?
« Reply #5 on: September 30, 2015, 05:16:17 am »
No enum for trainers here. They are basically the same trainer npc repeated, just with different settings, e.g. required race, etc.

SkillLine*.dbc is the main-component here. You need to edit those to add 'spells' to a potential trainer class.

SkillRaceClassInfo.dbc
SkillLineCategory.dbc

Those are also important. Make sure those are up to necessary.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: [QUESTION:] How to create a class specific trainer?
« Reply #6 on: September 30, 2015, 07:10:06 am »
Well, that surprised even me that spells are related to classes in skilllines, and I thought I already know those DBCs very well :D. Thanks, I hope it will work now.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [QUESTION:] How to create a class specific trainer?
« Reply #7 on: September 30, 2015, 08:37:10 am »
Client is basically validating the data from the dbcs, while server-side generates the lists. If Client is not up-to-date to serverside, there will be different displays, however those will not work.

Reminds me off the Warrior Talent bug somewhere in MoP. With an addon, Warriors were able to learn Avatar at level 15 because of a malfunction.


Good times.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »