aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-03-16 01:27:13 -0300
committerfunjoker <funjoker109@gmail.com>2020-04-24 17:18:48 +0200
commitc03373c59fd4103096936a19d8dd668959620a29 (patch)
treeb7644162a566fd40b81e0a79b2f82e9deead0d0d /src
parentfeb8205d6a78549b60ac8c0c2e394fdcb8e33cc8 (diff)
Core/Quests: changed quest_template_addon.NextQuestID to unsigned
- No reason to keep this anymore after 4349adf0f25210e5b26201523a09bc26b4a83394, this is a broken functionality. (cherry picked from commit dca276716fecb819fec668f59954113a77f9e393)
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;