diff options
author | ShinDarth <borzifrancesco@gmail.com> | 2015-08-29 17:16:51 +0200 |
---|---|---|
committer | ShinDarth <borzifrancesco@gmail.com> | 2015-08-29 17:27:03 +0200 |
commit | bc67016e7bfe8ffcd7220897c44e4d49d1392834 (patch) | |
tree | 09a402bb2b5a561303c36a8d05947e38a43120ce /src/server/game/Quests/QuestDef.cpp | |
parent | f2aa95c3503fe936f08d9fcc3c7f76f8bfcd8b36 (diff) |
DB/World schema backport: sort quest_template fields 6.x style
Diffstat (limited to 'src/server/game/Quests/QuestDef.cpp')
-rw-r--r-- | src/server/game/Quests/QuestDef.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index d1dcfd0f693..4582c93b673 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -51,25 +51,23 @@ Quest::Quest(Field* questRecord) RewardArenaPoints = questRecord[26].GetUInt16(); for (int i = 0; i < QUEST_REWARDS_COUNT; ++i) - RewardItemId[i] = questRecord[27+i].GetUInt32(); - - for (int i = 0; i < QUEST_REWARDS_COUNT; ++i) - RewardItemIdCount[i] = questRecord[31+i].GetUInt16(); - - for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i) - RewardChoiceItemId[i] = questRecord[35+i].GetUInt32(); + { + RewardItemId[i] = questRecord[27+i*2].GetUInt32(); + RewardItemIdCount[i] = questRecord[28+i*2].GetUInt16(); + } for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i) - RewardChoiceItemCount[i] = questRecord[41+i].GetUInt16(); - - for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) - RewardFactionId[i] = questRecord[47+i].GetUInt16(); - - for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) - RewardFactionValueId[i] = questRecord[52+i].GetInt32(); + { + RewardChoiceItemId[i] = questRecord[35+i*2].GetUInt32(); + RewardChoiceItemCount[i] = questRecord[36+i*2].GetUInt16(); + } for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) - RewardFactionValueIdOverride[i] = questRecord[57+i].GetInt32(); + { + RewardFactionId[i] = questRecord[47+i*3].GetUInt16(); + RewardFactionValueId[i] = questRecord[48+i*3].GetInt32(); + RewardFactionValueIdOverride[i] = questRecord[49+i*3].GetInt32(); + } PointMapId = questRecord[62].GetUInt16(); PointX = questRecord[63].GetFloat(); |