Core/Chat: Fix quest hyperlinks for quest level -1. Closes #25432.

This commit is contained in:
Treeston
2020-09-10 12:52:33 +02:00
parent 062c55f1ab
commit 08064f0487
2 changed files with 2 additions and 2 deletions

View File

@@ -162,7 +162,7 @@ bool Trinity::Hyperlinks::LinkTags::quest::StoreTo(QuestLinkData& val, std::stri
uint32 questId;
if (!t.TryConsumeTo(questId))
return false;
return (val.Quest = sObjectMgr->GetQuestTemplate(questId)) && t.TryConsumeTo(val.QuestLevel) && t.IsEmpty();
return (val.Quest = sObjectMgr->GetQuestTemplate(questId)) && t.TryConsumeTo(val.QuestLevel) && (val.QuestLevel >= -1) && t.IsEmpty();
}
bool Trinity::Hyperlinks::LinkTags::spell::StoreTo(SpellInfo const*& val, std::string_view text)

View File

@@ -70,7 +70,7 @@ namespace Trinity::Hyperlinks
struct QuestLinkData
{
::Quest const* Quest;
uint8 QuestLevel;
int8 QuestLevel;
};
struct TalentLinkData