From 6e34b0a9ae26743867083bce9bbb9c7948cc60ec Mon Sep 17 00:00:00 2001 From: Kinglykrab Date: Tue, 1 Jul 2025 18:45:27 -0400 Subject: [PATCH] Remove duplicates --- zone/lua_parser_events.cpp | 14 ------ zone/quest_parser_collection.cpp | 75 -------------------------------- 2 files changed, 89 deletions(-) diff --git a/zone/lua_parser_events.cpp b/zone/lua_parser_events.cpp index 793caa641..153775e78 100644 --- a/zone/lua_parser_events.cpp +++ b/zone/lua_parser_events.cpp @@ -3018,20 +3018,6 @@ void handle_zone_enter( lua_setfield(L, -2, "other"); } -void handle_zone_enter( - QuestInterface *parse, - lua_State* L, - Zone* zone, - std::string data, - uint32 extra_data, - std::vector *extra_pointers -) { - Lua_Client l_client(std::any_cast(extra_pointers->at(0))); - luabind::adl::object l_client_o = luabind::adl::object(L, l_client); - l_client_o.push(L); - lua_setfield(L, -2, "other"); -} - void handle_zone_loot( QuestInterface *parse, lua_State* L, diff --git a/zone/quest_parser_collection.cpp b/zone/quest_parser_collection.cpp index 78b81a0c2..9535cb89a 100644 --- a/zone/quest_parser_collection.cpp +++ b/zone/quest_parser_collection.cpp @@ -1630,81 +1630,6 @@ QuestInterface* QuestParserCollection::GetQIByGlobalZoneQuest(std::string& filen return nullptr; } -QuestInterface* QuestParserCollection::GetQIByZoneQuest(std::string& filename) -{ - if (!zone || !zone->IsLoaded()) { - return nullptr; - } - - const std::string& global_path = fmt::format( - "{}/{}", - path.GetQuestsPath(), - QUEST_GLOBAL_DIRECTORY - ); - - const std::string& zone_path = fmt::format( - "{}/{}", - path.GetQuestsPath(), - zone->GetShortName() - ); - - const std::string& zone_versioned_path = fmt::format( - "{}/{}/v{}", - path.GetQuestsPath(), - zone->GetShortName(), - zone->GetInstanceVersion() - ); - - std::vector file_names = { - fmt::format("{}/zone", zone_versioned_path), // Local versioned by Instance Version ./quests/zone/v0/zone.ext - fmt::format("{}/zone_v{}", zone_path, zone->GetInstanceVersion()), // Local by Instance Version - fmt::format("{}/zone", zone_path), // Local - fmt::format("{}/zone", global_path) // Global - }; - - std::string file_name; - for (auto & file : file_names) { - for (auto* e: _load_precedence) { - file_name = fmt::format( - "{}.{}", - file, - _extensions.find(e->GetIdentifier())->second - ); - - if (File::Exists(file_name)) { - filename = file_name; - return e; - } - } - } - - return nullptr; -} - -QuestInterface* QuestParserCollection::GetQIByGlobalZoneQuest(std::string& filename) -{ - if (!zone) { - return nullptr; - } - - std::string file_name; - for (auto* e: _load_precedence) { - file_name = fmt::format( - "{}/{}/global_zone.{}", - path.GetQuestsPath(), - QUEST_GLOBAL_DIRECTORY, - _extensions.find(e->GetIdentifier())->second - ); - - if (File::Exists(file_name)) { - filename = file_name; - return e; - } - } - - return nullptr; -} - void QuestParserCollection::GetErrors(std::list& quest_errors) { quest_errors.clear();