[DiscordArchive] Any clue about the trainers?
[DiscordArchive] Any clue about the trainers?
Archived author: Lucian Tudorache • Posted: 2023-07-03T08:19:24.779000+00:00
Original source
Any clue about the trainers?
Archived author: <o> • Posted: 2023-07-03T08:36:09.502000+00:00
Original source
`trainer`, `trainer_spell` (sql tables) and `SkillLineAbility.dbc` for trainer spells. might also need `SkillRaceClassInfo.dbc` set up but don't remember if you did
Archived author: Lucian Tudorache • Posted: 2023-07-03T08:40:29.566000+00:00
Original source
I'm more curious into making just custom NPCs which have already existing Trainer IDs. As an example, if I'm making a custom NPC and making it use the Trainer ID for Warrior Trainer, the Gossips are shown incorrect because I'm getting the "Player X requested wrong trainer" and I assume that might cause it...
Archived author: Lucian Tudorache • Posted: 2023-07-03T08:41:43.043000+00:00
Original source
Also impossible to have 2 Gossip_Menu options, one for the specific class accessing the Trainer, and one for any other class which should have displayed another Gossip...
Archived author: <o> • Posted: 2023-07-03T08:41:52.552000+00:00
Original source
that happens because if there's only one gossip option then the client will attempt to select the first one, and then the server errors because the player isn't supposed to be able to select that option.
the way the core does this normally is to attach a condition on the option so that it's only sent to the client if they have the correct class to begin with
Archived author: <o> • Posted: 2023-07-03T08:43:28.844000+00:00
Original source
iirc it's two conditions, one for the option itself and one for the text to display in the gossip, you can check the `condition` documentation for the core you're using
Archived author: <o> • Posted: 2023-07-03T08:43:54.189000+00:00
Original source
or if you need even more fine-grained control, use a creature script
Archived author: Lucian Tudorache • Posted: 2023-07-03T08:44:19.803000+00:00
Original source
I'm using TrinityCore, and tried to replicate classes trainer duplicating the already existing Creatures Template
Archived author: Lucian Tudorache • Posted: 2023-07-03T08:44:41.365000+00:00
Original source
That's why I thought these might be hard-coded
Archived author: <o> • Posted: 2023-07-03T08:44:56.854000+00:00
Original source
nah it's not hardcoded, you just need to also port the `conditions` entries