* Add support for sending quest completion text

* Original patch by NoFantasy - thank you
* Ported to Trinity by seirgy - thank you
* Closes issue #873

--HG--
branch : trunk
This commit is contained in:
Brian
2010-03-02 09:59:59 -07:00
parent 0f4855d8f3
commit 29666451f3
7 changed files with 108 additions and 70 deletions
+8
View File
@@ -0,0 +1,8 @@
ALTER TABLE locales_quest ADD COLUMN CompletedText_loc1 text AFTER EndText_loc8;
ALTER TABLE locales_quest ADD COLUMN CompletedText_loc2 text AFTER CompletedText_loc1;
ALTER TABLE locales_quest ADD COLUMN CompletedText_loc3 text AFTER CompletedText_loc2;
ALTER TABLE locales_quest ADD COLUMN CompletedText_loc4 text AFTER CompletedText_loc3;
ALTER TABLE locales_quest ADD COLUMN CompletedText_loc5 text AFTER CompletedText_loc4;
ALTER TABLE locales_quest ADD COLUMN CompletedText_loc6 text AFTER CompletedText_loc5;
ALTER TABLE locales_quest ADD COLUMN CompletedText_loc7 text AFTER CompletedText_loc6;
ALTER TABLE locales_quest ADD COLUMN CompletedText_loc8 text AFTER CompletedText_loc7;
@@ -0,0 +1 @@
ALTER TABLE quest_template CHANGE CompletionText CompletedText TEXT NULL DEFAULT NULL;
+9 -1
View File
@@ -3353,6 +3353,14 @@ CREATE TABLE `locales_quest` (
`EndText_loc6` text, `EndText_loc6` text,
`EndText_loc7` text, `EndText_loc7` text,
`EndText_loc8` text, `EndText_loc8` text,
`CompletedText_loc1` text,
`CompletedText_loc2` text,
`CompletedText_loc3` text,
`CompletedText_loc4` text,
`CompletedText_loc5` text,
`CompletedText_loc6` text,
`CompletedText_loc7` text,
`CompletedText_loc8` text,
`ObjectiveText1_loc1` text, `ObjectiveText1_loc1` text,
`ObjectiveText1_loc2` text, `ObjectiveText1_loc2` text,
`ObjectiveText1_loc3` text, `ObjectiveText1_loc3` text,
@@ -4392,7 +4400,7 @@ CREATE TABLE `quest_template` (
`OfferRewardText` text DEFAULT NULL, `OfferRewardText` text DEFAULT NULL,
`RequestItemsText` text DEFAULT NULL, `RequestItemsText` text DEFAULT NULL,
`EndText` text DEFAULT NULL, `EndText` text DEFAULT NULL,
`CompletionText` text DEFAULT NULL, `CompletedText` text DEFAULT NULL,
`ObjectiveText1` text DEFAULT NULL, `ObjectiveText1` text DEFAULT NULL,
`ObjectiveText2` text DEFAULT NULL, `ObjectiveText2` text DEFAULT NULL,
`ObjectiveText3` text DEFAULT NULL, `ObjectiveText3` text DEFAULT NULL,
+5 -2
View File
@@ -541,12 +541,13 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
{ {
std::string Title,Details,Objectives,EndText; std::string Title, Details, Objectives, EndText, CompletedText;
std::string ObjectiveText[QUEST_OBJECTIVES_COUNT]; std::string ObjectiveText[QUEST_OBJECTIVES_COUNT];
Title = pQuest->GetTitle(); Title = pQuest->GetTitle();
Details = pQuest->GetDetails(); Details = pQuest->GetDetails();
Objectives = pQuest->GetObjectives(); Objectives = pQuest->GetObjectives();
EndText = pQuest->GetEndText(); EndText = pQuest->GetEndText();
CompletedText = pQuest->GetCompletedText();
for (int i=0; i<QUEST_OBJECTIVES_COUNT; ++i) for (int i=0; i<QUEST_OBJECTIVES_COUNT; ++i)
ObjectiveText[i]=pQuest->ObjectiveText[i]; ObjectiveText[i]=pQuest->ObjectiveText[i];
@@ -564,6 +565,8 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
Objectives=ql->Objectives[loc_idx]; Objectives=ql->Objectives[loc_idx];
if (ql->EndText.size() > loc_idx && !ql->EndText[loc_idx].empty()) if (ql->EndText.size() > loc_idx && !ql->EndText[loc_idx].empty())
EndText=ql->EndText[loc_idx]; EndText=ql->EndText[loc_idx];
if (ql->CompletedText.size() > (size_t)loc_idx && !ql->CompletedText[loc_idx].empty())
CompletedText=ql->CompletedText[loc_idx];
for (int i=0; i<QUEST_OBJECTIVES_COUNT; ++i) for (int i=0; i<QUEST_OBJECTIVES_COUNT; ++i)
if (ql->ObjectiveText[i].size() > loc_idx && !ql->ObjectiveText[i][loc_idx].empty()) if (ql->ObjectiveText[i].size() > loc_idx && !ql->ObjectiveText[i][loc_idx].empty())
@@ -652,7 +655,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
data << Objectives; data << Objectives;
data << Details; data << Details;
data << EndText; data << EndText;
data << uint8(0); // some string data << CompletedText; // display in quest objectives window once all objectives are completed
for (iI = 0; iI < QUEST_OBJECTIVES_COUNT; ++iI) for (iI = 0; iI < QUEST_OBJECTIVES_COUNT; ++iI)
{ {
+45 -31
View File
@@ -3522,36 +3522,37 @@ void ObjectMgr::LoadQuests()
QueryResult_AutoPtr result = WorldDatabase.Query("SELECT entry, Method, ZoneOrSort, SkillOrClass, MinLevel, QuestLevel, Type, RequiredRaces, RequiredSkillValue," QueryResult_AutoPtr result = WorldDatabase.Query("SELECT entry, Method, ZoneOrSort, SkillOrClass, MinLevel, QuestLevel, Type, RequiredRaces, RequiredSkillValue,"
// 9 10 11 12 13 14 15 16 17 18 // 9 10 11 12 13 14 15 16 17 18
"RepObjectiveFaction, RepObjectiveValue, RepObjectiveFaction2, RepObjectiveValue2, RequiredMinRepFaction, RequiredMinRepValue, RequiredMaxRepFaction, RequiredMaxRepValue, SuggestedPlayers, LimitTime," "RepObjectiveFaction, RepObjectiveValue, RepObjectiveFaction2, RepObjectiveValue2, RequiredMinRepFaction, RequiredMinRepValue, RequiredMaxRepFaction, RequiredMaxRepValue, SuggestedPlayers, LimitTime,"
// 19 20 21 22 23 24 25 26 27 28 29 30 // 19 20 21 22 23 24 25 26 27 28 29 30 31
"QuestFlags, SpecialFlags, CharTitleId, PlayersSlain, BonusTalents, PrevQuestId, NextQuestId, ExclusiveGroup, NextQuestInChain, RewXPId, SrcItemId, SrcItemCount, SrcSpell," "QuestFlags, SpecialFlags, CharTitleId, PlayersSlain, BonusTalents, PrevQuestId, NextQuestId, ExclusiveGroup, NextQuestInChain, RewXPId, SrcItemId, SrcItemCount, SrcSpell,"
// 31 32 33 34 35 36 37 38 39 40 // 32 33 34 35 36 37 38 39 40 41 42
"Title, Details, Objectives, OfferRewardText, RequestItemsText, EndText, ObjectiveText1, ObjectiveText2, ObjectiveText3, ObjectiveText4," "Title, Details, Objectives, OfferRewardText, RequestItemsText, EndText, CompletedText, ObjectiveText1, ObjectiveText2, ObjectiveText3, ObjectiveText4,"
// 41 42 43 44 45 46 47 48 49 50 51 52 // 43 44 45 46 47 48 49 50 51 52 53 54
"ReqItemId1, ReqItemId2, ReqItemId3, ReqItemId4, ReqItemId5, ReqItemId6, ReqItemCount1, ReqItemCount2, ReqItemCount3, ReqItemCount4, ReqItemCount5, ReqItemCount6," "ReqItemId1, ReqItemId2, ReqItemId3, ReqItemId4, ReqItemId5, ReqItemId6, ReqItemCount1, ReqItemCount2, ReqItemCount3, ReqItemCount4, ReqItemCount5, ReqItemCount6,"
// 53 54 55 56 57 58 59 60 // 55 56 57 58 59 60 61 62
"ReqSourceId1, ReqSourceId2, ReqSourceId3, ReqSourceId4, ReqSourceCount1, ReqSourceCount2, ReqSourceCount3, ReqSourceCount4," "ReqSourceId1, ReqSourceId2, ReqSourceId3, ReqSourceId4, ReqSourceCount1, ReqSourceCount2, ReqSourceCount3, ReqSourceCount4,"
// 61 62 63 64 65 66 67 68 // 63 64 65 66 67 68 69 70
"ReqCreatureOrGOId1, ReqCreatureOrGOId2, ReqCreatureOrGOId3, ReqCreatureOrGOId4, ReqCreatureOrGOCount1, ReqCreatureOrGOCount2, ReqCreatureOrGOCount3, ReqCreatureOrGOCount4," "ReqCreatureOrGOId1, ReqCreatureOrGOId2, ReqCreatureOrGOId3, ReqCreatureOrGOId4, ReqCreatureOrGOCount1, ReqCreatureOrGOCount2, ReqCreatureOrGOCount3, ReqCreatureOrGOCount4,"
// 69 70 71 72 // 71 72 73 74
"ReqSpellCast1, ReqSpellCast2, ReqSpellCast3, ReqSpellCast4," "ReqSpellCast1, ReqSpellCast2, ReqSpellCast3, ReqSpellCast4,"
// 73 74 75 76 77 78 // 75 76 77 78 79 80
"RewChoiceItemId1, RewChoiceItemId2, RewChoiceItemId3, RewChoiceItemId4, RewChoiceItemId5, RewChoiceItemId6," "RewChoiceItemId1, RewChoiceItemId2, RewChoiceItemId3, RewChoiceItemId4, RewChoiceItemId5, RewChoiceItemId6,"
// 79 80 81 82 83 84 // 81 82 83 84 85 86
"RewChoiceItemCount1, RewChoiceItemCount2, RewChoiceItemCount3, RewChoiceItemCount4, RewChoiceItemCount5, RewChoiceItemCount6," "RewChoiceItemCount1, RewChoiceItemCount2, RewChoiceItemCount3, RewChoiceItemCount4, RewChoiceItemCount5, RewChoiceItemCount6,"
// 85 86 87 88 89 90 91 92 // 87 88 89 90 91 92 93 94
"RewItemId1, RewItemId2, RewItemId3, RewItemId4, RewItemCount1, RewItemCount2, RewItemCount3, RewItemCount4," "RewItemId1, RewItemId2, RewItemId3, RewItemId4, RewItemCount1, RewItemCount2, RewItemCount3, RewItemCount4,"
// 93 94 95 96 97 98 99 100 101 102 // 95 96 97 98 99 100 101 102 103 104
"RewRepFaction1, RewRepFaction2, RewRepFaction3, RewRepFaction4, RewRepFaction5, RewRepValueId1, RewRepValueId2, RewRepValueId3, RewRepValueId4, RewRepValueId5," "RewRepFaction1, RewRepFaction2, RewRepFaction3, RewRepFaction4, RewRepFaction5, RewRepValueId1, RewRepValueId2, RewRepValueId3, RewRepValueId4, RewRepValueId5,"
// 105 106 107 108 109
"RewRepValue1, RewRepValue2, RewRepValue3, RewRepValue4, RewRepValue5," "RewRepValue1, RewRepValue2, RewRepValue3, RewRepValue4, RewRepValue5,"
// 103 104 105 106 107 108 109 110 111 112 113 // 110 111 112 113 114 115 116 117 118 119 120 121
"RewHonorAddition, RewHonorMultiplier, RewOrReqMoney, RewMoneyMaxLevel, RewSpell, RewSpellCast, RewMailTemplateId, RewMailDelaySecs, PointMapId, PointX, PointY, PointOpt," "RewHonorAddition, RewHonorMultiplier, RewOrReqMoney, RewMoneyMaxLevel, RewSpell, RewSpellCast, RewMailTemplateId, RewMailDelaySecs, PointMapId, PointX, PointY, PointOpt,"
// 114 115 116 117 118 119 120 121 // 122 123 124 125 126 127 128 129
"DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4, DetailsEmoteDelay1, DetailsEmoteDelay2, DetailsEmoteDelay3, DetailsEmoteDelay4," "DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4, DetailsEmoteDelay1, DetailsEmoteDelay2, DetailsEmoteDelay3, DetailsEmoteDelay4,"
// 122 123 124 125 126 127 // 130 131 132 133 134 135
"IncompleteEmote, CompleteEmote, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4," "IncompleteEmote, CompleteEmote, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4,"
// 128 129 130 131 // 136 137 138 139
"OfferRewardEmoteDelay1, OfferRewardEmoteDelay2, OfferRewardEmoteDelay3, OfferRewardEmoteDelay4," "OfferRewardEmoteDelay1, OfferRewardEmoteDelay2, OfferRewardEmoteDelay3, OfferRewardEmoteDelay4,"
// 132 133 // 140 141
"StartScript, CompleteScript" "StartScript, CompleteScript"
" FROM quest_template"); " FROM quest_template");
if(result == NULL) if(result == NULL)
@@ -4192,14 +4193,14 @@ void ObjectMgr::LoadQuestLocales()
mQuestLocaleMap.clear(); // need for reload case mQuestLocaleMap.clear(); // need for reload case
QueryResult_AutoPtr result = WorldDatabase.Query("SELECT entry," QueryResult_AutoPtr result = WorldDatabase.Query("SELECT entry,"
"Title_loc1,Details_loc1,Objectives_loc1,OfferRewardText_loc1,RequestItemsText_loc1,EndText_loc1,ObjectiveText1_loc1,ObjectiveText2_loc1,ObjectiveText3_loc1,ObjectiveText4_loc1," "Title_loc1,Details_loc1,Objectives_loc1,OfferRewardText_loc1,RequestItemsText_loc1,EndText_loc1,CompletedText_loc1,ObjectiveText1_loc1,ObjectiveText2_loc1,ObjectiveText3_loc1,ObjectiveText4_loc1,"
"Title_loc2,Details_loc2,Objectives_loc2,OfferRewardText_loc2,RequestItemsText_loc2,EndText_loc2,ObjectiveText1_loc2,ObjectiveText2_loc2,ObjectiveText3_loc2,ObjectiveText4_loc2," "Title_loc2,Details_loc2,Objectives_loc2,OfferRewardText_loc2,RequestItemsText_loc2,EndText_loc2,CompletedText_loc2,ObjectiveText1_loc2,ObjectiveText2_loc2,ObjectiveText3_loc2,ObjectiveText4_loc2,"
"Title_loc3,Details_loc3,Objectives_loc3,OfferRewardText_loc3,RequestItemsText_loc3,EndText_loc3,ObjectiveText1_loc3,ObjectiveText2_loc3,ObjectiveText3_loc3,ObjectiveText4_loc3," "Title_loc3,Details_loc3,Objectives_loc3,OfferRewardText_loc3,RequestItemsText_loc3,EndText_loc3,CompletedText_loc3,ObjectiveText1_loc3,ObjectiveText2_loc3,ObjectiveText3_loc3,ObjectiveText4_loc3,"
"Title_loc4,Details_loc4,Objectives_loc4,OfferRewardText_loc4,RequestItemsText_loc4,EndText_loc4,ObjectiveText1_loc4,ObjectiveText2_loc4,ObjectiveText3_loc4,ObjectiveText4_loc4," "Title_loc4,Details_loc4,Objectives_loc4,OfferRewardText_loc4,RequestItemsText_loc4,EndText_loc4,CompletedText_loc4,ObjectiveText1_loc4,ObjectiveText2_loc4,ObjectiveText3_loc4,ObjectiveText4_loc4,"
"Title_loc5,Details_loc5,Objectives_loc5,OfferRewardText_loc5,RequestItemsText_loc5,EndText_loc5,ObjectiveText1_loc5,ObjectiveText2_loc5,ObjectiveText3_loc5,ObjectiveText4_loc5," "Title_loc5,Details_loc5,Objectives_loc5,OfferRewardText_loc5,RequestItemsText_loc5,EndText_loc5,CompletedText_loc5,ObjectiveText1_loc5,ObjectiveText2_loc5,ObjectiveText3_loc5,ObjectiveText4_loc5,"
"Title_loc6,Details_loc6,Objectives_loc6,OfferRewardText_loc6,RequestItemsText_loc6,EndText_loc6,ObjectiveText1_loc6,ObjectiveText2_loc6,ObjectiveText3_loc6,ObjectiveText4_loc6," "Title_loc6,Details_loc6,Objectives_loc6,OfferRewardText_loc6,RequestItemsText_loc6,EndText_loc6,CompletedText_loc6,ObjectiveText1_loc6,ObjectiveText2_loc6,ObjectiveText3_loc6,ObjectiveText4_loc6,"
"Title_loc7,Details_loc7,Objectives_loc7,OfferRewardText_loc7,RequestItemsText_loc7,EndText_loc7,ObjectiveText1_loc7,ObjectiveText2_loc7,ObjectiveText3_loc7,ObjectiveText4_loc7," "Title_loc7,Details_loc7,Objectives_loc7,OfferRewardText_loc7,RequestItemsText_loc7,EndText_loc7,CompletedText_loc7,ObjectiveText1_loc7,ObjectiveText2_loc7,ObjectiveText3_loc7,ObjectiveText4_loc7,"
"Title_loc8,Details_loc8,Objectives_loc8,OfferRewardText_loc8,RequestItemsText_loc8,EndText_loc8,ObjectiveText1_loc8,ObjectiveText2_loc8,ObjectiveText3_loc8,ObjectiveText4_loc8" "Title_loc8,Details_loc8,Objectives_loc8,OfferRewardText_loc8,RequestItemsText_loc8,EndText_loc8,CompletedText_loc8,ObjectiveText1_loc8,ObjectiveText2_loc8,ObjectiveText3_loc8,ObjectiveText4_loc8"
" FROM locales_quest" " FROM locales_quest"
); );
@@ -4219,7 +4220,7 @@ void ObjectMgr::LoadQuestLocales()
for (uint8 i = 1; i < MAX_LOCALE; ++i) for (uint8 i = 1; i < MAX_LOCALE; ++i)
{ {
std::string str = fields[1+10*(i-1)].GetCppString(); std::string str = fields[1+11*(i-1)].GetCppString();
if(!str.empty()) if(!str.empty())
{ {
int idx = GetOrNewIndexForLocale(LocaleConstant(i)); int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -4231,7 +4232,7 @@ void ObjectMgr::LoadQuestLocales()
data.Title[idx] = str; data.Title[idx] = str;
} }
} }
str = fields[1+10*(i-1)+1].GetCppString(); str = fields[1+11*(i-1)+1].GetCppString();
if(!str.empty()) if(!str.empty())
{ {
int idx = GetOrNewIndexForLocale(LocaleConstant(i)); int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -4243,7 +4244,7 @@ void ObjectMgr::LoadQuestLocales()
data.Details[idx] = str; data.Details[idx] = str;
} }
} }
str = fields[1+10*(i-1)+2].GetCppString(); str = fields[1+11*(i-1)+2].GetCppString();
if(!str.empty()) if(!str.empty())
{ {
int idx = GetOrNewIndexForLocale(LocaleConstant(i)); int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -4255,7 +4256,7 @@ void ObjectMgr::LoadQuestLocales()
data.Objectives[idx] = str; data.Objectives[idx] = str;
} }
} }
str = fields[1+10*(i-1)+3].GetCppString(); str = fields[1+11*(i-1)+3].GetCppString();
if(!str.empty()) if(!str.empty())
{ {
int idx = GetOrNewIndexForLocale(LocaleConstant(i)); int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -4267,7 +4268,7 @@ void ObjectMgr::LoadQuestLocales()
data.OfferRewardText[idx] = str; data.OfferRewardText[idx] = str;
} }
} }
str = fields[1+10*(i-1)+4].GetCppString(); str = fields[1+11*(i-1)+4].GetCppString();
if(!str.empty()) if(!str.empty())
{ {
int idx = GetOrNewIndexForLocale(LocaleConstant(i)); int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -4279,7 +4280,7 @@ void ObjectMgr::LoadQuestLocales()
data.RequestItemsText[idx] = str; data.RequestItemsText[idx] = str;
} }
} }
str = fields[1+10*(i-1)+5].GetCppString(); str = fields[1+11*(i-1)+5].GetCppString();
if(!str.empty()) if(!str.empty())
{ {
int idx = GetOrNewIndexForLocale(LocaleConstant(i)); int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -4291,9 +4292,22 @@ void ObjectMgr::LoadQuestLocales()
data.EndText[idx] = str; data.EndText[idx] = str;
} }
} }
str = fields[1+11*(i-1)+6].GetCppString();
if(!str.empty())
{
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
if(idx >= 0)
{
if(data.CompletedText.size() <= idx)
data.CompletedText.resize(idx+1);
data.CompletedText[idx] = str;
}
}
for (uint8 k = 0; k < 4; ++k) for (uint8 k = 0; k < 4; ++k)
{ {
str = fields[1+10*(i-1)+6+k].GetCppString(); str = fields[1+11*(i-1)+7+k].GetCppString();
if(!str.empty()) if(!str.empty())
{ {
int idx = GetOrNewIndexForLocale(LocaleConstant(i)); int idx = GetOrNewIndexForLocale(LocaleConstant(i));
+36 -35
View File
@@ -62,82 +62,83 @@ Quest::Quest(Field * questRecord)
OfferRewardText = questRecord[35].GetCppString(); OfferRewardText = questRecord[35].GetCppString();
RequestItemsText = questRecord[36].GetCppString(); RequestItemsText = questRecord[36].GetCppString();
EndText = questRecord[37].GetCppString(); EndText = questRecord[37].GetCppString();
CompletedText = questRecord[38].GetCppString();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ObjectiveText[i] = questRecord[38+i].GetCppString(); ObjectiveText[i] = questRecord[39+i].GetCppString();
for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i) for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
ReqItemId[i] = questRecord[42+i].GetUInt32(); ReqItemId[i] = questRecord[43+i].GetUInt32();
for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i) for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
ReqItemCount[i] = questRecord[48+i].GetUInt32(); ReqItemCount[i] = questRecord[49+i].GetUInt32();
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i) for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
ReqSourceId[i] = questRecord[54+i].GetUInt32(); ReqSourceId[i] = questRecord[55+i].GetUInt32();
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i) for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
ReqSourceCount[i] = questRecord[58+i].GetUInt32(); ReqSourceCount[i] = questRecord[59+i].GetUInt32();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ReqCreatureOrGOId[i] = questRecord[62+i].GetInt32(); ReqCreatureOrGOId[i] = questRecord[63+i].GetInt32();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ReqCreatureOrGOCount[i] = questRecord[66+i].GetUInt32(); ReqCreatureOrGOCount[i] = questRecord[67+i].GetUInt32();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ReqSpell[i] = questRecord[70+i].GetUInt32(); ReqSpell[i] = questRecord[71+i].GetUInt32();
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i) for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
RewChoiceItemId[i] = questRecord[74+i].GetUInt32(); RewChoiceItemId[i] = questRecord[75+i].GetUInt32();
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i) for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
RewChoiceItemCount[i] = questRecord[80+i].GetUInt32(); RewChoiceItemCount[i] = questRecord[81+i].GetUInt32();
for (int i = 0; i < QUEST_REWARDS_COUNT; ++i) for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
RewItemId[i] = questRecord[86+i].GetUInt32(); RewItemId[i] = questRecord[87+i].GetUInt32();
for (int i = 0; i < QUEST_REWARDS_COUNT; ++i) for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
RewItemCount[i] = questRecord[90+i].GetUInt32(); RewItemCount[i] = questRecord[91+i].GetUInt32();
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
RewRepFaction[i] = questRecord[94+i].GetUInt32(); RewRepFaction[i] = questRecord[95+i].GetUInt32();
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
RewRepValueId[i] = questRecord[99+i].GetInt32(); RewRepValueId[i] = questRecord[100+i].GetInt32();
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
RewRepValue[i] = questRecord[104+i].GetInt32(); RewRepValue[i] = questRecord[105+i].GetInt32();
RewHonorableKills = questRecord[109].GetUInt32(); RewHonorableKills = questRecord[110].GetUInt32();
RewHonorMultiplier = questRecord[110].GetFloat(); RewHonorMultiplier = questRecord[111].GetFloat();
RewOrReqMoney = questRecord[111].GetInt32(); RewOrReqMoney = questRecord[112].GetInt32();
RewMoneyMaxLevel = questRecord[112].GetUInt32(); RewMoneyMaxLevel = questRecord[113].GetUInt32();
RewSpell = questRecord[113].GetUInt32(); RewSpell = questRecord[114].GetUInt32();
RewSpellCast = questRecord[114].GetInt32(); RewSpellCast = questRecord[115].GetInt32();
RewMailTemplateId = questRecord[115].GetUInt32(); RewMailTemplateId = questRecord[116].GetUInt32();
RewMailDelaySecs = questRecord[116].GetUInt32(); RewMailDelaySecs = questRecord[117].GetUInt32();
PointMapId = questRecord[117].GetUInt32(); PointMapId = questRecord[118].GetUInt32();
PointX = questRecord[118].GetFloat(); PointX = questRecord[119].GetFloat();
PointY = questRecord[119].GetFloat(); PointY = questRecord[120].GetFloat();
PointOpt = questRecord[120].GetUInt32(); PointOpt = questRecord[121].GetUInt32();
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
DetailsEmote[i] = questRecord[121+i].GetUInt32(); DetailsEmote[i] = questRecord[122+i].GetUInt32();
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
DetailsEmoteDelay[i] = questRecord[125+i].GetUInt32(); DetailsEmoteDelay[i] = questRecord[126+i].GetUInt32();
IncompleteEmote = questRecord[129].GetUInt32(); IncompleteEmote = questRecord[130].GetUInt32();
CompleteEmote = questRecord[130].GetUInt32(); CompleteEmote = questRecord[131].GetUInt32();
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
OfferRewardEmote[i] = questRecord[131+i].GetInt32(); OfferRewardEmote[i] = questRecord[132+i].GetInt32();
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
OfferRewardEmoteDelay[i] = questRecord[135+i].GetInt32(); OfferRewardEmoteDelay[i] = questRecord[136+i].GetInt32();
QuestStartScript = questRecord[139].GetUInt32(); QuestStartScript = questRecord[140].GetUInt32();
QuestCompleteScript = questRecord[140].GetUInt32(); QuestCompleteScript = questRecord[141].GetUInt32();
QuestFlags |= SpecialFlags << 16; QuestFlags |= SpecialFlags << 16;
+3
View File
@@ -164,6 +164,7 @@ struct QuestLocale
std::vector<std::string> OfferRewardText; std::vector<std::string> OfferRewardText;
std::vector<std::string> RequestItemsText; std::vector<std::string> RequestItemsText;
std::vector<std::string> EndText; std::vector<std::string> EndText;
std::vector<std::string> CompletedText;
std::vector< std::vector<std::string> > ObjectiveText; std::vector< std::vector<std::string> > ObjectiveText;
}; };
@@ -216,6 +217,7 @@ class Quest
std::string GetOfferRewardText() const { return OfferRewardText; } std::string GetOfferRewardText() const { return OfferRewardText; }
std::string GetRequestItemsText() const { return RequestItemsText; } std::string GetRequestItemsText() const { return RequestItemsText; }
std::string GetEndText() const { return EndText; } std::string GetEndText() const { return EndText; }
std::string GetCompletedText() const { return CompletedText; }
int32 GetRewOrReqMoney() const; int32 GetRewOrReqMoney() const;
uint32 GetRewHonorableKills() const { return RewHonorableKills; } uint32 GetRewHonorableKills() const { return RewHonorableKills; }
uint32 GetRewMoneyMaxLevel() const { return RewMoneyMaxLevel; } uint32 GetRewMoneyMaxLevel() const { return RewMoneyMaxLevel; }
@@ -314,6 +316,7 @@ class Quest
std::string OfferRewardText; std::string OfferRewardText;
std::string RequestItemsText; std::string RequestItemsText;
std::string EndText; std::string EndText;
std::string CompletedText;
uint32 RewHonorableKills; uint32 RewHonorableKills;
float RewHonorMultiplier; float RewHonorMultiplier;
int32 RewOrReqMoney; int32 RewOrReqMoney;