[DiscordArchive] Ok, I'm at loss again. I'm trying to change the default gossip text (Greetings $N) Afaik it's not pu
[DiscordArchive] Ok, I'm at loss again. I'm trying to change the default gossip text (Greetings $N) Afaik it's not pu
Archived author: Demonic • Posted: 2023-01-19T20:37:21.075000+00:00
Original source
Ok, I'm at loss again. I'm trying to change the default gossip text (Greetings $N) Afaik it's not pulled from DB. I looked through interface lua and xml in MPQs, i tried looking into core and I just can't find it. Any chance someone here already did this and can point my stupid ass to where to look?
Archived author: stoneharry • Posted: 2023-01-19T20:49:33.560000+00:00
Original source
`Interface\FrameXML\GossipFrame.lua#L35`
```lua
function GossipFrameUpdate()
GossipFrame.buttonIndex = 1;
GossipGreetingText:SetText(GetGossipText());
```
Maybe `GetGossipText()` returns a default value, not looked into it further but you could always override it client side here.
Archived author: stoneharry • Posted: 2023-01-19T20:50:09.331000+00:00
Original source
Server side it you could change the default value too
Archived author: Foe • Posted: 2023-01-19T20:51:04.137000+00:00
Original source
GetGossipText() probably returns a default or text ID if the creature has one
Archived author: Foe • Posted: 2023-01-19T20:51:26.738000+00:00
Original source
So you could definitely hijack that function and override it client side
repareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool showQuests /*= false*/)Archived author: stoneharry • Posted: 2023-01-19T20:52:10.808000+00:00
Original source
Server side, `Player.cpp`
```c++
void Player:
repareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool showQuests /*= false*/)
{
PlayerMenu* menu = PlayerTalkClass;
menu->ClearMenus();
menu->GetGossipMenu().SetMenuId(menuId);
```
Archived author: stoneharry • Posted: 2023-01-19T20:52:21.432000+00:00
Original source
Change default value of menuId to something else
Archived author: Foe • Posted: 2023-01-19T20:52:30.439000+00:00
Original source
That works too