diff options
author | Osleyder85 <osleyder.gonzalez@gmail.com> | 2021-03-14 00:21:31 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-03-14 00:21:31 +0100 |
commit | 3addbe7dd418259149c39fc3b9423f7809de696a (patch) | |
tree | edfc7a5f3422f6df3c96007b4e78f3a95dff50d9 | |
parent | 7cc70e29aed04b879e5cf0a9384328b4accb3146 (diff) |
Core/AdventureJournal: Handle CMSG_ADVENTURE_JOURNAL_OPEN_QUEST and CMSG_ADVENTURE_JOURNAL_UPDATE_SUGGESTIONS
Merges #26000
-rw-r--r-- | sql/updates/hotfixes/master/2021_03_14_00_hotfixes.sql | 66 | ||||
-rw-r--r-- | src/server/database/Database/Implementation/HotfixDatabase.cpp | 9 | ||||
-rw-r--r-- | src/server/database/Database/Implementation/HotfixDatabase.h | 4 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2LoadInfo.h | 37 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2Stores.cpp | 2 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2Stores.h | 1 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2Structure.h | 27 | ||||
-rw-r--r-- | src/server/game/Handlers/AdventureJournalHandler.cpp | 59 | ||||
-rw-r--r-- | src/server/game/Server/Packets/AdventureJournalPackets.cpp | 54 | ||||
-rw-r--r-- | src/server/game/Server/Packets/AdventureJournalPackets.h | 66 | ||||
-rw-r--r-- | src/server/game/Server/Packets/AllPackets.h | 1 | ||||
-rw-r--r-- | src/server/game/Server/Protocol/Opcodes.cpp | 6 | ||||
-rw-r--r-- | src/server/game/Server/WorldSession.h | 10 |
13 files changed, 339 insertions, 3 deletions
diff --git a/sql/updates/hotfixes/master/2021_03_14_00_hotfixes.sql b/sql/updates/hotfixes/master/2021_03_14_00_hotfixes.sql new file mode 100644 index 00000000000..7dfb91bbe06 --- /dev/null +++ b/sql/updates/hotfixes/master/2021_03_14_00_hotfixes.sql @@ -0,0 +1,66 @@ +-- +-- Table structure for table `adventure_journal` +-- +DROP TABLE IF EXISTS `adventure_journal`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `adventure_journal` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text DEFAULT NULL, + `Description` text DEFAULT NULL, + `ButtonText` text DEFAULT NULL, + `RewardDescription` text DEFAULT NULL, + `ContinueDescription` text DEFAULT NULL, + `Type` tinyint(3) unsigned NOT NULL DEFAULT '0', + `PlayerConditionId` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ButtonActionType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `TextureFileDataId` int(11) NOT NULL DEFAULT '0', + `LfgDungeonId` smallint(5) unsigned NOT NULL DEFAULT '0', + `QuestId` smallint(5) unsigned NOT NULL DEFAULT '0', + `BattleMasterListId` smallint(5) unsigned NOT NULL DEFAULT '0', + `PriorityMin` tinyint(3) unsigned NOT NULL DEFAULT '0', + `PriorityMax` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ItemId` int(11) NOT NULL DEFAULT '0', + `ItemQuantity` int(10) unsigned NOT NULL DEFAULT '0', + `CurrencyType` smallint(5) unsigned NOT NULL DEFAULT '0', + `CurrencyQuantity` tinyint(3) unsigned NOT NULL DEFAULT '0', + `UiMapId` smallint(5) unsigned NOT NULL DEFAULT '0', + `BonusPlayerConditionId1` int(11) NOT NULL DEFAULT '0', + `BonusPlayerConditionId2` int(11) NOT NULL DEFAULT '0', + `BonusValue1` tinyint(3) unsigned NOT NULL DEFAULT '0', + `BonusValue2` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `adventure_journal_locale` +-- +DROP TABLE IF EXISTS `adventure_journal_locale`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `adventure_journal_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text DEFAULT NULL, + `Description_lang` text DEFAULT NULL, + `ButtonText_lang` text DEFAULT NULL, + `RewardDescription_lang` text DEFAULT NULL, + `ContinueDescription_lang` text DEFAULT NULL, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci +/*!50500 PARTITION BY LIST COLUMNS(locale) +(PARTITION deDE VALUES IN ('deDE') ENGINE = InnoDB, + PARTITION esES VALUES IN ('esES') ENGINE = InnoDB, + PARTITION esMX VALUES IN ('esMX') ENGINE = InnoDB, + PARTITION frFR VALUES IN ('frFR') ENGINE = InnoDB, + PARTITION itIT VALUES IN ('itIT') ENGINE = InnoDB, + PARTITION koKR VALUES IN ('koKR') ENGINE = InnoDB, + PARTITION ptBR VALUES IN ('ptBR') ENGINE = InnoDB, + PARTITION ruRU VALUES IN ('ruRU') ENGINE = InnoDB, + PARTITION zhCN VALUES IN ('zhCN') ENGINE = InnoDB, + PARTITION zhTW VALUES IN ('zhTW') ENGINE = InnoDB) */; +/*!40101 SET character_set_client = @saved_cs_client */; diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp index 33102e07235..227cb119562 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp @@ -43,6 +43,15 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_LOCALE_STMT(HOTFIX_SEL_ACHIEVEMENT, "SELECT ID, Description_lang, Title_lang, Reward_lang FROM achievement_locale" " WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH); + // AdventureJournal.db2 + PrepareStatement(HOTFIX_SEL_ADVENTURE_JOURNAL, "SELECT ID, Name, Description, ButtonText, RewardDescription, ContinueDescription, Type, " + "PlayerConditionId, Flags, ButtonActionType, TextureFileDataId, LfgDungeonId, QuestId, BattleMasterListId, PriorityMin, PriorityMax, ItemId, " + "ItemQuantity, CurrencyType, CurrencyQuantity, UiMapId, BonusPlayerConditionId1, BonusPlayerConditionId2, BonusValue1, BonusValue2" + " FROM adventure_journal WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); + PREPARE_MAX_ID_STMT(HOTFIX_SEL_ADVENTURE_JOURNAL, "SELECT MAX(ID) + 1 FROM adventure_journal", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_ADVENTURE_JOURNAL, "SELECT ID, Name_lang, Description_lang, ButtonText_lang, RewardDescription_lang, " + "ContinueDescription_lang FROM adventure_journal_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH); + // AnimationData.db2 PrepareStatement(HOTFIX_SEL_ANIMATION_DATA, "SELECT ID, BehaviorID, BehaviorTier, Fallback, Flags1, Flags2 FROM animation_data" " WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h index 4990680e6c9..ab10790569b 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.h +++ b/src/server/database/Database/Implementation/HotfixDatabase.h @@ -35,6 +35,10 @@ enum HotfixDatabaseStatements : uint32 HOTFIX_SEL_ACHIEVEMENT_MAX_ID, HOTFIX_SEL_ACHIEVEMENT_LOCALE, + HOTFIX_SEL_ADVENTURE_JOURNAL, + HOTFIX_SEL_ADVENTURE_JOURNAL_MAX_ID, + HOTFIX_SEL_ADVENTURE_JOURNAL_LOCALE, + HOTFIX_SEL_ANIMATION_DATA, HOTFIX_SEL_ANIMATION_DATA_MAX_ID, diff --git a/src/server/game/DataStores/DB2LoadInfo.h b/src/server/game/DataStores/DB2LoadInfo.h index 7af372f4fac..1e1b95b98f5 100644 --- a/src/server/game/DataStores/DB2LoadInfo.h +++ b/src/server/game/DataStores/DB2LoadInfo.h @@ -53,6 +53,43 @@ struct AchievementLoadInfo } }; +struct AdventureJournalLoadInfo +{ + static DB2LoadInfo const* Instance() + { + static DB2FieldMeta const fields[] = + { + { false, FT_INT, "ID" }, + { false, FT_STRING, "Name" }, + { false, FT_STRING, "Description" }, + { false, FT_STRING, "ButtonText" }, + { false, FT_STRING, "RewardDescription" }, + { false, FT_STRING, "ContinueDescription" }, + { false, FT_BYTE, "Type" }, + { false, FT_INT, "PlayerConditionId" }, + { false, FT_BYTE, "Flags" }, + { false, FT_BYTE, "ButtonActionType" }, + { true, FT_INT, "TextureFileDataId" }, + { false, FT_SHORT, "LfgDungeonId" }, + { true, FT_INT, "QuestId" }, + { false, FT_SHORT, "BattleMasterListId" }, + { false, FT_BYTE, "PriorityMin" }, + { false, FT_BYTE, "PriorityMax" }, + { true, FT_INT, "ItemId" }, + { false, FT_INT, "ItemQuantity" }, + { false, FT_SHORT, "CurrencyType" }, + { false, FT_INT, "CurrencyQuantity" }, + { false, FT_SHORT, "UiMapId" }, + { false, FT_INT, "BonusPlayerConditionId1" }, + { false, FT_INT, "BonusPlayerConditionId2" }, + { false, FT_BYTE, "BonusValue1" }, + { false, FT_BYTE, "BonusValue2" }, + }; + static DB2LoadInfo const loadInfo(&fields[0], std::extent<decltype(fields)>::value, AdventureJournalMeta::Instance(), HOTFIX_SEL_ADVENTURE_JOURNAL); + return &loadInfo; + } +}; + struct AnimationDataLoadInfo { static DB2LoadInfo const* Instance() diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index 21aa5f25cda..e92e3eccc99 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -42,6 +42,7 @@ #endif DB2Storage<AchievementEntry> sAchievementStore("Achievement.db2", AchievementLoadInfo::Instance()); +DB2Storage<AdventureJournalEntry> sAdventureJournalStore("AdventureJournal.db2", AdventureJournalLoadInfo::Instance()); DB2Storage<AnimationDataEntry> sAnimationDataStore("AnimationData.db2", AnimationDataLoadInfo::Instance()); DB2Storage<AnimKitEntry> sAnimKitStore("AnimKit.db2", AnimKitLoadInfo::Instance()); DB2Storage<AreaGroupMemberEntry> sAreaGroupMemberStore("AreaGroupMember.db2", AreaGroupMemberLoadInfo::Instance()); @@ -575,6 +576,7 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul #define LOAD_DB2(store) LoadDB2(availableDb2Locales, loadErrors, _stores, &store, db2Path, defaultLocale, GetCppRecordSize(store)) LOAD_DB2(sAchievementStore); + LOAD_DB2(sAdventureJournalStore); LOAD_DB2(sAnimationDataStore); LOAD_DB2(sAnimKitStore); LOAD_DB2(sAreaGroupMemberStore); diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h index dc4d0aa8c34..522ff49fa91 100644 --- a/src/server/game/DataStores/DB2Stores.h +++ b/src/server/game/DataStores/DB2Stores.h @@ -36,6 +36,7 @@ class DB2HotfixGeneratorBase; TC_GAME_API extern DB2Storage<AchievementEntry> sAchievementStore; +TC_GAME_API extern DB2Storage<AdventureJournalEntry> sAdventureJournalStore; TC_GAME_API extern DB2Storage<AnimationDataEntry> sAnimationDataStore; TC_GAME_API extern DB2Storage<AnimKitEntry> sAnimKitStore; TC_GAME_API extern DB2Storage<AreaTableEntry> sAreaTableStore; diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index 6a03d0d138c..bebc686f461 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -46,6 +46,33 @@ struct AchievementEntry int32 CovenantID; }; +struct AdventureJournalEntry +{ + uint32 ID; + LocalizedString Name; + LocalizedString Description; + LocalizedString ButtonText; + LocalizedString RewardDescription; + LocalizedString ContinueDescription; + uint8 Type; + uint32 PlayerConditionID; + uint8 Flags; + uint8 ButtonActionType; + int32 TextureFileDataID; + uint16 LfgDungeonID; + int32 QuestID; + uint16 BattleMasterListID; + uint8 PriorityMin; + uint8 PriorityMax; + int32 ItemID; + uint32 ItemQuantity; + uint16 CurrencyType; + uint32 CurrencyQuantity; + uint16 UiMapID; + int32 BonusPlayerConditionID[2]; + uint8 BonusValue[2]; +}; + struct AnimationDataEntry { uint32 ID; diff --git a/src/server/game/Handlers/AdventureJournalHandler.cpp b/src/server/game/Handlers/AdventureJournalHandler.cpp new file mode 100644 index 00000000000..bd7ea30e511 --- /dev/null +++ b/src/server/game/Handlers/AdventureJournalHandler.cpp @@ -0,0 +1,59 @@ +/*
+ * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "WorldSession.h"
+#include "AdventureJournalPackets.h"
+#include "DB2Stores.h"
+#include "GossipDef.h"
+#include "ObjectMgr.h"
+#include "Player.h"
+
+void WorldSession::HandleAdventureJournalOpenQuest(WorldPackets::AdventureJournal::AdventureJournalOpenQuest& openQuest)
+{
+ AdventureJournalEntry const* adventureJournal = sAdventureJournalStore.LookupEntry(openQuest.AdventureJournalID);
+ if (!adventureJournal)
+ return;
+
+ if (!_player->MeetPlayerCondition(adventureJournal->PlayerConditionID))
+ return;
+
+ Quest const* quest = sObjectMgr->GetQuestTemplate(adventureJournal->QuestID);
+ if (!quest)
+ return;
+
+ if (_player->CanTakeQuest(quest, true))
+ _player->PlayerTalkClass->SendQuestGiverQuestDetails(quest, _player->GetGUID(), true, false);
+}
+
+void WorldSession::HandleAdventureJournalUpdateSuggestions(WorldPackets::AdventureJournal::AdventureJournalUpdateSuggestions& updateSuggestions)
+{
+ WorldPackets::AdventureJournal::AdventureJournalDataResponse response;
+ response.OnLevelUp = updateSuggestions.OnLevelUp;
+
+ for (AdventureJournalEntry const* adventureJournal : sAdventureJournalStore)
+ {
+ if (_player->MeetPlayerCondition(adventureJournal->PlayerConditionID))
+ {
+ WorldPackets::AdventureJournal::AdventureJournalEntry adventureJournalData;
+ adventureJournalData.AdventureJournalID = int32(adventureJournal->ID);
+ adventureJournalData.Priority = int32(adventureJournal->PriorityMax);
+ response.Entries.push_back(adventureJournalData);
+ }
+ }
+
+ SendPacket(response.Write());
+}
diff --git a/src/server/game/Server/Packets/AdventureJournalPackets.cpp b/src/server/game/Server/Packets/AdventureJournalPackets.cpp new file mode 100644 index 00000000000..49f4b9e785d --- /dev/null +++ b/src/server/game/Server/Packets/AdventureJournalPackets.cpp @@ -0,0 +1,54 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "AdventureJournalPackets.h" + +namespace WorldPackets +{ +namespace AdventureJournal +{ +void AdventureJournalOpenQuest::Read() +{ + _worldPacket >> AdventureJournalID; +} + +void AdventureJournalUpdateSuggestions::Read() +{ + OnLevelUp = _worldPacket.ReadBit(); +} + +ByteBuffer& operator<<(ByteBuffer& data, AdventureJournalEntry const& adventureJournalEntry) +{ + data << int32(adventureJournalEntry.AdventureJournalID); + data << int32(adventureJournalEntry.Priority); + + return data; +} + +WorldPacket const* AdventureJournalDataResponse::Write() +{ + _worldPacket.WriteBit(OnLevelUp); + _worldPacket.FlushBits(); + _worldPacket << uint32(Entries.size()); + + for (AdventureJournalEntry const& adventureJournalEntry : Entries) + _worldPacket << adventureJournalEntry; + + return &_worldPacket; +} +} +} diff --git a/src/server/game/Server/Packets/AdventureJournalPackets.h b/src/server/game/Server/Packets/AdventureJournalPackets.h new file mode 100644 index 00000000000..b87638b929c --- /dev/null +++ b/src/server/game/Server/Packets/AdventureJournalPackets.h @@ -0,0 +1,66 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef AdventureJournalPackets_h__ +#define AdventureJournalPackets_h__ + +#include "Packet.h" + +namespace WorldPackets +{ + namespace AdventureJournal + { + class AdventureJournalOpenQuest final : public ClientPacket + { + public: + AdventureJournalOpenQuest(WorldPacket&& packet) : ClientPacket(CMSG_ADVENTURE_JOURNAL_OPEN_QUEST, std::move(packet)) { } + + void Read() override; + + int32 AdventureJournalID = 0; + }; + + class AdventureJournalUpdateSuggestions final : public ClientPacket + { + public: + AdventureJournalUpdateSuggestions(WorldPacket&& packet) : ClientPacket(CMSG_ADVENTURE_JOURNAL_UPDATE_SUGGESTIONS, std::move(packet)) { } + + void Read() override; + + bool OnLevelUp = false; + }; + + struct AdventureJournalEntry + { + int32 AdventureJournalID = 0; + int32 Priority = 0; + }; + + class AdventureJournalDataResponse final : public ServerPacket + { + public: + AdventureJournalDataResponse() : ServerPacket(SMSG_ADVENTURE_JOURNAL_DATA_RESPONSE, 7) { } + + WorldPacket const* Write() override; + + bool OnLevelUp = false; + std::vector<AdventureJournalEntry> Entries; + }; + } +} + +#endif // AdventureJournalPackets_h__ diff --git a/src/server/game/Server/Packets/AllPackets.h b/src/server/game/Server/Packets/AllPackets.h index e095cd30f6a..2f7d09f732d 100644 --- a/src/server/game/Server/Packets/AllPackets.h +++ b/src/server/game/Server/Packets/AllPackets.h @@ -20,6 +20,7 @@ #include "AchievementPackets.h" #include "AddonPackets.h" +#include "AdventureJournalPackets.h" #include "AreaTriggerPackets.h" #include "ArtifactPackets.h" #include "AuctionHousePackets.h" diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index 94aa90fbc11..91942f5937d 100644 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -141,9 +141,9 @@ void OpcodeTable::Initialize() DEFINE_HANDLER(CMSG_ADD_FRIEND, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleAddFriendOpcode); DEFINE_HANDLER(CMSG_ADD_IGNORE, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleAddIgnoreOpcode); DEFINE_HANDLER(CMSG_ADD_TOY, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleAddToy); - DEFINE_HANDLER(CMSG_ADVENTURE_JOURNAL_OPEN_QUEST, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); + DEFINE_HANDLER(CMSG_ADVENTURE_JOURNAL_OPEN_QUEST, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleAdventureJournalOpenQuest); DEFINE_HANDLER(CMSG_ADVENTURE_JOURNAL_START_QUEST, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_ADVENTURE_JOURNAL_UPDATE_SUGGESTIONS, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); + DEFINE_HANDLER(CMSG_ADVENTURE_JOURNAL_UPDATE_SUGGESTIONS, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleAdventureJournalUpdateSuggestions); DEFINE_HANDLER(CMSG_ALTER_APPEARANCE, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleAlterAppearance); DEFINE_HANDLER(CMSG_AREA_SPIRIT_HEALER_QUERY, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleAreaSpiritHealerQueryOpcode); DEFINE_HANDLER(CMSG_AREA_SPIRIT_HEALER_QUEUE, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleAreaSpiritHealerQueueOpcode); @@ -934,7 +934,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_ADD_LOSS_OF_CONTROL, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ADD_RUNE_POWER, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ADJUST_SPLINE_DURATION, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_ADVENTURE_JOURNAL_DATA_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_ADVENTURE_JOURNAL_DATA_RESPONSE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ADVENTURE_MAP_OPEN_NPC, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_AE_LOOT_TARGETS, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_AE_LOOT_TARGET_ACK, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 139a2afa9a0..aabd13e98c9 100644 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -92,6 +92,12 @@ namespace WorldPackets class GuildGetAchievementMembers; } + namespace AdventureJournal + { + class AdventureJournalOpenQuest; + class AdventureJournalUpdateSuggestions; + } + namespace AreaTrigger { class AreaTrigger; @@ -1680,6 +1686,10 @@ class TC_GAME_API WorldSession void HandleRequestCategoryCooldowns(WorldPackets::Spells::RequestCategoryCooldowns& requestCategoryCooldowns); void HandleCloseInteraction(WorldPackets::Misc::CloseInteraction& closeInteraction); + // Adventure Journal + void HandleAdventureJournalOpenQuest(WorldPackets::AdventureJournal::AdventureJournalOpenQuest& openQuest); + void HandleAdventureJournalUpdateSuggestions(WorldPackets::AdventureJournal::AdventureJournalUpdateSuggestions& updateSuggestions); + // Toys void HandleAddToy(WorldPackets::Toy::AddToy& packet); void HandleUseToy(WorldPackets::Toy::UseToy& packet); |