Skip to content

Commit

Permalink
Core/Gossip: Revert a change to SendPreparedQuest to allow multiple
Browse files Browse the repository at this point in the history
quests again.
Thanks Manuel for pointing it out and Nay for testing
  • Loading branch information
runningnak3d committed Feb 14, 2011
1 parent 30e45b9 commit a8a5734
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14196,6 +14196,52 @@ void Player::SendPreparedQuest(uint64 guid)
}
}
}
// multiple entries
else
{
QEmote qe;
qe._Delay = 0;
qe._Emote = 0;
std::string title = "";

// need pet case for some quests
Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
if (pCreature)
{
uint32 textid = GetGossipTextId(pCreature);
GossipText const* gossiptext = sObjectMgr->GetGossipText(textid);
if (!gossiptext)
{
qe._Delay = 0; //TEXTEMOTE_MESSAGE; //zyg: player emote
qe._Emote = 0; //TEXTEMOTE_HELLO; //zyg: NPC emote
title = "";
}
else
{
qe = gossiptext->Options[0].Emotes[0];

if (!gossiptext->Options[0].Text_0.empty())
{
title = gossiptext->Options[0].Text_0;

int loc_idx = GetSession()->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
if (NpcTextLocale const *nl = sObjectMgr->GetNpcTextLocale(textid))
sObjectMgr->GetLocaleString(nl->Text_0[0], loc_idx, title);
}
else
{
title = gossiptext->Options[0].Text_1;

int loc_idx = GetSession()->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
if (NpcTextLocale const *nl = sObjectMgr->GetNpcTextLocale(textid))
sObjectMgr->GetLocaleString(nl->Text_1[0], loc_idx, title);
}
}
}
PlayerTalkClass->SendQuestGiverQuestList(qe, title, guid);
}
}

bool Player::IsActiveQuest(uint32 quest_id) const
Expand Down

1 comment on commit a8a5734

@Vasago
Copy link

@Vasago Vasago commented on a8a5734 Feb 14, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please look at this issue with quests? Take too long now and affects even more qests with negative ID. Thank you. http://www.trinitycore.org/t/trinitycore/ticket/184 I am testing this change now.

Please sign in to comment.