diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-03-16 00:40:27 -0300 |
---|---|---|
committer | funjoker <funjoker109@gmail.com> | 2020-04-24 17:18:48 +0200 |
commit | feb8205d6a78549b60ac8c0c2e394fdcb8e33cc8 (patch) | |
tree | 1b6464d7146c549a8111c1a99929738769e9174f /src/server/game/Quests/QuestDef.cpp | |
parent | 4472a3cbf366f11b1c0d0eaa782e045c95f0254b (diff) |
Core/Globals: some changes in quest loading
- Made load/reload associated quest tables data-driven, so removed a bunch of similar looking code from ObjectMgr (yay!)
- Codestyle and encapsulation for ExclusiveQuestGroups
(cherry picked from commit 076293f1f269b8f681c97f23872915bdfeccef1d)
Diffstat (limited to 'src/server/game/Quests/QuestDef.cpp')
-rw-r--r-- | src/server/game/Quests/QuestDef.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index 48f057bbd3f..115c72c83d2 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -202,19 +202,23 @@ void Quest::LoadQuestTemplateAddon(Field* fields) _requiredMinRepValue = fields[13].GetInt32(); _requiredMaxRepValue = fields[14].GetInt32(); _sourceItemIdCount = fields[15].GetUInt8(); - _rewardMailSenderEntry = fields[16].GetUInt32(); - _specialFlags = fields[17].GetUInt8(); - _scriptId = sObjectMgr->GetScriptId(fields[18].GetString()); + _specialFlags = fields[16].GetUInt8(); + _scriptId = sObjectMgr->GetScriptId(fields[17].GetString()); if (_specialFlags & QUEST_SPECIAL_FLAGS_AUTO_ACCEPT) _flags |= QUEST_FLAGS_AUTO_ACCEPT; } +void Quest::LoadQuestMailSender(Field* fields) +{ + _rewardMailSenderEntry = fields[1].GetUInt32(); +} + void Quest::LoadQuestObjective(Field* fields) { QuestObjective obj; - obj.ID = fields[0].GetUInt32(); - obj.QuestID = fields[1].GetUInt32(); + obj.QuestID = fields[0].GetUInt32(); + obj.ID = fields[1].GetUInt32(); obj.Type = fields[2].GetUInt8(); obj.StorageIndex = fields[3].GetInt8(); obj.ObjectID = fields[4].GetInt32(); |