Core/Quests: Fixed index typos and added some missing data to quest query packet
This commit is contained in:
@@ -453,6 +453,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
|
||||
std::string questLogTitle = quest->GetLogTitle();
|
||||
std::string questLogDescription = quest->GetLogDescription();
|
||||
std::string questDescription = quest->GetQuestDescription();
|
||||
std::string areaDescription = quest->GetAreaDescription();
|
||||
std::string questCompletionLog = quest->GetQuestCompletionLog();
|
||||
std::string portraitGiverText = quest->GetPortraitGiverText();
|
||||
std::string portraitGiverName = quest->GetPortraitGiverName();
|
||||
@@ -473,6 +474,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
|
||||
ObjectMgr::GetLocaleString(localeData->LogTitle, locale, questLogTitle);
|
||||
ObjectMgr::GetLocaleString(localeData->LogDescription, locale, questLogDescription);
|
||||
ObjectMgr::GetLocaleString(localeData->QuestDescription, locale, questDescription);
|
||||
ObjectMgr::GetLocaleString(localeData->AreaDescription, locale, areaDescription);
|
||||
ObjectMgr::GetLocaleString(localeData->QuestCompletionLog, locale, questCompletionLog);
|
||||
ObjectMgr::GetLocaleString(localeData->PortraitGiverText, locale, portraitGiverText);
|
||||
ObjectMgr::GetLocaleString(localeData->PortraitGiverName, locale, portraitGiverName);
|
||||
@@ -499,6 +501,8 @@ void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
|
||||
packet.Info.SuggestedGroupNum = quest->GetSuggestedPlayers();
|
||||
packet.Info.RewardNextQuest = quest->GetNextQuestInChain();
|
||||
packet.Info.RewardXPDifficulty = quest->GetXPDifficulty();
|
||||
packet.Info.Float10 = quest->Float10; // Unk
|
||||
packet.Info.Float13 = quest->Float13; // Unk
|
||||
|
||||
if (quest->HasFlag(QUEST_FLAGS_HIDDEN_REWARDS))
|
||||
packet.Info.RewardMoney = quest->GetRewMoney();
|
||||
@@ -555,7 +559,9 @@ void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
|
||||
packet.Info.LogTitle = questLogTitle;
|
||||
packet.Info.LogDescription = questLogDescription;
|
||||
packet.Info.QuestDescription = questDescription;
|
||||
packet.Info.AreaDescription = areaDescription;
|
||||
packet.Info.QuestCompletionLog = questCompletionLog;
|
||||
packet.Info.AllowableRaces = quest->GetAllowableRaces();
|
||||
|
||||
for (uint32 i = 0; i < quest->Objectives.size(); ++i)
|
||||
{
|
||||
|
||||
@@ -15816,7 +15816,7 @@ void Player::ItemAddedQuestCheck(uint32 entry, uint32 count)
|
||||
|
||||
for (uint8 j = 0; j < qInfo->Objectives.size(); ++j)
|
||||
{
|
||||
if (qInfo->Objectives[i].Type != QUEST_OBJECTIVE_ITEM)
|
||||
if (qInfo->Objectives[j].Type != QUEST_OBJECTIVE_ITEM)
|
||||
continue;
|
||||
|
||||
uint32 reqItem = qInfo->Objectives[j].ObjectID;
|
||||
@@ -15860,7 +15860,7 @@ void Player::ItemRemovedQuestCheck(uint32 entry, uint32 count)
|
||||
|
||||
for (uint8 j = 0; j < qInfo->Objectives.size(); ++j)
|
||||
{
|
||||
if (qInfo->Objectives[i].Type != QUEST_OBJECTIVE_ITEM)
|
||||
if (qInfo->Objectives[j].Type != QUEST_OBJECTIVE_ITEM)
|
||||
continue;
|
||||
|
||||
uint32 reqItem = qInfo->Objectives[j].ObjectID;
|
||||
@@ -16212,7 +16212,7 @@ bool Player::HasQuestForItem(uint32 itemid) const
|
||||
// This part for ReqItem drop
|
||||
for (uint8 j = 0; j < qInfo->Objectives.size(); ++j)
|
||||
{
|
||||
if (qInfo->Objectives[i].Type == QUEST_OBJECTIVE_ITEM && itemid == uint32(qInfo->Objectives[i].ObjectID) && q_status.ObjectiveData[j] < qInfo->Objectives[j].Amount)
|
||||
if (qInfo->Objectives[j].Type == QUEST_OBJECTIVE_ITEM && itemid == uint32(qInfo->Objectives[j].ObjectID) && q_status.ObjectiveData[j] < qInfo->Objectives[j].Amount)
|
||||
return true;
|
||||
}
|
||||
// This part - for ReqSource
|
||||
|
||||
@@ -4313,7 +4313,7 @@ void ObjectMgr::LoadQuestLocales()
|
||||
AddLocaleString(fields[1 + 15 * (i - 1) + 2].GetString(), locale, data.QuestDescription);
|
||||
AddLocaleString(fields[1 + 15 * (i - 1) + 3].GetString(), locale, data.OfferRewardText);
|
||||
AddLocaleString(fields[1 + 15 * (i - 1) + 4].GetString(), locale, data.RequestItemsText);
|
||||
//AddLocaleString(fields[1 + 15 * (i - 1) + 5].GetString(), locale, data.EndText); Probably deprecated
|
||||
AddLocaleString(fields[1 + 15 * (i - 1) + 5].GetString(), locale, data.AreaDescription);
|
||||
AddLocaleString(fields[1 + 15 * (i - 1) + 6].GetString(), locale, data.QuestCompletionLog);
|
||||
|
||||
data.ObjectiveDescription.resize(4);
|
||||
|
||||
@@ -207,6 +207,7 @@ struct QuestLocale
|
||||
StringVector LogTitle;
|
||||
StringVector LogDescription;
|
||||
StringVector QuestDescription;
|
||||
StringVector AreaDescription;
|
||||
StringVector OfferRewardText;
|
||||
StringVector RequestItemsText;
|
||||
StringVector QuestCompletionLog;
|
||||
@@ -291,6 +292,7 @@ class Quest
|
||||
std::string const& GetLogTitle() const { return LogTitle; }
|
||||
std::string const& GetLogDescription() const { return LogDescription; }
|
||||
std::string const& GetQuestDescription() const { return QuestDescription; }
|
||||
std::string const& GetAreaDescription() const { return AreaDescription; }
|
||||
std::string const& GetOfferRewardText() const { return OfferRewardText; }
|
||||
std::string const& GetRequestItemsText() const { return RequestItemsText; }
|
||||
std::string const& GetQuestCompletionLog() const { return QuestCompletionLog; }
|
||||
|
||||
@@ -72,10 +72,10 @@ WorldPacket const* WorldPackets::Quest::QueryQuestInfoResponse::Write()
|
||||
_worldPacket << Info.SuggestedGroupNum;
|
||||
_worldPacket << Info.RewardNextQuest;
|
||||
_worldPacket << Info.RewardXPDifficulty;
|
||||
_worldPacket << float(1.0f); // Unk Float10
|
||||
_worldPacket << Info.Float10; // Unk
|
||||
_worldPacket << Info.RewardMoney;
|
||||
_worldPacket << Info.RewardMoneyDifficulty;
|
||||
_worldPacket << float(1.0f); // Unk Float13
|
||||
_worldPacket << Info.Float13; // Unk
|
||||
_worldPacket << Info.RewardBonusMoney;
|
||||
_worldPacket << Info.RewardDisplaySpell;
|
||||
_worldPacket << Info.RewardSpell;
|
||||
@@ -136,7 +136,7 @@ WorldPacket const* WorldPackets::Quest::QueryQuestInfoResponse::Write()
|
||||
_worldPacket << Info.TimeAllowed;
|
||||
|
||||
_worldPacket << int32(Info.Objectives.size());
|
||||
_worldPacket << int32(-1); // Unk Int2950
|
||||
_worldPacket << int32(Info.AllowableRaces);
|
||||
|
||||
for (uint32 i = 0; i < Info.Objectives.size(); ++i)
|
||||
{
|
||||
|
||||
@@ -162,6 +162,11 @@ namespace WorldPackets
|
||||
int32 RewardFactionOverride[QUEST_REWARD_REPUTATIONS_COUNT] = {};
|
||||
int32 RewardCurrencyID[QUEST_REWARD_CURRENCY_COUNT] = {};
|
||||
int32 RewardCurrencyQty[QUEST_REWARD_CURRENCY_COUNT] = {};
|
||||
|
||||
// Non JAM data
|
||||
float Float10 = 1.0f;
|
||||
float Float13 = 1.0f;
|
||||
int32 AllowableRaces = -1;
|
||||
};
|
||||
|
||||
class QueryQuestInfoResponse final : public ServerPacket
|
||||
|
||||
Reference in New Issue
Block a user