diff options
author | Ovahlord <dreadkiller@gmx.de> | 2024-06-25 20:20:09 +0200 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2024-06-25 20:20:09 +0200 |
commit | 166aec66ba80e01a9a861727e69d2dda73779262 (patch) | |
tree | 4d5d0a881a3854c74fe5a34658db743a3f487042 /src/server/game/Handlers/AdventureMapHandler.cpp | |
parent | dc67de6b1b921856e30c53d368a584438d99f677 (diff) |
Core/Misc: dropped several db2 storages which are empty/unused in classic and removed many unused opcode handlers and packet classes
Diffstat (limited to 'src/server/game/Handlers/AdventureMapHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/AdventureMapHandler.cpp | 47 |
1 files changed, 2 insertions, 45 deletions
diff --git a/src/server/game/Handlers/AdventureMapHandler.cpp b/src/server/game/Handlers/AdventureMapHandler.cpp index 4d2ae827613..c628f6b229f 100644 --- a/src/server/game/Handlers/AdventureMapHandler.cpp +++ b/src/server/game/Handlers/AdventureMapHandler.cpp @@ -17,54 +17,11 @@ #include "WorldSession.h" #include "AdventureMapPackets.h" -#include "DB2Stores.h" -#include "ObjectMgr.h" -#include "Player.h" -void WorldSession::HandleCheckIsAdventureMapPoiValid(WorldPackets::AdventureMap::CheckIsAdventureMapPoiValid& checkIsAdventureMapPoiValid) +void WorldSession::HandleCheckIsAdventureMapPoiValid(WorldPackets::AdventureMap::CheckIsAdventureMapPoiValid& /*checkIsAdventureMapPoiValid*/) { - AdventureMapPOIEntry const* entry = sAdventureMapPOIStore.LookupEntry(checkIsAdventureMapPoiValid.AdventureMapPoiID); - if (!entry) - return; - - auto sendIsPoiValid = [this](uint32 adventureMapPoiId, bool isVisible) -> void - { - WorldPackets::AdventureMap::PlayerIsAdventureMapPoiValid isMapPoiValid; - isMapPoiValid.AdventureMapPoiID = adventureMapPoiId; - isMapPoiValid.IsVisible = isVisible; - SendPacket(isMapPoiValid.Write()); - }; - - Quest const* quest = sObjectMgr->GetQuestTemplate(entry->QuestID); - if (!quest) - { - sendIsPoiValid(entry->ID, false); - return; - } - - if (!_player->MeetPlayerCondition(entry->PlayerConditionID)) - { - sendIsPoiValid(entry->ID, false); - return; - } - - sendIsPoiValid(entry->ID, true); } -void WorldSession::HandleAdventureMapStartQuest(WorldPackets::AdventureMap::AdventureMapStartQuest& startQuest) +void WorldSession::HandleAdventureMapStartQuest(WorldPackets::AdventureMap::AdventureMapStartQuest& /*startQuest*/) { - Quest const* quest = sObjectMgr->GetQuestTemplate(startQuest.QuestID); - if (!quest) - return; - - auto itr = std::find_if(sAdventureMapPOIStore.begin(), sAdventureMapPOIStore.end(), [&](AdventureMapPOIEntry const* adventureMap) - { - return adventureMap->QuestID == uint32(startQuest.QuestID) && _player->MeetPlayerCondition(adventureMap->PlayerConditionID); - }); - - if (itr == sAdventureMapPOIStore.end()) - return; - - if (_player->CanTakeQuest(quest, true)) - _player->AddQuestAndCheckCompletion(quest, _player); } |