mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 07:37:02 +00:00
Some quest fixes.
This commit is contained in:
parent
178679b4fa
commit
79e71ef4ac
5 changed files with 92 additions and 58 deletions
|
|
@ -419,8 +419,6 @@ void PlayerMenu::SendQuestGiverStatus( uint8 questStatus, uint64 npcGUID )
|
|||
|
||||
void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID, bool ActivateAccept )
|
||||
{
|
||||
WorldPacket data(SMSG_QUESTGIVER_QUEST_DETAILS, 100); // guess size
|
||||
|
||||
std::string Title = pQuest->GetTitle();
|
||||
std::string Details = pQuest->GetDetails();
|
||||
std::string Objectives = pQuest->GetObjectives();
|
||||
|
|
@ -443,16 +441,18 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
|
|||
}
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_QUESTGIVER_QUEST_DETAILS, 100); // guess size
|
||||
data << uint64(npcGUID);
|
||||
data << uint64(0); // wotlk, something todo with quest sharing?
|
||||
data << uint32(pQuest->GetQuestId());
|
||||
data << Title;
|
||||
data << Details;
|
||||
data << Objectives;
|
||||
data << uint32(ActivateAccept);
|
||||
data << uint8(ActivateAccept ? 1 : 0);
|
||||
data << uint32(pQuest->GetSuggestedPlayers());
|
||||
data << uint8(0); // new wotlk
|
||||
data << uint8(0); // new 3.1
|
||||
data << uint8(0); // new 3.3.0
|
||||
|
||||
if (pQuest->HasFlag(QUEST_FLAGS_HIDDEN_REWARDS))
|
||||
{
|
||||
|
|
@ -493,12 +493,25 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
|
|||
data << uint32(pQuest->GetRewOrReqMoney());
|
||||
}
|
||||
|
||||
data << uint32(0);
|
||||
// rewarded honor points. Multiply with 10 to satisfy client
|
||||
data << uint32(10*MaNGOS::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills()));
|
||||
data << float(0); // new 3.3.0
|
||||
data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast==0)
|
||||
data << uint32(pQuest->GetRewSpellCast()); // casted spell
|
||||
data << uint32(pQuest->GetCharTitleId()); // CharTitleId, new 2.4.0, player gets this title (id from CharTitles)
|
||||
data << uint32(pQuest->GetBonusTalents()); // bonus talents
|
||||
data << uint32(0);
|
||||
data << uint32(0);
|
||||
|
||||
for(int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
|
||||
data << uint32(0);
|
||||
|
||||
for(int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
|
||||
data << uint32(0);
|
||||
|
||||
for(int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
|
||||
data << uint32(0);
|
||||
|
||||
data << uint32(QUEST_EMOTE_COUNT);
|
||||
for (uint32 i=0; i < QUEST_EMOTE_COUNT; ++i)
|
||||
|
|
@ -679,12 +692,12 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID,
|
|||
|
||||
WorldPacket data( SMSG_QUESTGIVER_OFFER_REWARD, 50 ); // guess size
|
||||
|
||||
data << npcGUID;
|
||||
data << pQuest->GetQuestId();
|
||||
data << uint64(npcGUID);
|
||||
data << uint32(pQuest->GetQuestId());
|
||||
data << Title;
|
||||
data << OfferRewardText;
|
||||
|
||||
data << uint32( EnableNext );
|
||||
data << uint8(EnableNext ? 1 : 0);
|
||||
data << uint32(0); // unk
|
||||
|
||||
uint32 EmoteCount = 0;
|
||||
|
|
@ -731,15 +744,29 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID,
|
|||
data << uint32(0);
|
||||
}
|
||||
|
||||
data << uint32(0);
|
||||
data << uint32(pQuest->GetRewOrReqMoney());
|
||||
|
||||
// rewarded honor points. Multiply with 10 to satisfy client
|
||||
data << uint32(10*MaNGOS::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills()));
|
||||
data << float(0);
|
||||
data << uint32(0x08); // unused by client?
|
||||
data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast==0)
|
||||
data << uint32(pQuest->GetRewSpellCast()); // casted spell
|
||||
data << uint32(0); // unknown
|
||||
data << uint32(pQuest->GetBonusTalents()); // bonus talents
|
||||
data << uint32(0);
|
||||
data << uint32(0);
|
||||
|
||||
for(int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) // reward factions ids
|
||||
data << uint32(0);
|
||||
|
||||
for(int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) // columnid in QuestFactionReward.dbc (zero based)?
|
||||
data << uint32(0);
|
||||
|
||||
for(int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) // reward reputation override?
|
||||
data << uint32(0);
|
||||
|
||||
pSession->SendPacket( &data );
|
||||
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId() );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue