mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +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 Title = pQuest->GetTitle();
|
||||||
std::string Details = pQuest->GetDetails();
|
std::string Details = pQuest->GetDetails();
|
||||||
std::string Objectives = pQuest->GetObjectives();
|
std::string Objectives = pQuest->GetObjectives();
|
||||||
std::string EndText = pQuest->GetEndText();
|
|
||||||
|
|
||||||
int loc_idx = pSession->GetSessionDbLocaleIndex();
|
int loc_idx = pSession->GetSessionDbLocaleIndex();
|
||||||
if (loc_idx >= 0)
|
if (loc_idx >= 0)
|
||||||
|
|
@ -450,8 +449,6 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
|
||||||
Details=ql->Details[loc_idx];
|
Details=ql->Details[loc_idx];
|
||||||
if (ql->Objectives.size() > (size_t)loc_idx && !ql->Objectives[loc_idx].empty())
|
if (ql->Objectives.size() > (size_t)loc_idx && !ql->Objectives[loc_idx].empty())
|
||||||
Objectives=ql->Objectives[loc_idx];
|
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;
|
ItemPrototype const* IProto;
|
||||||
|
|
||||||
data << uint32(pQuest->GetRewChoiceItemsCount());
|
data << uint32(pQuest->GetRewChoiceItemsCount());
|
||||||
|
|
||||||
for (uint32 i=0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
|
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->RewChoiceItemId[i]);
|
||||||
data << uint32(pQuest->RewChoiceItemCount[i]);
|
data << uint32(pQuest->RewChoiceItemCount[i]);
|
||||||
|
|
||||||
IProto = ObjectMgr::GetItemPrototype(pQuest->RewChoiceItemId[i]);
|
IProto = ObjectMgr::GetItemPrototype(pQuest->RewChoiceItemId[i]);
|
||||||
if ( IProto )
|
|
||||||
|
if (IProto)
|
||||||
data << uint32(IProto->DisplayInfoID);
|
data << uint32(IProto->DisplayInfoID);
|
||||||
else
|
else
|
||||||
data << uint32( 0x00 );
|
data << uint32(0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
data << uint32(pQuest->GetRewItemsCount());
|
data << uint32(pQuest->GetRewItemsCount());
|
||||||
|
|
||||||
for (uint32 i=0; i < QUEST_REWARDS_COUNT; ++i)
|
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->RewItemId[i]);
|
||||||
data << uint32(pQuest->RewItemCount[i]);
|
data << uint32(pQuest->RewItemCount[i]);
|
||||||
|
|
||||||
IProto = ObjectMgr::GetItemPrototype(pQuest->RewItemId[i]);
|
IProto = ObjectMgr::GetItemPrototype(pQuest->RewItemId[i]);
|
||||||
if ( IProto )
|
|
||||||
|
if (IProto)
|
||||||
data << uint32(IProto->DisplayInfoID);
|
data << uint32(IProto->DisplayInfoID);
|
||||||
else
|
else
|
||||||
data << uint32(0);
|
data << uint32(0);
|
||||||
|
|
@ -528,11 +535,13 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
|
||||||
data << uint32(0);
|
data << uint32(0);
|
||||||
|
|
||||||
data << uint32(QUEST_EMOTE_COUNT);
|
data << uint32(QUEST_EMOTE_COUNT);
|
||||||
|
|
||||||
for (uint32 i=0; i < QUEST_EMOTE_COUNT; ++i)
|
for (uint32 i=0; i < QUEST_EMOTE_COUNT; ++i)
|
||||||
{
|
{
|
||||||
data << uint32(pQuest->DetailsEmote[i]);
|
data << uint32(pQuest->DetailsEmote[i]);
|
||||||
data << uint32(pQuest->DetailsEmoteDelay[i]); // DetailsEmoteDelay (in ms)
|
data << uint32(pQuest->DetailsEmoteDelay[i]); // DetailsEmoteDelay (in ms)
|
||||||
}
|
}
|
||||||
|
|
||||||
pSession->SendPacket( &data );
|
pSession->SendPacket( &data );
|
||||||
|
|
||||||
sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
|
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__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9291"
|
#define REVISION_NR "9292"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue