Creating gossip menu on 335?

Hi, I’m trying to create a gossip menu on 335, but I can’t really figure out on how to do that, I’ve looked for tutorials and information regarding this, but all I see is old implementations as it looks like it changed around 2 years ago.

Fo example, in the past it seems like we would simply override OnGossipHello and add a menu item to the player such as:

player->ADD_GOSSIP_ITEM(x,x,x,x);

That doesn’t seem to be the case anymore and generally, functions such as OnGossipHello, OnGossipSelect, GossipSelectCode etc doesn’t seem to be found anywhere.

I can see that there is such implementations in newer trinitycore version(master for example) on ScriptMgr.cpp, but not in 335.

I feel really dumb, but I simply can’t figure this out. If someone could give me an example or direct me on how to implement that it would be very appreciated. Thanks! :slight_smile:

Here’s a script that implements a gossip menu.

Most changes in the past few years were renames and small refactorings, so if you’re used to old scripts it should still look familiar.

Look into CreatureAI.h for GossipSelectCode() and the other AI hooks.

That’s so weird, when trying to search for all ‘gossip’ keywords in all files it didn’t find such cases to me.

I wonder why, anyway, thanks a lot! I feel so dumb -.-