[DiscordArchive] Is there a built in way to send those main GossipMenu text boxes from a script without requiring it
[DiscordArchive] Is there a built in way to send those main GossipMenu text boxes from a script without requiring it
Archived author: whatwere • Posted: 2022-07-17T18:47:19.808000+00:00
Original source
Is there a built in way to send those main GossipMenu text boxes from a script without requiring it to be in the database?
Archived author: whatwere • Posted: 2022-07-17T18:47:57.428000+00:00
Original source
SendGossipMenuFor works only for DB items and is bad to mix with scripts, AddGossipItemFor only adds options from what I can tell.
Archived author: Revision • Posted: 2022-07-17T18:52:14.516000+00:00
Original source
Seeing as `SendGossipMenuFor` only accepts uint32, even if you were to add to the storage loaded from db it would still require an id.
Archived author: whatwere • Posted: 2022-07-17T18:52:51.473000+00:00
Original source
Does it work by sending the gossip id to the client then the client requesting the gossip based on ID?
Archived author: Revision • Posted: 2022-07-17T18:53:31.111000+00:00
Original source
I'm not sure what you're asking
Archived author: whatwere • Posted: 2022-07-17T18:54:27.550000+00:00
Original source
When is the text sent from server to client
Archived author: whatwere • Posted: 2022-07-17T18:54:43.769000+00:00
Original source
And how does the server know what text to send/client know what text to request?
Archived author: Revision • Posted: 2022-07-17T18:56:41.072000+00:00
Original source
It loads from `npc_text` and `npc_text_locale`
Archived author: Revision • Posted: 2022-07-17T18:56:48.224000+00:00
Original source
That's what the server sends to the client
Archived author: whatwere • Posted: 2022-07-17T18:57:34.056000+00:00
Original source
HandleGossipHelloOpcode is what I was looking for
```
if (!sScriptMgr->OnGossipHello(_player, unit))
{
// _player->TalkedToCreature(unit->GetEntry(), unit->GetGUID());
_player->PrepareGossipMenu(unit, unit->GetCreatureTemplate()->GossipMenuId, true);
_player->SendPreparedGossip(unit);
}```