mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 11:21:58 +01:00
Core/Quest: Fix repeatable quest mark (#23338)
# Conflicts: # src/server/game/Entities/Player/Player.cpp
This commit is contained in:
committed by
Ovahlord
parent
3cd1fa44ef
commit
662ccb533b
@@ -224,8 +224,8 @@ void PlayerMenu::SendGossipMenu(uint32 titleTextId, ObjectGuid objectGUID)
|
||||
data << uint32(questID);
|
||||
data << uint32(item.QuestIcon);
|
||||
data << int32(quest->GetQuestLevel());
|
||||
data << uint32(quest->GetFlags()); // 3.3.3 quest flags
|
||||
data << uint8(0); // 3.3.3 changes icon: blue question or yellow exclamation
|
||||
data << uint32(quest->GetFlags()); // 3.3.3 quest flags
|
||||
data << uint8(quest->IsRepeatable() && !quest->IsDailyOrWeekly() && !quest->IsMonthly()); // 3.3.3 icon changes: blue question mark or yellow exclamation mark
|
||||
std::string title = quest->GetTitle();
|
||||
|
||||
LocaleConstant localeConstant = _session->GetSessionDbLocaleIndex();
|
||||
@@ -375,8 +375,8 @@ void PlayerMenu::SendQuestGiverQuestList(QEmote const& eEmote, const std::string
|
||||
data << uint32(questID);
|
||||
data << uint32(questMenuItem.QuestIcon);
|
||||
data << int32(quest->GetQuestLevel());
|
||||
data << uint32(quest->GetFlags()); // 3.3.3 quest flags
|
||||
data << uint8(0); // 3.3.3 changes icon: blue question or yellow exclamation
|
||||
data << uint32(quest->GetFlags()); // 3.3.3 quest flags
|
||||
data << uint8(quest->IsRepeatable() && !quest->IsDailyOrWeekly() && !quest->IsMonthly()); // 3.3.3 icon changes: blue question mark or yellow exclamation mark
|
||||
data << title;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14735,7 +14735,9 @@ void Player::PrepareQuestMenu(ObjectGuid guid)
|
||||
if (!CanTakeQuest(quest, false))
|
||||
continue;
|
||||
|
||||
if (quest->IsAutoComplete())
|
||||
if (quest->IsAutoComplete() && (!quest->IsRepeatable() || quest->IsDaily() || quest->IsWeekly() || quest->IsMonthly()))
|
||||
qm.AddMenuItem(quest_id, 0);
|
||||
else if (quest->IsAutoComplete())
|
||||
qm.AddMenuItem(quest_id, 4);
|
||||
else if (GetQuestStatus(quest_id) == QUEST_STATUS_NONE)
|
||||
qm.AddMenuItem(quest_id, 2);
|
||||
@@ -16326,12 +16328,40 @@ QuestGiverStatus Player::GetQuestDialogStatus(Object* questgiver)
|
||||
if (SatisfyQuestLevel(quest, false))
|
||||
{
|
||||
if (getLevel() <= (GetQuestLevel(quest) + sWorld->getIntConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF)))
|
||||
bool isNotLowLevelQuest = GetLevel() <= (GetQuestLevel(quest) + sWorld->getIntConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF));
|
||||
if (quest->IsRepeatable())
|
||||
{
|
||||
if (quest->IsDaily())
|
||||
result2 = DIALOG_STATUS_AVAILABLE_REP;
|
||||
{
|
||||
if (isNotLowLevelQuest)
|
||||
result2 = DIALOG_STATUS_AVAILABLE_REP;
|
||||
else
|
||||
result2 = DIALOG_STATUS_LOW_LEVEL_AVAILABLE_REP;
|
||||
}
|
||||
else if (quest->IsWeekly() || quest->IsMonthly())
|
||||
{
|
||||
if (isNotLowLevelQuest)
|
||||
result2 = DIALOG_STATUS_AVAILABLE;
|
||||
else
|
||||
result2 = DIALOG_STATUS_LOW_LEVEL_AVAILABLE;
|
||||
}
|
||||
else if (quest->IsAutoComplete())
|
||||
{
|
||||
if (isNotLowLevelQuest)
|
||||
result2 = DIALOG_STATUS_REWARD_REP;
|
||||
else
|
||||
result2 = DIALOG_STATUS_LOW_LEVEL_REWARD_REP;
|
||||
}
|
||||
else
|
||||
result2 = DIALOG_STATUS_AVAILABLE;
|
||||
{
|
||||
if (isNotLowLevelQuest)
|
||||
result2 = DIALOG_STATUS_AVAILABLE;
|
||||
else
|
||||
result2 = DIALOG_STATUS_LOW_LEVEL_AVAILABLE;
|
||||
}
|
||||
}
|
||||
else if (isNotLowLevelQuest)
|
||||
result2 = DIALOG_STATUS_AVAILABLE;
|
||||
else
|
||||
result2 = DIALOG_STATUS_LOW_LEVEL_AVAILABLE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user