Skip to content

Commit

Permalink
fix: map paths
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Apr 11, 2024
1 parent 89f1744 commit 8319f29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
6 changes: 1 addition & 5 deletions src/map/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 8319f29

Please sign in to comment.