There is this script, but after recent updates, TC stopped compiling.
https://pastebin.com/BSbn7hzL
As far as I understand from the last commits, it is necessary to replace “bool OnGossipHello(Player* player, Creature* creature)” on “bool GossipHello(Player* player)” and “player->GetSession()->SendListInventory(creature->GetGUID())” on “player->GetSession()->SendListInventory(me->GetGUID())”.
I would like to see more information on the current changes in TC.
Here is the commit that changed how to script gossip: https://github.com/TrinityCore/TrinityCore/commit/f913f3bb8977c127d200d5d4a608ab434b21bbcd
Here is how I fixed my scripts:
Before: https://pastebin.com/JL0v64LF
After: https://pastebin.com/N3xywcBS
The difference: https://www.diffchecker.com/B8aEVEJ7
So basically I just changed the OnGossipHello and similar functions into static and removed the override from them.
Then I made a small AI script at the bottom of the script. The AI script can be the same for any other gossip script.
The advantages of this kind of fixing is that you only need to add some code instead of changing all the variables from creature to me and similar small fiddling. There is no need to transform the code somehow.
Also in case you have coded your code to use OnGossipSelect or OnGossipHello inside of themselves or each other, then this allows you to keep the code like that. Its not possible to do that with the new system due to how clearing will lose the sender and action data.
Thanks for the explanation.