129 TC_LOG_ERROR(
"sql.sql",
"Table `quest_details` has non-existing Emote{} ({}) set for quest {}. Skipped.", 1+i, fields[1+i].GetUInt16(), fields[0].GetUInt32());
146 TC_LOG_ERROR(
"sql.sql",
"Table `quest_request_items` has non-existing EmoteOnComplete ({}) set for quest {}.",
_emoteOnComplete, fields[0].GetUInt32());
149 TC_LOG_ERROR(
"sql.sql",
"Table `quest_request_items` has non-existing EmoteOnIncomplete ({}) set for quest {}.",
_emoteOnIncomplete, fields[0].GetUInt32());
162 TC_LOG_ERROR(
"sql.sql",
"Table `quest_offer_reward` has non-existing Emote{} ({}) set for quest {}. Skipped.", 1 + i, fields[1 + i].GetUInt16(), fields[0].GetUInt32());
213 int32 diffFactor = 2 * (quest_level - player->
GetLevel()) + 20;
216 else if (diffFactor > 10)
223 xp = std::max(minScaledXP, xp);
251 displayID = itemTemplate->GetDisplayId();
263 displayID = itemTemplate->GetDisplayId();
486 return response.
Move();
494 std::stringstream questTitlePretty;
495 questTitlePretty <<
"[" << level <<
"] " << title;
496 title = questTitlePretty.str();
502 return 5 * ((xp + 2) / 5);
504 return 10 * ((xp + 5) / 10);
506 return 25 * ((xp + 12) / 25);
508 return 50 * ((xp + 25) / 50);
@ RAID_DIFFICULTY_25MAN_HEROIC
@ RAID_DIFFICULTY_10MAN_NORMAL
@ RAID_DIFFICULTY_25MAN_NORMAL
@ RAID_DIFFICULTY_10MAN_HEROIC
DBCStorage< QuestXPEntry > sQuestXPStore(QuestXPfmt)
DBCStorage< TeamContributionPointsEntry > sTeamContributionPointsStore(TeamContributionPointsfmt)
DBCStorage< EmotesEntry > sEmotesStore(EmotesEntryfmt)
#define TC_LOG_ERROR(filterType__,...)
#define QUEST_ITEM_DROP_COUNT
#define QUEST_REWARD_ITEM_COUNT
#define QUEST_ITEM_OBJECTIVES_COUNT
#define QUEST_REWARD_REPUTATIONS_COUNT
#define QUEST_EMOTE_COUNT
#define QUEST_OBJECTIVES_COUNT
@ QUEST_FLAGS_NO_MONEY_FROM_XP
@ QUEST_FLAGS_HIDDEN_REWARDS
@ QUEST_FLAGS_AUTO_ACCEPT
@ QUEST_FLAGS_AUTOCOMPLETE
#define QUEST_REWARD_CHOICES_COUNT
@ QUEST_SPECIAL_FLAGS_AUTO_ACCEPT
Class used to access individual fields of database query result.
std::string GetString() const
std::string_view GetStringView() const
static std::string_view GetLocaleString(std::vector< std::string > const &data, LocaleConstant locale)
int32 GetQuestLevel(Quest const *quest) const
uint32 GetQuestXPReward(Quest const *quest)
uint32 _emoteOnIncomplete
int32 GetRewArenaPoints() const
std::string _areaDescription
int32 GetRepObjectiveValue() const
std::array< uint32, QUEST_OBJECTIVES_COUNT > RequiredNpcOrGoCount
std::array< int32, QUEST_REWARD_REPUTATIONS_COUNT > RewardFactionValue
uint32 GetRewMoneyMaxLevel() const
uint32 _requiredSkillPoints
uint32 GetRewTitle() const
WorldPacket BuildQueryData(LocaleConstant loc) const
int32 GetRepObjectiveValue2() const
std::string const & GetQuestCompletionLog() const
uint32 GetRepObjectiveFaction() const
uint32 GetXPReward(Player const *player) const
int32 _breadcrumbForQuestId
void LoadQuestDetails(Field *fields)
std::array< uint32, QUEST_REWARD_CHOICES_COUNT > RewardChoiceItemCount
uint32 _requiredFactionId2
uint32 _sourceItemIdCount
static void AddQuestLevelToTitle(std::string &title, int32 level)
static bool IsTakingQuestEnabled(uint32 questId)
uint32 GetRepObjectiveFaction2() const
Quest(Field *questRecord)
std::array< uint32, QUEST_REWARD_CHOICES_COUNT > RewardChoiceItemId
std::array< uint32, QUEST_EMOTE_COUNT > DetailsEmoteDelay
void LoadQuestRequestItems(Field *fields)
uint32 GetMinLevel() const
WorldPacket QueryData[TOTAL_LOCALES]
uint32 _requiredMinRepFaction
std::string _questDescription
std::array< uint32, QUEST_REWARD_ITEM_COUNT > RewardItemId
int32 _requiredMinRepValue
uint32 GetRewardReputationMask() const
uint32 _rewChoiceItemsCount
static uint32 RoundXPValue(uint32 xp)
std::array< uint32, QUEST_REWARD_ITEM_COUNT > RewardItemCount
uint32 GetPOIContinent() const
std::array< std::string, QUEST_OBJECTIVES_COUNT > ObjectiveText
void LoadQuestMailSender(Field *fields)
uint32 GetXPDifficulty() const
uint32 _rewardXPDifficulty
std::string _requestItemsText
int32 _requiredFactionValue2
uint32 GetRewDisplaySpell() const
bool IsRepeatable() const
int32 GetZoneOrSort() const
uint32 _emoteOnIncompleteDelay
int32 GetQuestLevel() const
bool IsAutoComplete() const
uint32 _rewardReputationMask
uint32 _requiredFactionId1
uint32 GetRewKillHonor() const
int32 _requiredMaxRepValue
uint32 GetPlayersSlain() const
void BuildQuestRewards(WorldPackets::Quest::QuestRewards &rewards, Player *player, bool sendHiddenRewards=false) const
std::array< uint32, QUEST_ITEM_OBJECTIVES_COUNT > RequiredItemId
uint32 CalculateHonorGain(uint8 level) const
std::string const & GetLogTitle() const
uint32 GetQuestType() const
uint32 _requiredMaxRepFaction
uint32 GetQuestId() const
std::string _logDescription
uint32 _reqCreatureOrGOcount
void LoadQuestOfferReward(Field *fields)
uint32 _requiredPlayerKills
std::array< uint32, QUEST_ITEM_DROP_COUNT > ItemDropQuantity
bool IsAutoAccept() const
uint32 GetQuestInfoID() const
bool IsRaidQuest(Difficulty difficulty) const
int32 GetRewSpell() const
uint32 _rewardDisplaySpell
uint32 _emoteOnCompleteDelay
int32 GetRewOrReqMoney(Player const *player=nullptr) const
std::string const & GetLogDescription() const
std::array< int32, QUEST_REWARD_REPUTATIONS_COUNT > RewardFactionOverride
void InitializeQueryData()
std::array< uint32, QUEST_EMOTE_COUNT > DetailsEmote
std::array< uint32, QUEST_REWARD_REPUTATIONS_COUNT > RewardFactionId
std::string const & GetAreaDescription() const
bool IsAllowedInRaid(Difficulty difficulty) const
uint32 GetRewHonor() const
uint32 GetSrcItemId() const
std::string _questCompletionLog
int32 _requiredFactionValue1
uint32 _rewardMailSenderEntry
std::string const & GetQuestDescription() const
std::array< uint32, QUEST_ITEM_OBJECTIVES_COUNT > RequiredItemCount
std::array< uint32, QUEST_ITEM_DROP_COUNT > ItemDrop
std::array< int32, QUEST_OBJECTIVES_COUNT > RequiredNpcOrGo
uint32 GetBonusTalents() const
bool HasFlag(QuestFlags flag) const
std::string _offerRewardText
uint32 _rewardMailTemplateId
std::array< uint32, QUEST_EMOTE_COUNT > OfferRewardEmoteDelay
uint32 GetPOIPriority() const
void LoadQuestTemplateAddon(Field *fields)
uint32 GetNextQuestInChain() const
bool CanIncreaseRewardedQuestCounters() const
uint32 GetSuggestedPlayers() const
std::array< uint32, QUEST_EMOTE_COUNT > OfferRewardEmote
WorldPacket const * Write() override
@ CONFIG_MIN_QUEST_SCALED_XP_RATIO
@ RATE_MONEY_MAX_LEVEL_QUEST
@ CONFIG_QUEST_IGNORE_AUTO_COMPLETE
@ CONFIG_QUEST_IGNORE_RAID
@ CONFIG_QUEST_IGNORE_AUTO_ACCEPT
uint32 RewardFactionID[QUEST_REWARD_REPUTATIONS_COUNT]
uint32 RequiredNpcOrGoCount[QUEST_OBJECTIVES_COUNT]
std::string QuestDescription
uint32 RewardDisplaySpell
std::string ObjectiveText[QUEST_OBJECTIVES_COUNT]
uint32 RewardItems[QUEST_REWARD_ITEM_COUNT]
int32 RewardFactionOverride[QUEST_REWARD_REPUTATIONS_COUNT]
uint32 RewardAmount[QUEST_REWARD_ITEM_COUNT]
uint32 RewardFactionFlags
std::string AreaDescription
uint32 RequiredItemCount[QUEST_ITEM_OBJECTIVES_COUNT]
int32 RequiredFactionValue[PVP_TEAMS_COUNT]
uint32 RequiredPlayerKills
uint32 ItemDropQuantity[QUEST_ITEM_DROP_COUNT]
std::string QuestCompletionLog
QuestInfoChoiceItem UnfilteredChoiceItems[QUEST_REWARD_CHOICES_COUNT]
std::string LogDescription
uint32 RewardXPDifficulty
uint32 RequiredItemId[QUEST_ITEM_OBJECTIVES_COUNT]
int32 RequiredNpcOrGo[QUEST_OBJECTIVES_COUNT]
uint32 RequiredFactionId[PVP_TEAMS_COUNT]
uint32 ItemDrop[QUEST_ITEM_DROP_COUNT]
int32 RewardFactionValue[QUEST_REWARD_REPUTATIONS_COUNT]
std::array< int32, QUEST_REWARD_REPUTATIONS_COUNT > RewardFactionOverride
std::vector< QuestChoiceItem > RewardItems
std::array< uint32, QUEST_REWARD_REPUTATIONS_COUNT > RewardFactionID
uint32 RewardDisplaySpell
std::vector< QuestChoiceItem > UnfilteredChoiceItems
std::array< int32, QUEST_REWARD_REPUTATIONS_COUNT > RewardFactionValue
uint32 RewardXPDifficulty