diff options
author | MaxtorCoder <warsongkiller.s8@gmail.com> | 2024-03-13 21:16:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-13 21:16:18 +0100 |
commit | cfc9cc9ec285e7934f3160047ff87be3c649594f (patch) | |
tree | be680d4f88fac55274862251c349c644a5d90930 /src/server/game/Quests/QuestDef.cpp | |
parent | 46d929cb82b631648ef4a84e75ca7bc174a03fdd (diff) |
Core/PacketIO: Update to 4.4.0.53627 (#29805)
* Core/PacketIO: Update to 4.4.0.53627
* Core/IO: Remove duplicate declaration of PetSpellDataID
* Core/IO: Assign STATUS_UNHANDLED to some azerite packets
Diffstat (limited to 'src/server/game/Quests/QuestDef.cpp')
-rw-r--r-- | src/server/game/Quests/QuestDef.cpp | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index 17003ca274a..5e7a46641f6 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -619,19 +619,6 @@ WorldPacket Quest::BuildQueryData(LocaleConstant loc, Player* player) const response.Info.PortraitGiverName = GetPortraitGiverName(); response.Info.PortraitTurnInText = GetPortraitTurnInText(); response.Info.PortraitTurnInName = GetPortraitTurnInName(); - std::transform(GetConditionalQuestDescription().begin(), GetConditionalQuestDescription().end(), std::back_inserter(response.Info.ConditionalQuestDescription), [loc](QuestConditionalText const& text) - { - std::string_view content = text.Text[LOCALE_enUS]; - ObjectMgr::GetLocaleString(text.Text, loc, content); - return WorldPackets::Quest::ConditionalQuestText { text.PlayerConditionId, text.QuestgiverCreatureId, content }; - }); - - std::transform(GetConditionalQuestCompletionLog().begin(), GetConditionalQuestCompletionLog().end(), std::back_inserter(response.Info.ConditionalQuestCompletionLog), [loc](QuestConditionalText const& text) - { - std::string_view content = text.Text[LOCALE_enUS]; - ObjectMgr::GetLocaleString(text.Text, loc, content); - return WorldPackets::Quest::ConditionalQuestText { text.PlayerConditionId, text.QuestgiverCreatureId, content }; - }); if (loc != LOCALE_enUS) { @@ -651,7 +638,6 @@ WorldPacket Quest::BuildQueryData(LocaleConstant loc, Player* player) const response.Info.QuestID = GetQuestId(); response.Info.QuestType = GetQuestType(); - response.Info.ContentTuningID = GetContentTuningId(); response.Info.QuestPackageID = GetQuestPackageID(); response.Info.QuestSortID = GetZoneOrSort(); response.Info.QuestInfoID = GetQuestInfoID(); @@ -666,12 +652,13 @@ WorldPacket Quest::BuildQueryData(LocaleConstant loc, Player* player) const response.Info.RewardMoneyDifficulty = GetRewMoneyDifficulty(); response.Info.RewardMoneyMultiplier = GetMoneyMultiplier(); response.Info.RewardBonusMoney = GetRewMoneyMaxLevel(); - for (QuestRewardDisplaySpell displaySpell : RewardDisplaySpell) + + for (uint8 i = 0; i < QUEST_REWARD_DISPLAY_SPELL_COUNT; ++i) { - WorldPackets::Quest::QuestCompleteDisplaySpell& rewardDisplaySpell = response.Info.RewardDisplaySpell.emplace_back(); - rewardDisplaySpell.SpellID = displaySpell.SpellId; - rewardDisplaySpell.PlayerConditionID = displaySpell.PlayerConditionId; - rewardDisplaySpell.Type = int32(displaySpell.Type); + if (RewardDisplaySpell.empty() || RewardDisplaySpell.size() < i) + continue; + + response.Info.RewardDisplaySpell[i] = RewardDisplaySpell[i].SpellId; } response.Info.RewardSpell = GetRewSpell(); |