Core/Quests: changed quest_template_addon.NextQuestID to unsigned

- No reason to keep this anymore after 4349adf0f2, this is a broken functionality.

(cherry picked from commit dca276716f)
This commit is contained in:
ariel-
2017-03-16 01:27:13 -03:00
committed by funjoker
parent feb8205d6a
commit c03373c59f
4 changed files with 11 additions and 9 deletions

View File

@@ -0,0 +1,5 @@
UPDATE `quest_template_addon` SET `NextQuestID`='12225' WHERE `ID` IN (12222, 12223);
UPDATE `quest_template_addon` SET `NextQuestID`='0' WHERE `ID`=8554;
UPDATE `quest_template_addon` SET `NextQuestID`='0' WHERE `ID`=618;
UPDATE `quest_template_addon` SET `NextQuestID`='0' WHERE `ID`=415;
ALTER TABLE `quest_template_addon` CHANGE `NextQuestID` `NextQuestID` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0;

View File

@@ -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)

View File

@@ -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();

View File

@@ -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;