mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[8923] Restructure gossip menus and make it possible to build selections by database
As result, gossip for GO is now possible. Moved related data structures and remove useless from code. Please note that after some time, table npc_gossip will be fully removed (use menuId in _template in relation to gossip_menu as replacement). Special thanks to GriffonHeart for help with research, discussions and ideas of code and thanks to Vladimir for helpful input. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
8b0ce112ba
commit
090c8b8854
19 changed files with 689 additions and 455 deletions
|
|
@ -872,13 +872,13 @@ void GameObject::Use(Unit* user)
|
|||
|
||||
case GAMEOBJECT_TYPE_QUESTGIVER: //2
|
||||
{
|
||||
if(user->GetTypeId()!=TYPEID_PLAYER)
|
||||
if (user->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
Player* player = (Player*)user;
|
||||
|
||||
player->PrepareQuestMenu( GetGUID() );
|
||||
player->SendPreparedQuest( GetGUID() );
|
||||
player->PrepareGossipMenu(this, GetGOInfo()->questgiver.gossipID);
|
||||
player->SendPreparedGossip(this);
|
||||
return;
|
||||
}
|
||||
//Sitting: Wooden bench, chairs enzz
|
||||
|
|
@ -952,12 +952,17 @@ void GameObject::Use(Unit* user)
|
|||
Player* player = (Player*)user;
|
||||
|
||||
// show page
|
||||
if(info->goober.pageId)
|
||||
if (info->goober.pageId)
|
||||
{
|
||||
WorldPacket data(SMSG_GAMEOBJECT_PAGETEXT, 8);
|
||||
data << GetGUID();
|
||||
player->GetSession()->SendPacket(&data);
|
||||
}
|
||||
else if (info->questgiver.gossipID)
|
||||
{
|
||||
player->PrepareGossipMenu(this, info->goober.gossipID);
|
||||
player->SendPreparedGossip(this);
|
||||
}
|
||||
|
||||
// possible quest objective for active quests
|
||||
player->CastedCreatureOrGO(info->id, GetGUID(), 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue