Fixing decks with foil or tengwar cards crashing the render. Banned users now see a 401 instead of a 404
This commit is contained in:
@@ -96,7 +96,7 @@ public class GempukkuHttpRequestHandler extends SimpleChannelInboundHandler<Full
|
||||
|
||||
try {
|
||||
if (isBanned(requestInformation.remoteIp))
|
||||
responseSender.writeError(404);
|
||||
responseSender.writeError(401);
|
||||
else
|
||||
_uriRequestHandler.handleRequest(uri, httpRequest, _objects, responseSender, requestInformation.remoteIp);
|
||||
} catch (HttpProcessingException exp) {
|
||||
|
||||
@@ -398,7 +398,8 @@ public class DeckRequestHandler extends LotroServerRequestHandler implements Uri
|
||||
|
||||
private String generateCardTooltip(LotroCardBlueprint bp, String bpid) throws CardNotFoundException {
|
||||
String[] parts = bpid.split("_");
|
||||
String tlhhID = "LOTR" + String.format("%02d", Integer.parseInt(parts[0])) + String.format("%03d", Integer.parseInt(parts[1]));
|
||||
String cardnum = parts[0].replace("*", "").replace("T", "");
|
||||
String tlhhID = "LOTR" + String.format("%02d", Integer.parseInt(cardnum)) + String.format("%03d", Integer.parseInt(parts[1]));
|
||||
String result = "<span class=\"tooltip\">" + GameUtils.getFullName(bp)
|
||||
+ "<span><img class=\"ttimage\" src=\"https://i.lotrtcgpc.net/decipher/" + tlhhID + ".jpg\" ></span></span>";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user