Card erratas.
@@ -44,7 +44,6 @@ public class LeagueDAO {
|
|||||||
PreparedStatement statement = conn.prepareStatement("select id, name, type, class, parameters, status, cost from league where end>=? order by start desc");
|
PreparedStatement statement = conn.prepareStatement("select id, name, type, class, parameters, status, cost from league where end>=? order by start desc");
|
||||||
try {
|
try {
|
||||||
statement.setInt(1, currentTime);
|
statement.setInt(1, currentTime);
|
||||||
statement.setInt(2, currentTime);
|
|
||||||
ResultSet rs = statement.executeQuery();
|
ResultSet rs = statement.executeQuery();
|
||||||
try {
|
try {
|
||||||
List<League> activeLeagues = new ArrayList<League>();
|
List<League> activeLeagues = new ArrayList<League>();
|
||||||
|
|||||||
|
After Width: | Height: | Size: 382 KiB |
|
After Width: | Height: | Size: 404 KiB |
|
After Width: | Height: | Size: 349 KiB |
|
After Width: | Height: | Size: 352 KiB |
|
After Width: | Height: | Size: 331 KiB |
|
After Width: | Height: | Size: 358 KiB |
|
After Width: | Height: | Size: 331 KiB |
|
After Width: | Height: | Size: 340 KiB |
|
After Width: | Height: | Size: 357 KiB |
|
After Width: | Height: | Size: 400 KiB |
|
After Width: | Height: | Size: 356 KiB |
|
After Width: | Height: | Size: 358 KiB |
|
After Width: | Height: | Size: 345 KiB |
|
After Width: | Height: | Size: 368 KiB |
|
After Width: | Height: | Size: 364 KiB |
|
After Width: | Height: | Size: 350 KiB |
|
After Width: | Height: | Size: 360 KiB |
|
After Width: | Height: | Size: 369 KiB |
|
After Width: | Height: | Size: 373 KiB |
|
After Width: | Height: | Size: 398 KiB |
|
After Width: | Height: | Size: 380 KiB |
|
After Width: | Height: | Size: 363 KiB |
@@ -203,13 +203,33 @@ var Card = Class.extend({
|
|||||||
var setNo = parseInt(blueprintId.substr(0, separator));
|
var setNo = parseInt(blueprintId.substr(0, separator));
|
||||||
var cardNo = parseInt(blueprintId.substr(separator + 1));
|
var cardNo = parseInt(blueprintId.substr(separator + 1));
|
||||||
|
|
||||||
|
var errata = this.getErrata(setNo, cardNo);
|
||||||
|
if (errata != null)
|
||||||
|
return errata;
|
||||||
|
|
||||||
var mainLocation = this.getMainLocation(setNo, cardNo);
|
var mainLocation = this.getMainLocation(setNo, cardNo);
|
||||||
|
|
||||||
|
var cardStr;
|
||||||
|
|
||||||
|
if (this.isMasterworks(setNo, cardNo))
|
||||||
|
cardStr = this.formatSetNo(setNo) + "O0" + (cardNo - this.getMasterworksOffset(setNo));
|
||||||
|
else
|
||||||
|
cardStr = this.formatCardNo(setNo, cardNo);
|
||||||
|
|
||||||
|
return mainLocation + "LOTR" + cardStr + (this.isTengwar() ? "T" : "") + ".jpg";
|
||||||
|
},
|
||||||
|
|
||||||
|
formatSetNo: function(setNo) {
|
||||||
var setNoStr;
|
var setNoStr;
|
||||||
if (setNo < 10)
|
if (setNo < 10)
|
||||||
setNoStr = "0" + setNo;
|
setNoStr = "0" + setNo;
|
||||||
else
|
else
|
||||||
setNoStr = setNo;
|
setNoStr = setNo;
|
||||||
|
return setNoStr;
|
||||||
|
},
|
||||||
|
|
||||||
|
formatCardNo: function(setNo, cardNo) {
|
||||||
|
var setNoStr = this.formatSetNo(setNo);
|
||||||
|
|
||||||
var cardStr;
|
var cardStr;
|
||||||
if (cardNo < 10)
|
if (cardNo < 10)
|
||||||
@@ -219,16 +239,10 @@ var Card = Class.extend({
|
|||||||
else
|
else
|
||||||
cardStr = setNoStr + "" + cardNo;
|
cardStr = setNoStr + "" + cardNo;
|
||||||
|
|
||||||
if (this.isMasterworks(setNo, cardNo))
|
return cardStr;
|
||||||
cardStr = setNoStr + "O0" + (cardNo - this.getMasterworksOffset(setNo));
|
|
||||||
|
|
||||||
return mainLocation + "LOTR" + cardStr + (this.isTengwar() ? "T" : "") + ".jpg";
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getMainLocation: function(setNo, cardNo) {
|
getMainLocation: function(setNo, cardNo) {
|
||||||
if (this.isErrata(setNo, cardNo))
|
|
||||||
return "/gemp-lotr/images/erratas/";
|
|
||||||
else
|
|
||||||
return "http://lotrtcgdb.com/images/";
|
return "http://lotrtcgdb.com/images/";
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -254,13 +268,22 @@ var Card = Class.extend({
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
isErrata: function(setNo, cardNo) {
|
pngErratas: {
|
||||||
if (setNo == 0)
|
"1":[3,55,113,235,318],
|
||||||
return cardNo == 7;
|
"3":[48],
|
||||||
else if (setNo == 1)
|
"4":[236,237],
|
||||||
return cardNo == 12 || cardNo == 43 || cardNo == 46;
|
"18":[8,12,25,35,48,50,77,78,79,80,94,97]
|
||||||
else
|
},
|
||||||
return false;
|
|
||||||
|
getErrata: function(setNo, cardNo) {
|
||||||
|
if (setNo == 0 && cardNo == 7)
|
||||||
|
return "/gemp-lotr/images/erratas/LOTR00007.jpg";
|
||||||
|
if (setNo == 1 && (cardNo == 12 || cardNo == 43 || cardNo == 46))
|
||||||
|
return "/gemp-lotr/images/erratas/LOTR010" + cardNo + ".jpg";
|
||||||
|
|
||||||
|
if (this.pngErratas["" + setNo] != null && $.inArray(cardNo, this.pngErratas["" + setNo]) != -1)
|
||||||
|
return "/gemp-lotr/images/erratas/LOTR" + this.formatCardNo(setNo, cardNo) + ".png";
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
getHeightForWidth: function(width) {
|
getHeightForWidth: function(width) {
|
||||||
|
|||||||