*Fix: Only show quests in the first page of gossip, instead of every page.
--HG-- branch : trunk
This commit is contained in:
@@ -333,7 +333,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
|
||||
if (!sScriptMgr.GossipHello(_player, unit))
|
||||
{
|
||||
// _player->TalkedToCreature(unit->GetEntry(), unit->GetGUID());
|
||||
_player->PrepareGossipMenu(unit, unit->GetCreatureInfo()->GossipMenuId);
|
||||
_player->PrepareGossipMenu(unit, unit->GetCreatureInfo()->GossipMenuId, true);
|
||||
_player->SendPreparedGossip(unit);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -13257,7 +13257,7 @@ void Player::SendNewItem(Item *item, uint32 count, bool received, bool created,
|
||||
/*** GOSSIP SYSTEM ***/
|
||||
/*********************************************************/
|
||||
|
||||
void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
|
||||
void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId, bool showQuests)
|
||||
{
|
||||
PlayerMenu* pMenu = PlayerTalkClass;
|
||||
pMenu->ClearMenus();
|
||||
@@ -13278,7 +13278,7 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
|
||||
{
|
||||
pCreature = pSource->ToCreature();
|
||||
npcflags = pCreature->GetUInt32Value(UNIT_NPC_FLAGS);
|
||||
if (npcflags & UNIT_NPC_FLAG_QUESTGIVER)
|
||||
if (npcflags & UNIT_NPC_FLAG_QUESTGIVER && showQuests)
|
||||
PrepareQuestMenu(pSource->GetGUID());
|
||||
}
|
||||
else if (pSource->GetTypeId() == TYPEID_GAMEOBJECT)
|
||||
|
||||
+1
-1
@@ -1223,7 +1223,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
/*** GOSSIP SYSTEM ***/
|
||||
/*********************************************************/
|
||||
|
||||
void PrepareGossipMenu(WorldObject *pSource, uint32 menuId = 0);
|
||||
void PrepareGossipMenu(WorldObject *pSource, uint32 menuId = 0, bool showQuests = false);
|
||||
void SendPreparedGossip(WorldObject *pSource);
|
||||
void OnGossipSelect(WorldObject *pSource, uint32 gossipListId, uint32 menuId);
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recv_data)
|
||||
if (sScriptMgr.GossipHello(_player, pCreature))
|
||||
return;
|
||||
|
||||
_player->PrepareGossipMenu(pCreature, pCreature->GetCreatureInfo()->GossipMenuId);
|
||||
_player->PrepareGossipMenu(pCreature, pCreature->GetCreatureInfo()->GossipMenuId, true);
|
||||
_player->SendPreparedGossip(pCreature);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user