mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[9292] Remove unused declaration of string in sendQuestGiverQuestDetails
Some additional code cleanup for readability Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
a0a4f7a719
commit
d4f5c0d76f
2 changed files with 18 additions and 9 deletions
|
|
@ -436,7 +436,6 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
|
|||
std::string Title = pQuest->GetTitle();
|
||||
std::string Details = pQuest->GetDetails();
|
||||
std::string Objectives = pQuest->GetObjectives();
|
||||
std::string EndText = pQuest->GetEndText();
|
||||
|
||||
int loc_idx = pSession->GetSessionDbLocaleIndex();
|
||||
if (loc_idx >= 0)
|
||||
|
|
@ -450,8 +449,6 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
|
|||
Details=ql->Details[loc_idx];
|
||||
if (ql->Objectives.size() > (size_t)loc_idx && !ql->Objectives[loc_idx].empty())
|
||||
Objectives=ql->Objectives[loc_idx];
|
||||
if (ql->EndText.size() > (size_t)loc_idx && !ql->EndText[loc_idx].empty())
|
||||
EndText=ql->EndText[loc_idx];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -479,26 +476,36 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
|
|||
ItemPrototype const* IProto;
|
||||
|
||||
data << uint32(pQuest->GetRewChoiceItemsCount());
|
||||
|
||||
for (uint32 i=0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
|
||||
{
|
||||
if ( !pQuest->RewChoiceItemId[i] ) continue;
|
||||
if (!pQuest->RewChoiceItemId[i])
|
||||
continue;
|
||||
|
||||
data << uint32(pQuest->RewChoiceItemId[i]);
|
||||
data << uint32(pQuest->RewChoiceItemCount[i]);
|
||||
|
||||
IProto = ObjectMgr::GetItemPrototype(pQuest->RewChoiceItemId[i]);
|
||||
if ( IProto )
|
||||
|
||||
if (IProto)
|
||||
data << uint32(IProto->DisplayInfoID);
|
||||
else
|
||||
data << uint32( 0x00 );
|
||||
data << uint32(0x00);
|
||||
}
|
||||
|
||||
data << uint32(pQuest->GetRewItemsCount());
|
||||
|
||||
for (uint32 i=0; i < QUEST_REWARDS_COUNT; ++i)
|
||||
{
|
||||
if ( !pQuest->RewItemId[i] ) continue;
|
||||
if (!pQuest->RewItemId[i])
|
||||
continue;
|
||||
|
||||
data << uint32(pQuest->RewItemId[i]);
|
||||
data << uint32(pQuest->RewItemCount[i]);
|
||||
|
||||
IProto = ObjectMgr::GetItemPrototype(pQuest->RewItemId[i]);
|
||||
if ( IProto )
|
||||
|
||||
if (IProto)
|
||||
data << uint32(IProto->DisplayInfoID);
|
||||
else
|
||||
data << uint32(0);
|
||||
|
|
@ -528,11 +535,13 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
|
|||
data << uint32(0);
|
||||
|
||||
data << uint32(QUEST_EMOTE_COUNT);
|
||||
|
||||
for (uint32 i=0; i < QUEST_EMOTE_COUNT; ++i)
|
||||
{
|
||||
data << uint32(pQuest->DetailsEmote[i]);
|
||||
data << uint32(pQuest->DetailsEmoteDelay[i]); // DetailsEmoteDelay (in ms)
|
||||
}
|
||||
|
||||
pSession->SendPacket( &data );
|
||||
|
||||
sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9291"
|
||||
#define REVISION_NR "9292"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue