• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

TrinityCore 4.3.4 [Profession Trainer] Sort by level issue.

ExonatioN

Noble Member
Hey,
So I've been noticing a quite strange issue that I've digged into, but never tried to fix anything like that so hopefully you guys are able to help me out =)
Alright. The issue is that, as you see in this screenshot:
https://gyazo.com/edec7ea29bc8e4c09438e9eb2cefa8c9
It is sorted by alphabet, and not by level (not showing the levels in fact either), but it should be sorted and show like this:
https://gyazo.com/0b1c4acdce702bff7d753516335d10fa

However, I checked other trainers like leatherworking;
https://gyazo.com/a16c8aa3b6452558808eccc86d9b4ccf which worked. And I went through npc_trainer and I've come to the conclusion that it's because some of the spells work properly, while other doesn't.
In my case, in npc_trainer, using profession-spell -200407 works perfectly (but that's leatherworking so I obviously can't replace), but using profession-spell -200305 will make it bug up like on first screenshot, but that's for cooking so obviously the spell itself for cooking must get fixed, but I have no idea where to look. I don't know where it's handled, but sounds like a core issue, but I could be wrong.

TLDR;
Profession-spell -200407 displays properly, while profession-spell -200305 doesn't, and I kinda need help to make profession-spell -200305 display properly.
This is for a blizzlike fix. Not a custom trainer/script.
Thanks in advance.
 

Rochet2

Moderator / Eluna Dev
Cant see 200407 nor 200305 in npc_trainer for 3.3.5
See here https://trinitycore.atlassian.net/wiki/display/tc/Trainer+reference

Opened cooking trainer (1430). Everything looked fine: http://i.imgur.com/QUmMLrD.png
Seems like everything is ordered by required skill level.

Opened leatherworking trainer (21087). Everythiong looked fine: http://i.imgur.com/tkA4D4L.png
Seems like everything is ordered by required skill level.

So what is the issue? I cant see it on 3.3.5. Or did I misunderstand something?
Why are the menus so different in your screenshots?

I would like to add that it seems that the core sends the spells to client in random order and client sorts them appropriately when it shows them.
Sorting is not server side at least on 3.3.5 from what I can see.
 
Last edited:

ExonatioN

Noble Member
Cant see 200407 nor 200305 in npc_trainer for 3.3.5
See here https://trinitycore.atlassian.net/wiki/display/tc/Trainer+reference

Opened cooking trainer (1430). Everything looked fine: http://i.imgur.com/QUmMLrD.png
Seems like everything is ordered by required skill level.

Opened leatherworking trainer (21087). Everythiong looked fine: http://i.imgur.com/tkA4D4L.png
Seems like everything is ordered by required skill level.

So what is the issue? I cant see it on 3.3.5. Or did I misunderstand something?
Why are the menus so different in your screenshots?

I would like to add that it seems that the core sends the spells to client in random order and client sorts them appropriately when it shows them.
Sorting is not server side at least on 3.3.5 from what I can see.
Right. I thank you for your time though.
Either way, my issue/question is that some of the profession reference ids are sorting out correctly, example: https://gyazo.com/a16c8aa3b6452558808eccc86d9b4ccf (you can see it sorts by skill level)
While other profession references sorts it based on name instead of skill-level, which I want to fix. Example: https://gyazo.com/edec7ea29bc8e4c09438e9eb2cefa8c9

Perhaps you know where this is handled or why it is working correctly for some, while it is sorted wrongly for other profession reference ids?
 
Top