diff options
Diffstat (limited to 'src/game/GossipDef.cpp')
-rw-r--r-- | src/game/GossipDef.cpp | 55 |
1 files changed, 49 insertions, 6 deletions
diff --git a/src/game/GossipDef.cpp b/src/game/GossipDef.cpp index f4587917630..f35205a8c09 100644 --- a/src/game/GossipDef.cpp +++ b/src/game/GossipDef.cpp @@ -434,8 +434,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(); @@ -458,16 +456,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)) { @@ -508,12 +508,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*Trinity::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 << int32(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(pQuest->RewRepFaction[i]); + + for(int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) + data << int32(pQuest->RewRepValueId[i]); + + for(int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) + data << int32(pQuest->RewRepValue[i]); data << uint32(QUEST_EMOTE_COUNT); for (uint32 i=0; i < QUEST_EMOTE_COUNT; ++i) @@ -563,6 +576,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) data << uint32(pQuest->GetQuestId()); // quest id data << uint32(pQuest->GetQuestMethod()); // Accepted values: 0, 1 or 2. 0==IsAutoComplete() (skip objectives/details) data << uint32(pQuest->GetQuestLevel()); // may be -1, static data, in other cases must be used dynamic level: Player::GetQuestLevel (0 is not known, but assuming this is no longer valid for quest intended for client) + data << uint32(pQuest->GetMinLevel()); // min level data << uint32(pQuest->GetZoneOrSort()); // zone or sort to display in quest log data << uint32(pQuest->GetType()); // quest type @@ -575,6 +589,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) data << uint32(pQuest->GetRepObjectiveValue2()); // shown in quest log as part of quest objective OPPOSITE faction data << uint32(pQuest->GetNextQuestInChain()); // client will request this quest from NPC, if not 0 + data << uint32(0); // unk 3.3.0 if (pQuest->HasFlag(QUEST_FLAGS_HIDDEN_REWARDS)) data << uint32(0); // Hide money rewarded @@ -587,11 +602,14 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) // rewarded honor points data << uint32(Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills())); + data << float(0); // new reward honor (multipled by ~62 at client side) data << uint32(pQuest->GetSrcItemId()); // source item id data << uint32(pQuest->GetFlags() & 0xFFFF); // quest flags data << uint32(pQuest->GetCharTitleId()); // CharTitleId, new 2.4.0, player gets this title (id from CharTitles) data << uint32(pQuest->GetPlayersSlain()); // players slain data << uint32(pQuest->GetBonusTalents()); // bonus talents + data << uint32(0); // bonus arena points + data << uint32(0); // unknown int iI; @@ -616,6 +634,15 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) } } + for(int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) // reward factions ids + data << uint32(pQuest->RewRepFaction[i]); + + for(int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) // columnid+1 QuestFactionReward.dbc? + data << int32(pQuest->RewRepValueId[i]); + + for(int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) // unk (0) + data << int32(pQuest->RewRepValue[i]); + data << pQuest->GetPointMapId(); data << pQuest->GetPointX(); data << pQuest->GetPointY(); @@ -625,6 +652,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) data << Objectives; data << Details; data << EndText; + data << uint8(0); // some string for (iI = 0; iI < QUEST_OBJECTIVES_COUNT; ++iI) { @@ -639,6 +667,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) } data << uint32(pQuest->ReqCreatureOrGOCount[iI]); data << uint32(pQuest->ReqSourceId[iI]); + data << uint32(0); // req source count? } for (iI = 0; iI < QUEST_ITEM_OBJECTIVES_COUNT; ++iI) @@ -674,12 +703,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; @@ -726,15 +755,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*Trinity::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 << int32(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(pQuest->RewRepFaction[i]); + + for(int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) // columnid in QuestFactionReward.dbc (zero based)? + data << int32(pQuest->RewRepValueId[i]); + + for(int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) // reward reputation override? + data << uint32(pQuest->RewRepValue[i]); + pSession->SendPacket( &data ); sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId() ); } |