Assigning the blueprintId to card only after it is sanitized. Fixes problem with fake card numbers, like "Hunters" Forth the Three Hunters! with different culture versions, when in foil version.

This commit is contained in:
marcins78
2012-10-16 23:55:06 +00:00
parent 42ab1638e9
commit 2a13ce80d0

View File

@@ -117,8 +117,6 @@ var Card = Class.extend({
errata:null,
init:function (blueprintId, zone, cardId, owner, siteNumber) {
this.blueprintId = blueprintId;
var len = blueprintId.length;
this.foil = blueprintId.substring(len - 1, len) == "*";
if (this.foil)
@@ -128,6 +126,8 @@ var Card = Class.extend({
if (this.tengwar)
blueprintId = blueprintId.substring(0, len - 1);
this.blueprintId = blueprintId;
this.zone = zone;
this.cardId = cardId;
this.owner = owner;