From aff7d022afb2435f52266e5b41c93aa47df734b0 Mon Sep 17 00:00:00 2001 From: Lightguard Date: Wed, 3 Feb 2010 12:00:41 +0100 Subject: [PATCH 1/3] [9289] Fix glyph 57870 --- sql/mangos.sql | 3 ++- sql/updates/9289_01_mangos_spell_proc_event.sql | 4 ++++ sql/updates/Makefile.am | 2 ++ src/game/Unit.cpp | 6 ++++++ src/shared/revision_nr.h | 2 +- src/shared/revision_sql.h | 2 +- 6 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 sql/updates/9289_01_mangos_spell_proc_event.sql diff --git a/sql/mangos.sql b/sql/mangos.sql index df41ff7a9..fd367042f 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -24,7 +24,7 @@ CREATE TABLE `db_version` ( `version` varchar(120) default NULL, `creature_ai_version` varchar(120) default NULL, `cache_id` int(10) default '0', - `required_9288_01_mangos_spell_bonus_data` bit(1) default NULL + `required_9289_01_mangos_spell_proc_event` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -18525,6 +18525,7 @@ INSERT INTO `spell_proc_event` VALUES (57470, 0x00000000, 6, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (57472, 0x00000000, 6, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (57499, 0x00000000, 4, 0x40000001, 0x00010000, 0x00000000, 0x00014000, 0x00000000, 0.000000, 0.000000, 0), +(57870, 0x00000000, 9, 0x00800000, 0x00000000, 0x00000000, 0x00040000, 0x00000000, 0.000000, 0.000000, 0), (57878, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0.000000, 0.000000, 0), (57880, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0.000000, 0.000000, 0), (57881, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0.000000, 0.000000, 0), diff --git a/sql/updates/9289_01_mangos_spell_proc_event.sql b/sql/updates/9289_01_mangos_spell_proc_event.sql new file mode 100644 index 000000000..c18e493a7 --- /dev/null +++ b/sql/updates/9289_01_mangos_spell_proc_event.sql @@ -0,0 +1,4 @@ +ALTER TABLE db_version CHANGE COLUMN required_9288_01_mangos_spell_bonus_data required_9289_01_mangos_spell_proc_event bit; +DELETE FROM `spell_proc_event` WHERE `entry` IN (57870); +INSERT INTO `spell_proc_event` VALUES +(57870, 0x00000000, 9, 0x00800000, 0x00000000, 0x00000000, 0x00040000, 0x00000000, 0.000000, 0.000000, 0); \ No newline at end of file diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 966274dcd..9f010d817 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -255,6 +255,7 @@ pkgdata_DATA = \ 9262_01_mangos_quest_template.sql \ 9277_01_mangos_spell_bonus_data.sql \ 9288_01_mangos_spell_bonus_data.sql \ + 9289_01_mangos_spell_proc_event.sql \ README ## Additional files to include when running 'make dist' @@ -490,4 +491,5 @@ EXTRA_DIST = \ 9262_01_mangos_quest_template.sql \ 9277_01_mangos_spell_bonus_data.sql \ 9288_01_mangos_spell_bonus_data.sql \ + 9289_01_mangos_spell_proc_event.sql \ README diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index d7cd861ba..13417bb73 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6140,6 +6140,12 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu } break; } + // Glyph of Mend Pet + if(dummySpell->Id == 57870) + { + pVictim->CastSpell(pVictim, 57894, true, NULL, NULL, GetGUID()); + return true; + } break; } case SPELLFAMILY_PALADIN: diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 0cb0cb865..1b10f682b 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9288" + #define REVISION_NR "9289" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index 33290904e..8646be644 100644 --- a/src/shared/revision_sql.h +++ b/src/shared/revision_sql.h @@ -1,6 +1,6 @@ #ifndef __REVISION_SQL_H__ #define __REVISION_SQL_H__ #define REVISION_DB_CHARACTERS "required_9250_01_characters_character" - #define REVISION_DB_MANGOS "required_9288_01_mangos_spell_bonus_data" + #define REVISION_DB_MANGOS "required_9289_01_mangos_spell_proc_event" #define REVISION_DB_REALMD "required_9010_01_realmd_realmlist" #endif // __REVISION_SQL_H__ From 573651435efd69fe2d04f972f779fecb738abe3b Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Wed, 3 Feb 2010 13:33:18 +0300 Subject: [PATCH 2/3] [9290] Some cleanups in realmd, no functional changes --- src/realmd/AuthCodes.h | 2 +- src/realmd/AuthSocket.cpp | 1 - src/shared/revision_nr.h | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/realmd/AuthCodes.h b/src/realmd/AuthCodes.h index 1ccb1dc21..c3282a7ce 100644 --- a/src/realmd/AuthCodes.h +++ b/src/realmd/AuthCodes.h @@ -43,7 +43,7 @@ enum eAuthResults REALM_AUTH_PARENTAL_CONTROL = 0x0f ///< Access to this account has been blocked by parental controls. Your settings may be changed in your account preferences at }; -// will only support WoW 1.12.1/1.12.2 , WoW:TBC 2.4.3 and WoW:WotLK 3.2.2a, client builds 10505, 8606, 6005, 5875 +// will only support WoW 1.12.1/1.12.2 , WoW:TBC 2.4.3 and official release for WoW:WotLK and later, client builds 10505, 8606, 6005, 5875 // if you need more from old build then add it in cases in relamd sources code // list sorted from high to low build and first build used as low bound for accepted by default range (any > it will accepted by realmd at least) diff --git a/src/realmd/AuthSocket.cpp b/src/realmd/AuthSocket.cpp index 70a3148ed..6222b2f78 100644 --- a/src/realmd/AuthSocket.cpp +++ b/src/realmd/AuthSocket.cpp @@ -36,7 +36,6 @@ extern DatabaseType loginDatabase; enum eAuthCmd { - //AUTH_NO_CMD = 0xFF, AUTH_LOGON_CHALLENGE = 0x00, AUTH_LOGON_PROOF = 0x01, AUTH_RECONNECT_CHALLENGE = 0x02, diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 1b10f682b..39b205d28 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9289" + #define REVISION_NR "9290" #endif // __REVISION_NR_H__ From a0a4f7a71919626cfc066fc21b2f16116b10eba5 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Wed, 3 Feb 2010 14:03:23 +0100 Subject: [PATCH 3/3] [9291] Implement DB storage for new quest field, CompletedText Text will display in quest objectives window when quest is completed. Also add locales storage Signed-off-by: NoFantasy --- sql/mangos.sql | 11 ++- sql/updates/9291_01_mangos_quest_template.sql | 3 + sql/updates/9291_02_mangos_locales_quest.sql | 10 +++ sql/updates/Makefile.am | 4 ++ src/game/GossipDef.cpp | 8 ++- src/game/ObjectMgr.cpp | 58 +++++++++------- src/game/QuestDef.cpp | 67 ++++++++++--------- src/game/QuestDef.h | 3 + src/game/Unit.cpp | 10 +-- src/shared/revision_nr.h | 2 +- src/shared/revision_sql.h | 2 +- 11 files changed, 112 insertions(+), 66 deletions(-) create mode 100644 sql/updates/9291_01_mangos_quest_template.sql create mode 100644 sql/updates/9291_02_mangos_locales_quest.sql diff --git a/sql/mangos.sql b/sql/mangos.sql index fd367042f..e8e9a9c90 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -24,7 +24,7 @@ CREATE TABLE `db_version` ( `version` varchar(120) default NULL, `creature_ai_version` varchar(120) default NULL, `cache_id` int(10) default '0', - `required_9289_01_mangos_spell_proc_event` bit(1) default NULL + `required_9291_02_mangos_locales_quest` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -2782,6 +2782,14 @@ CREATE TABLE `locales_quest` ( `EndText_loc6` text, `EndText_loc7` 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_loc2` text, `ObjectiveText1_loc3` text, @@ -13805,6 +13813,7 @@ CREATE TABLE `quest_template` ( `OfferRewardText` text, `RequestItemsText` text, `EndText` text, + `CompletedText` text, `ObjectiveText1` text, `ObjectiveText2` text, `ObjectiveText3` text, diff --git a/sql/updates/9291_01_mangos_quest_template.sql b/sql/updates/9291_01_mangos_quest_template.sql new file mode 100644 index 000000000..5633a4ceb --- /dev/null +++ b/sql/updates/9291_01_mangos_quest_template.sql @@ -0,0 +1,3 @@ +ALTER TABLE db_version CHANGE COLUMN required_9289_01_mangos_spell_proc_event required_9291_01_mangos_quest_template bit; + +ALTER TABLE quest_template ADD COLUMN CompletedText text AFTER EndText; diff --git a/sql/updates/9291_02_mangos_locales_quest.sql b/sql/updates/9291_02_mangos_locales_quest.sql new file mode 100644 index 000000000..f5e35889b --- /dev/null +++ b/sql/updates/9291_02_mangos_locales_quest.sql @@ -0,0 +1,10 @@ +ALTER TABLE db_version CHANGE COLUMN required_9291_01_mangos_quest_template required_9291_02_mangos_locales_quest bit; + +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; diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 9f010d817..7567b4371 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -256,6 +256,8 @@ pkgdata_DATA = \ 9277_01_mangos_spell_bonus_data.sql \ 9288_01_mangos_spell_bonus_data.sql \ 9289_01_mangos_spell_proc_event.sql \ + 9291_01_mangos_quest_template.sql \ + 9291_02_mangos_locales_quest.sql \ README ## Additional files to include when running 'make dist' @@ -492,4 +494,6 @@ EXTRA_DIST = \ 9277_01_mangos_spell_bonus_data.sql \ 9288_01_mangos_spell_bonus_data.sql \ 9289_01_mangos_spell_proc_event.sql \ + 9291_01_mangos_quest_template.sql \ + 9291_02_mangos_locales_quest.sql \ README diff --git a/src/game/GossipDef.cpp b/src/game/GossipDef.cpp index 1a1f7bf12..c543e4daa 100644 --- a/src/game/GossipDef.cpp +++ b/src/game/GossipDef.cpp @@ -540,12 +540,14 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID 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]; Title = pQuest->GetTitle(); Details = pQuest->GetDetails(); Objectives = pQuest->GetObjectives(); EndText = pQuest->GetEndText(); + CompletedText = pQuest->GetCompletedText(); + for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) ObjectiveText[i] = pQuest->ObjectiveText[i]; @@ -563,6 +565,8 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) Objectives=ql->Objectives[loc_idx]; if (ql->EndText.size() > (size_t)loc_idx && !ql->EndText[loc_idx].empty()) 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) if (ql->ObjectiveText[i].size() > (size_t)loc_idx && !ql->ObjectiveText[i][loc_idx].empty()) @@ -651,7 +655,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) data << Objectives; data << Details; data << EndText; - data << uint8(0); // Return to text + data << CompletedText; // display in quest objectives window once all objectives are completed for (iI = 0; iI < QUEST_OBJECTIVES_COUNT; ++iI) { diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index a15243256..e3c4ab5ae 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -3285,33 +3285,33 @@ void ObjectMgr::LoadQuests() "RepObjectiveFaction, RepObjectiveValue, RequiredMinRepFaction, RequiredMinRepValue, RequiredMaxRepFaction, RequiredMaxRepValue, SuggestedPlayers, LimitTime," // 17 18 19 20 21 22 23 24 25 26 27 28 "QuestFlags, SpecialFlags, CharTitleId, PlayersSlain, BonusTalents, PrevQuestId, NextQuestId, ExclusiveGroup, NextQuestInChain, SrcItemId, SrcItemCount, SrcSpell," - // 29 30 31 32 33 34 35 36 37 38 - "Title, Details, Objectives, OfferRewardText, RequestItemsText, EndText, ObjectiveText1, ObjectiveText2, ObjectiveText3, ObjectiveText4," - // 39 40 41 42 43 44 45 46 47 48 49 50 + // 29 30 31 32 33 34 35 36 37 38 39 + "Title, Details, Objectives, OfferRewardText, RequestItemsText, EndText, CompletedText, ObjectiveText1, ObjectiveText2, ObjectiveText3, ObjectiveText4," + // 40 41 42 43 44 45 46 47 48 49 50 51 "ReqItemId1, ReqItemId2, ReqItemId3, ReqItemId4, ReqItemId5, ReqItemId6, ReqItemCount1, ReqItemCount2, ReqItemCount3, ReqItemCount4, ReqItemCount5, ReqItemCount6," - // 51 52 53 54 55 56 57 58 + // 52 53 54 55 56 57 58 59 "ReqSourceId1, ReqSourceId2, ReqSourceId3, ReqSourceId4, ReqSourceCount1, ReqSourceCount2, ReqSourceCount3, ReqSourceCount4," - // 59 60 61 62 63 64 65 66 + // 60 61 62 63 64 65 66 67 "ReqCreatureOrGOId1, ReqCreatureOrGOId2, ReqCreatureOrGOId3, ReqCreatureOrGOId4, ReqCreatureOrGOCount1, ReqCreatureOrGOCount2, ReqCreatureOrGOCount3, ReqCreatureOrGOCount4," - // 67 68 69 70 + // 68 69 70 71 "ReqSpellCast1, ReqSpellCast2, ReqSpellCast3, ReqSpellCast4," - // 71 72 73 74 75 76 + // 72 73 74 75 76 77 "RewChoiceItemId1, RewChoiceItemId2, RewChoiceItemId3, RewChoiceItemId4, RewChoiceItemId5, RewChoiceItemId6," - // 77 78 79 80 81 82 + // 78 79 80 81 82 83 "RewChoiceItemCount1, RewChoiceItemCount2, RewChoiceItemCount3, RewChoiceItemCount4, RewChoiceItemCount5, RewChoiceItemCount6," - // 83 84 85 86 87 88 89 90 + // 84 85 86 87 88 89 90 91 "RewItemId1, RewItemId2, RewItemId3, RewItemId4, RewItemCount1, RewItemCount2, RewItemCount3, RewItemCount4," - // 91 92 93 94 95 96 97 98 99 100 + // 92 93 94 95 96 97 98 99 100 101 "RewRepFaction1, RewRepFaction2, RewRepFaction3, RewRepFaction4, RewRepFaction5, RewRepValue1, RewRepValue2, RewRepValue3, RewRepValue4, RewRepValue5," - // 101 102 103 104 105 106 107 108 109 110 111 + // 102 103 104 105 106 107 108 109 110 111 112 "RewHonorableKills, RewOrReqMoney, RewMoneyMaxLevel, RewSpell, RewSpellCast, RewMailTemplateId, RewMailDelaySecs, PointMapId, PointX, PointY, PointOpt," - // 112 113 114 115 116 117 118 119 + // 113 114 115 116 117 118 119 120 "DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4, DetailsEmoteDelay1, DetailsEmoteDelay2, DetailsEmoteDelay3, DetailsEmoteDelay4," - // 120 121 122 123 124 125 + // 121 122 123 124 125 126 "IncompleteEmote, CompleteEmote, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4," - // 126 127 128 129 + // 127 128 129 130 "OfferRewardEmoteDelay1, OfferRewardEmoteDelay2, OfferRewardEmoteDelay3, OfferRewardEmoteDelay4," - // 130 131 + // 131 132 "StartScript, CompleteScript" " FROM quest_template"); if(result == NULL) @@ -3938,14 +3938,14 @@ void ObjectMgr::LoadQuestLocales() mQuestLocaleMap.clear(); // need for reload case QueryResult *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_loc2,Details_loc2,Objectives_loc2,OfferRewardText_loc2,RequestItemsText_loc2,EndText_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_loc4,Details_loc4,Objectives_loc4,OfferRewardText_loc4,RequestItemsText_loc4,EndText_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_loc6,Details_loc6,Objectives_loc6,OfferRewardText_loc6,RequestItemsText_loc6,EndText_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_loc8,Details_loc8,Objectives_loc8,OfferRewardText_loc8,RequestItemsText_loc8,EndText_loc8,ObjectiveText1_loc8,ObjectiveText2_loc8,ObjectiveText3_loc8,ObjectiveText4_loc8" + "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,CompletedText_loc2,ObjectiveText1_loc2,ObjectiveText2_loc2,ObjectiveText3_loc2,ObjectiveText4_loc2," + "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,CompletedText_loc4,ObjectiveText1_loc4,ObjectiveText2_loc4,ObjectiveText3_loc4,ObjectiveText4_loc4," + "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,CompletedText_loc6,ObjectiveText1_loc6,ObjectiveText2_loc6,ObjectiveText3_loc6,ObjectiveText4_loc6," + "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,CompletedText_loc8,ObjectiveText1_loc8,ObjectiveText2_loc8,ObjectiveText3_loc8,ObjectiveText4_loc8" " FROM locales_quest" ); @@ -4045,6 +4045,18 @@ void ObjectMgr::LoadQuestLocales() data.EndText[idx] = str; } } + str = fields[1+10*(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(int k = 0; k < 4; ++k) { str = fields[1+10*(i-1)+6+k].GetCppString(); diff --git a/src/game/QuestDef.cpp b/src/game/QuestDef.cpp index 05fcc955a..21acb0bd4 100644 --- a/src/game/QuestDef.cpp +++ b/src/game/QuestDef.cpp @@ -57,78 +57,79 @@ Quest::Quest(Field * questRecord) OfferRewardText = questRecord[32].GetCppString(); RequestItemsText = questRecord[33].GetCppString(); EndText = questRecord[34].GetCppString(); + CompletedText = questRecord[35].GetCppString(); for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) - ObjectiveText[i] = questRecord[35+i].GetCppString(); + ObjectiveText[i] = questRecord[36+i].GetCppString(); for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i) - ReqItemId[i] = questRecord[39+i].GetUInt32(); + ReqItemId[i] = questRecord[40+i].GetUInt32(); for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i) - ReqItemCount[i] = questRecord[45+i].GetUInt32(); + ReqItemCount[i] = questRecord[46+i].GetUInt32(); for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i) - ReqSourceId[i] = questRecord[51+i].GetUInt32(); + ReqSourceId[i] = questRecord[52+i].GetUInt32(); for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i) - ReqSourceCount[i] = questRecord[55+i].GetUInt32(); + ReqSourceCount[i] = questRecord[56+i].GetUInt32(); for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) - ReqCreatureOrGOId[i] = questRecord[59+i].GetInt32(); + ReqCreatureOrGOId[i] = questRecord[60+i].GetInt32(); for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) - ReqCreatureOrGOCount[i] = questRecord[63+i].GetUInt32(); + ReqCreatureOrGOCount[i] = questRecord[64+i].GetUInt32(); for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) - ReqSpell[i] = questRecord[67+i].GetUInt32(); + ReqSpell[i] = questRecord[68+i].GetUInt32(); for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i) - RewChoiceItemId[i] = questRecord[71+i].GetUInt32(); + RewChoiceItemId[i] = questRecord[72+i].GetUInt32(); for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i) - RewChoiceItemCount[i] = questRecord[77+i].GetUInt32(); + RewChoiceItemCount[i] = questRecord[78+i].GetUInt32(); for (int i = 0; i < QUEST_REWARDS_COUNT; ++i) - RewItemId[i] = questRecord[83+i].GetUInt32(); + RewItemId[i] = questRecord[84+i].GetUInt32(); for (int i = 0; i < QUEST_REWARDS_COUNT; ++i) - RewItemCount[i] = questRecord[87+i].GetUInt32(); + RewItemCount[i] = questRecord[88+i].GetUInt32(); for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) - RewRepFaction[i] = questRecord[91+i].GetUInt32(); + RewRepFaction[i] = questRecord[92+i].GetUInt32(); for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) - RewRepValue[i] = questRecord[96+i].GetInt32(); + RewRepValue[i] = questRecord[97+i].GetInt32(); - RewHonorableKills = questRecord[101].GetUInt32(); - RewOrReqMoney = questRecord[102].GetInt32(); - RewMoneyMaxLevel = questRecord[103].GetUInt32(); - RewSpell = questRecord[104].GetUInt32(); - RewSpellCast = questRecord[105].GetUInt32(); - RewMailTemplateId = questRecord[106].GetUInt32(); - RewMailDelaySecs = questRecord[107].GetUInt32(); - PointMapId = questRecord[108].GetUInt32(); - PointX = questRecord[109].GetFloat(); - PointY = questRecord[110].GetFloat(); - PointOpt = questRecord[111].GetUInt32(); + RewHonorableKills = questRecord[102].GetUInt32(); + RewOrReqMoney = questRecord[103].GetInt32(); + RewMoneyMaxLevel = questRecord[104].GetUInt32(); + RewSpell = questRecord[105].GetUInt32(); + RewSpellCast = questRecord[106].GetUInt32(); + RewMailTemplateId = questRecord[107].GetUInt32(); + RewMailDelaySecs = questRecord[108].GetUInt32(); + PointMapId = questRecord[109].GetUInt32(); + PointX = questRecord[110].GetFloat(); + PointY = questRecord[111].GetFloat(); + PointOpt = questRecord[112].GetUInt32(); for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) - DetailsEmote[i] = questRecord[112+i].GetUInt32(); + DetailsEmote[i] = questRecord[113+i].GetUInt32(); for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) - DetailsEmoteDelay[i] = questRecord[116+i].GetUInt32(); + DetailsEmoteDelay[i] = questRecord[117+i].GetUInt32(); - IncompleteEmote = questRecord[120].GetUInt32(); - CompleteEmote = questRecord[121].GetUInt32(); + IncompleteEmote = questRecord[121].GetUInt32(); + CompleteEmote = questRecord[122].GetUInt32(); for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) - OfferRewardEmote[i] = questRecord[122+i].GetInt32(); + OfferRewardEmote[i] = questRecord[123+i].GetInt32(); for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) - OfferRewardEmoteDelay[i] = questRecord[126+i].GetInt32(); + OfferRewardEmoteDelay[i] = questRecord[127+i].GetInt32(); - QuestStartScript = questRecord[130].GetUInt32(); - QuestCompleteScript = questRecord[131].GetUInt32(); + QuestStartScript = questRecord[131].GetUInt32(); + QuestCompleteScript = questRecord[132].GetUInt32(); QuestFlags |= SpecialFlags << 24; diff --git a/src/game/QuestDef.h b/src/game/QuestDef.h index f9d6961cd..ae58bcd73 100644 --- a/src/game/QuestDef.h +++ b/src/game/QuestDef.h @@ -162,6 +162,7 @@ struct QuestLocale std::vector OfferRewardText; std::vector RequestItemsText; std::vector EndText; + std::vector CompletedText; std::vector< std::vector > ObjectiveText; }; @@ -212,6 +213,7 @@ class Quest std::string GetOfferRewardText() const { return OfferRewardText; } std::string GetRequestItemsText() const { return RequestItemsText; } std::string GetEndText() const { return EndText; } + std::string GetCompletedText() const { return CompletedText; } int32 GetRewOrReqMoney() const; uint32 GetRewHonorableKills() const { return RewHonorableKills; } uint32 GetRewMoneyMaxLevel() const { return RewMoneyMaxLevel; } @@ -306,6 +308,7 @@ class Quest std::string OfferRewardText; std::string RequestItemsText; std::string EndText; + std::string CompletedText; uint32 RewHonorableKills; int32 RewOrReqMoney; uint32 RewMoneyMaxLevel; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 13417bb73..72a63a290 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6140,11 +6140,11 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu } break; } - // Glyph of Mend Pet - if(dummySpell->Id == 57870) - { - pVictim->CastSpell(pVictim, 57894, true, NULL, NULL, GetGUID()); - return true; + // Glyph of Mend Pet + if(dummySpell->Id == 57870) + { + pVictim->CastSpell(pVictim, 57894, true, NULL, NULL, GetGUID()); + return true; } break; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 39b205d28..78329ffbf 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9290" + #define REVISION_NR "9291" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index 8646be644..1794eabc3 100644 --- a/src/shared/revision_sql.h +++ b/src/shared/revision_sql.h @@ -1,6 +1,6 @@ #ifndef __REVISION_SQL_H__ #define __REVISION_SQL_H__ #define REVISION_DB_CHARACTERS "required_9250_01_characters_character" - #define REVISION_DB_MANGOS "required_9289_01_mangos_spell_proc_event" + #define REVISION_DB_MANGOS "required_9291_02_mangos_locales_quest" #define REVISION_DB_REALMD "required_9010_01_realmd_realmlist" #endif // __REVISION_SQL_H__