fix bug where descriptions were j

This commit is contained in:
winter 2023-01-08 17:00:30 +09:00
parent 0338fd5f0d
commit b99d181707
1 changed files with 4 additions and 1 deletions

View File

@ -82,11 +82,14 @@ CrystalGauntlet.endpoints["/downloadGJLevel22.php"] = ->(context : HTTP::Server:
password = "0"
elsif Versions.parse(params["gameVersion"]? || "19") >= Versions::V2_0
xor_pass = Base64.urlsafe_encode(XorCrypt.encrypt_string(password, "26364"))
description = Base64.urlsafe_encode(description)
else
xor_pass = password
end
if Versions.parse(params["gameVersion"]? || "19") >= Versions::V2_0
description = Base64.urlsafe_encode(description)
end
level_data = Base64.urlsafe_encode(File.read(DATA_FOLDER / "levels" / "#{id}.lvl"))
# todo: deduplicate this with getLevels?