From 8319f29ad4c62d70587eb7f9c1d073e4d55219c0 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Thu, 11 Apr 2024 19:20:56 -0300 Subject: [PATCH] fix: map paths --- .../quests/soul_war/soul_war_mechanics.lua | 16 ++++++++-------- src/map/map.cpp | 6 +----- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/data-otservbr-global/scripts/quests/soul_war/soul_war_mechanics.lua b/data-otservbr-global/scripts/quests/soul_war/soul_war_mechanics.lua index ebf390e6c7b..488183fa94e 100644 --- a/data-otservbr-global/scripts/quests/soul_war/soul_war_mechanics.lua +++ b/data-otservbr-global/scripts/quests/soul_war/soul_war_mechanics.lua @@ -322,21 +322,21 @@ setTaint:separator(" ") setTaint:groupType("god") setTaint:register() -local setTaint = TalkAction("/changeflowmap") +local changeMap = TalkAction("/changeflowmap") -function setTaint.onSay(player, words, param) +function changeMap.onSay(player, words, param) if param == "empty" then - Game.loadMap("data-otservbr-global/world/quest/soul_war/ebb_and_flow/empty.otbm") + Game.loadMap(SoulWarQuest.mapsPath.empty) elseif param == "inundate" then - Game.loadMap("data-otservbr-global/world/quest/soul_war/ebb_and_flow/inundate.otbm") + Game.loadMap(SoulWarQuest.mapsPath.inundate) elseif param == "ebb" then - Game.loadMap("data-otservbr-global/world/quest/soul_war/ebb_and_flow/ebb_and_flow.otbm") + Game.loadMap(SoulWarQuest.mapsPath.ebbFlow) end end -setTaint:separator(" ") -setTaint:groupType("god") -setTaint:register() +changeMap:separator(" ") +changeMap:groupType("god") +changeMap:register() local hazardousPhantomDeath = CreatureEvent("HazardousPhantomDeath") diff --git a/src/map/map.cpp b/src/map/map.cpp index 55bb0fc6548..d5a510c33a7 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -27,11 +27,7 @@ void Map::load(const std::string &identifier, const Position &pos) { path = identifier; IOMap::loadMap(this, pos); } catch (const std::exception &e) { - throw IOMapException(fmt::format( - "\n[Map::load] - The map in folder {} is missing or corrupted" - "\n - {}", - identifier, e.what() - )); + g_logger().warn("[Map::load] - The map in folder {} is missing or corrupted", identifier); } }