Hi !
I'm trying to create a gossip item, with gossip menu, on TrinityCore but fruitlessly.
It's why i call the community for some help.
So this is my code :
Code:
class gossip_custom_item : public ItemScript
{
public:
gossip_custom_item()
: ItemScript("gossip_custom_item")
{
}
bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/)
{
player->ADD_GOSSIP_ITEM( 3, "Bla bla bla" , GOSSIP_SENDER_MAIN, 1);
player->ADD_GOSSIP_ITEM( 0, "bla bla bla, again !" , GOSSIP_SENDER_MAIN, 2);
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,item->GetGUID());
return true;
}
};
Yes, it work, but i want to execute some actions when the player click on one option.
I have searched in Player.cpp, vainly too ...
Anyone can help me ?
Thanks a lot !
Cordially, Arcanios