fix(quest): fix some quest chains + align NextQuestID with TC (#1351)
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1548367133880932410');
|
||||||
|
|
||||||
|
-- original fix by Killyana
|
||||||
|
UPDATE `quest_template_addon` SET `NextQuestID`=0 WHERE `id` IN (415, 618, 8554);
|
||||||
|
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 19 AND `SourceEntry`= 619;
|
||||||
|
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||||
|
(19, 0, 619, 0, 0, 9, 0, 618, 0, 0, 0, 0, 0, '', "Enticing Negolash"),
|
||||||
|
(19, 0, 619, 0, 1, 9, 0, 8554, 0, 0, 0, 0, 0, '', "Enticing Negolash");
|
||||||
|
UPDATE `quest_template_addon` SET `PrevQuestID`=12294, `NextQuestID`=12225, `ExclusiveGroup`=-12222 WHERE `id` IN (12222);
|
||||||
|
UPDATE `quest_template_addon` SET `PrevQuestID`=12294, `NextQuestID`=12225, `ExclusiveGroup`=-12222 WHERE `id` IN (12223);
|
||||||
|
|
||||||
|
-- original fix by ariel-
|
||||||
|
ALTER TABLE `quest_template_addon` CHANGE `NextQuestID` `NextQuestID` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0;
|
||||||
@@ -4528,16 +4528,13 @@ void ObjectMgr::LoadQuests()
|
|||||||
|
|
||||||
if (qinfo->NextQuestId)
|
if (qinfo->NextQuestId)
|
||||||
{
|
{
|
||||||
QuestMap::iterator qNextItr = _questTemplates.find(abs(qinfo->GetNextQuestId()));
|
QuestMap::iterator qNextItr = _questTemplates.find(qinfo->GetNextQuestId());
|
||||||
if (qNextItr == _questTemplates.end())
|
if (qNextItr == _questTemplates.end())
|
||||||
{
|
{
|
||||||
sLog->outErrorDb("Quest %d has NextQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetNextQuestId());
|
sLog->outErrorDb("Quest %d has NextQuestId %u, but no such quest", qinfo->GetQuestId(), qinfo->GetNextQuestId());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
qNextItr->second->prevQuests.push_back(static_cast<int32>(qinfo->GetQuestId()));
|
||||||
int32 signedQuestId = qinfo->NextQuestId < 0 ? -int32(qinfo->GetQuestId()) : int32(qinfo->GetQuestId());
|
|
||||||
qNextItr->second->prevQuests.push_back(signedQuestId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qinfo->ExclusiveGroup)
|
if (qinfo->ExclusiveGroup)
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ void Quest::LoadQuestTemplateAddon(Field* fields)
|
|||||||
RequiredClasses = fields[2].GetUInt32();
|
RequiredClasses = fields[2].GetUInt32();
|
||||||
SourceSpellid = fields[3].GetUInt32();
|
SourceSpellid = fields[3].GetUInt32();
|
||||||
PrevQuestId = fields[4].GetInt32();
|
PrevQuestId = fields[4].GetInt32();
|
||||||
NextQuestId = fields[5].GetInt32();
|
NextQuestId = fields[5].GetUInt32();
|
||||||
ExclusiveGroup = fields[6].GetInt32();
|
ExclusiveGroup = fields[6].GetInt32();
|
||||||
RewardMailTemplateId = fields[7].GetUInt32();
|
RewardMailTemplateId = fields[7].GetUInt32();
|
||||||
RewardMailDelay = fields[8].GetUInt32();
|
RewardMailDelay = fields[8].GetUInt32();
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ class Quest
|
|||||||
uint32 GetSuggestedPlayers() const { return SuggestedPlayers; }
|
uint32 GetSuggestedPlayers() const { return SuggestedPlayers; }
|
||||||
uint32 GetTimeAllowed() const { return TimeAllowed; }
|
uint32 GetTimeAllowed() const { return TimeAllowed; }
|
||||||
int32 GetPrevQuestId() const { return PrevQuestId; }
|
int32 GetPrevQuestId() const { return PrevQuestId; }
|
||||||
int32 GetNextQuestId() const { return NextQuestId; }
|
uint32 GetNextQuestId() const { return NextQuestId; }
|
||||||
int32 GetExclusiveGroup() const { return ExclusiveGroup; }
|
int32 GetExclusiveGroup() const { return ExclusiveGroup; }
|
||||||
uint32 GetNextQuestInChain() const { return RewardNextQuest; }
|
uint32 GetNextQuestInChain() const { return RewardNextQuest; }
|
||||||
uint32 GetCharTitleId() const { return RewardTitleId; }
|
uint32 GetCharTitleId() const { return RewardTitleId; }
|
||||||
@@ -371,7 +371,7 @@ class Quest
|
|||||||
uint32 RequiredClasses = 0;
|
uint32 RequiredClasses = 0;
|
||||||
uint32 SourceSpellid = 0;
|
uint32 SourceSpellid = 0;
|
||||||
int32 PrevQuestId = 0;
|
int32 PrevQuestId = 0;
|
||||||
int32 NextQuestId = 0;
|
uint32 NextQuestId = 0;
|
||||||
int32 ExclusiveGroup = 0;
|
int32 ExclusiveGroup = 0;
|
||||||
uint32 RewardMailTemplateId = 0;
|
uint32 RewardMailTemplateId = 0;
|
||||||
uint32 RewardMailDelay = 0;
|
uint32 RewardMailDelay = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user