aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp9
-rw-r--r--src/server/game/Quests/QuestDef.cpp2
-rw-r--r--src/server/game/Quests/QuestDef.h4
3 files changed, 6 insertions, 9 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 1af3306d211..f7646a46ccc 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -4588,14 +4588,11 @@ void ObjectMgr::LoadQuests()
if (qinfo->_nextQuestId)
{
- auto qNextItr = _questTemplates.find(std::abs(qinfo->GetNextQuestId()));
+ auto qNextItr = _questTemplates.find(qinfo->GetNextQuestId());
if (qNextItr == _questTemplates.end())
- TC_LOG_ERROR("sql.sql", "Quest %u has NextQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetNextQuestId());
+ TC_LOG_ERROR("sql.sql", "Quest %u has NextQuestId %u, but no such quest", qinfo->GetQuestId(), qinfo->GetNextQuestId());
else
- {
- int32 signedQuestId = qinfo->_nextQuestId < 0 ? -int32(qinfo->GetQuestId()) : int32(qinfo->GetQuestId());
- qNextItr->second->PrevQuests.push_back(signedQuestId);
- }
+ qNextItr->second->PrevQuests.push_back(static_cast<int32>(qinfo->GetQuestId()));
}
if (qinfo->_exclusiveGroup)
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index 69944c3a64c..44ba68bcfb3 100644
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -174,7 +174,7 @@ void Quest::LoadQuestTemplateAddon(Field* fields)
_requiredClasses = fields[2].GetUInt32();
_sourceSpellid = fields[3].GetUInt32();
_prevQuestId = fields[4].GetInt32();
- _nextQuestId = fields[5].GetInt32();
+ _nextQuestId = fields[5].GetUInt32();
_exclusiveGroup = fields[6].GetInt32();
_rewardMailTemplateId = fields[7].GetUInt32();
_rewardMailDelay = fields[8].GetUInt32();
diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h
index eb2c0aac985..5647bb0f997 100644
--- a/src/server/game/Quests/QuestDef.h
+++ b/src/server/game/Quests/QuestDef.h
@@ -233,7 +233,7 @@ class TC_GAME_API Quest
uint32 GetSuggestedPlayers() const { return _suggestedPlayers; }
uint32 GetTimeAllowed() const { return _timeAllowed; }
int32 GetPrevQuestId() const { return _prevQuestId; }
- int32 GetNextQuestId() const { return _nextQuestId; }
+ uint32 GetNextQuestId() const { return _nextQuestId; }
int32 GetExclusiveGroup() const { return _exclusiveGroup; }
uint32 GetNextQuestInChain() const { return _rewardNextQuest; }
uint32 GetCharTitleId() const { return _rewardTitleId; }
@@ -374,7 +374,7 @@ class TC_GAME_API Quest
uint32 _requiredClasses = 0;
uint32 _sourceSpellid = 0;
int32 _prevQuestId = 0;
- int32 _nextQuestId = 0;
+ uint32 _nextQuestId = 0;
int32 _exclusiveGroup = 0;
uint32 _rewardMailTemplateId = 0;
uint32 _rewardMailDelay = 0;