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 3971062fe57..2c05f4662c3 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -4623,14 +4623,11 @@ void ObjectMgr::LoadQuests()
if (qinfo->_nextQuestID)
{
- QuestMap::iterator qNextItr = _questTemplates.find(abs(qinfo->GetNextQuestId()));
+ auto qNextItr = _questTemplates.find(qinfo->GetNextQuestId());
if (qNextItr == _questTemplates.end())
- TC_LOG_ERROR("sql.sql", "Quest %d has NextQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetNextQuestId());
+ TC_LOG_ERROR("sql.sql", "Quest %d 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 115c72c83d2..28685dc58ec 100644
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -191,7 +191,7 @@ void Quest::LoadQuestTemplateAddon(Field* fields)
_allowableClasses = 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 04ee9468b72..8157f647627 100644
--- a/src/server/game/Quests/QuestDef.h
+++ b/src/server/game/Quests/QuestDef.h
@@ -387,7 +387,7 @@ class TC_GAME_API Quest
uint32 GetSuggestedPlayers() const { return _suggestedPlayers; }
uint32 GetLimitTime() const { return _limitTime; }
int32 GetPrevQuestId() const { return _prevQuestID; }
- int32 GetNextQuestId() const { return _nextQuestID; }
+ uint32 GetNextQuestId() const { return _nextQuestID; }
int32 GetExclusiveGroup() const { return _exclusiveGroup; }
uint32 GetNextQuestInChain() const { return _nextQuestInChain; }
int32 GetRewArenaPoints() const {return _rewardArenaPoints; }
@@ -580,7 +580,7 @@ class TC_GAME_API Quest
uint32 _allowableClasses = 0;
uint32 _sourceSpellID = 0;
int32 _prevQuestID = 0;
- int32 _nextQuestID = 0;
+ uint32 _nextQuestID = 0;
int32 _exclusiveGroup = 0;
uint32 _rewardMailTemplateId = 0;
uint32 _rewardMailDelay = 0;