diff options
author | megamage <none@none> | 2009-06-03 19:23:49 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-06-03 19:23:49 -0500 |
commit | 8419f9b0592073f2f98352ea4d9e8b3a0bed45d6 (patch) | |
tree | 3c4cff9dd7f48b7b2c2a4b4f48e3b007889c07ce /src | |
parent | e2fcdbb8924f7e93afe84788e3be49c0a2a8d350 (diff) |
[7945] Implement support quest data for DetailsEmoteDelay and OfferRewardEmoteDelay value for set time ordering details and reward emotes. Author: NoFantasy
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/GossipDef.cpp | 10 | ||||
-rw-r--r-- | src/game/ObjectMgr.cpp | 10 | ||||
-rw-r--r-- | src/game/QuestDef.cpp | 16 | ||||
-rw-r--r-- | src/game/QuestDef.h | 2 |
4 files changed, 25 insertions, 13 deletions
diff --git a/src/game/GossipDef.cpp b/src/game/GossipDef.cpp index 5191f4e9313..2e98e8c4e06 100644 --- a/src/game/GossipDef.cpp +++ b/src/game/GossipDef.cpp @@ -505,7 +505,7 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID for (uint32 i=0; i < QUEST_EMOTE_COUNT; ++i) { data << uint32(pQuest->DetailsEmote[i]); - data << uint32(0); // DetailsEmoteDelay + data << uint32(pQuest->DetailsEmoteDelay[i]); // DetailsEmoteDelay (in ms) } pSession->SendPacket( &data ); @@ -643,7 +643,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) sLog.outDebug( "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", pQuest->GetQuestId() ); } -void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID, bool EnbleNext ) +void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID, bool EnableNext ) { std::string Title = pQuest->GetTitle(); std::string OfferRewardText = pQuest->GetOfferRewardText(); @@ -668,7 +668,7 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID, data << Title; data << OfferRewardText; - data << uint32( EnbleNext ); + data << uint32( EnableNext ); data << uint32(0); // unk uint32 EmoteCount = 0; @@ -682,8 +682,8 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID, data << EmoteCount; // Emote Count for (uint32 i = 0; i < EmoteCount; ++i) { - data << uint32(0); // Delay Emote - data << pQuest->OfferRewardEmote[i]; + data << uint32(pQuest->OfferRewardEmoteDelay[i]); // Delay Emote + data << uint32(pQuest->OfferRewardEmote[i]); } ItemPrototype const *pItem; diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index c60c5f43aef..a8073abbad0 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -3171,9 +3171,13 @@ void ObjectMgr::LoadQuests() "RewRepFaction1, RewRepFaction2, RewRepFaction3, RewRepFaction4, RewRepFaction5, RewRepValue1, RewRepValue2, RewRepValue3, RewRepValue4, RewRepValue5," // 97 98 99 100 101 102 103 104 105 106 107 "RewHonorableKills, RewOrReqMoney, RewMoneyMaxLevel, RewSpell, RewSpellCast, RewMailTemplateId, RewMailDelaySecs, PointMapId, PointX, PointY, PointOpt," - // 108 109 110 111 112 113 114 115 116 117 - "DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4, IncompleteEmote, CompleteEmote, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4," - // 118 119 + // 108 109 110 111 112 113 114 115 + "DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4, DetailsEmoteDelay1, DetailsEmoteDelay2, DetailsEmoteDelay3, DetailsEmoteDelay4," + // 116 117 118 119 120 121 + "IncompleteEmote, CompleteEmote, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4," + // 122 123 124 125 + "OfferRewardEmoteDelay1, OfferRewardEmoteDelay2, OfferRewardEmoteDelay3, OfferRewardEmoteDelay4," + // 126 127 "StartScript, CompleteScript" " FROM quest_template"); if(result == NULL) diff --git a/src/game/QuestDef.cpp b/src/game/QuestDef.cpp index 8099bf40e88..013d6da1f0f 100644 --- a/src/game/QuestDef.cpp +++ b/src/game/QuestDef.cpp @@ -117,14 +117,20 @@ Quest::Quest(Field * questRecord) for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) DetailsEmote[i] = questRecord[108+i].GetUInt32(); - IncompleteEmote = questRecord[112].GetUInt32(); - CompleteEmote = questRecord[113].GetUInt32(); + for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) + DetailsEmoteDelay[i] = questRecord[112+i].GetUInt32(); + + IncompleteEmote = questRecord[116].GetUInt32(); + CompleteEmote = questRecord[117].GetUInt32(); + + for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) + OfferRewardEmote[i] = questRecord[118+i].GetInt32(); for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) - OfferRewardEmote[i] = questRecord[114+i].GetInt32(); + OfferRewardEmoteDelay[i] = questRecord[122+i].GetInt32(); - QuestStartScript = questRecord[118].GetUInt32(); - QuestCompleteScript = questRecord[119].GetUInt32(); + QuestStartScript = questRecord[126].GetUInt32(); + QuestCompleteScript = questRecord[127].GetUInt32(); QuestFlags |= SpecialFlags << 16; diff --git a/src/game/QuestDef.h b/src/game/QuestDef.h index 242c10bf48f..f6cb2dd5b55 100644 --- a/src/game/QuestDef.h +++ b/src/game/QuestDef.h @@ -241,7 +241,9 @@ class Quest uint32 RewRepFaction[QUEST_REPUTATIONS_COUNT]; int32 RewRepValue[QUEST_REPUTATIONS_COUNT]; uint32 DetailsEmote[QUEST_EMOTE_COUNT]; + uint32 DetailsEmoteDelay[QUEST_EMOTE_COUNT]; uint32 OfferRewardEmote[QUEST_EMOTE_COUNT]; + uint32 OfferRewardEmoteDelay[QUEST_EMOTE_COUNT]; uint32 GetReqItemsCount() const { return m_reqitemscount; } uint32 GetReqCreatureOrGOcount() const { return m_reqCreatureOrGOcount; } |