This change makes sure that the option details in OnGossipSelect hook are from an option sent by the creature you are at.
Before this only the database coded gossips have had this check as they work with menu_ids and check the menu_id and existence of the option clicked in the menu. (makes sure you clicked an existing option in the menu sent)
For C++ sent options the menu_id is 0 or similar. Thus it cant be used.
Without this it is possible to "click" an option with hacks that doesn't exist in the menu originally sent to the player in C++ coded menus. (selections)
Core: Add security to C++ scripted options. Idea by @LilleCarl
I like the concept, but I don't have the time to check the implementation right now, @DDuarte what do you think about this?
please initialize _senderGUID in the constructor.
Note to self so I don't forget when I get home - set _senderGUID to 0 in SendCloseGossip and merge
Core/Gossip: Add security to C++ scripted gossip options by checking …
…guid of the object that the player is interecting with. Idea by @LilleCarl
crash fix for later reference:
Backport of TrinityCore/TrinityCore#11567