Packs are in order.
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
1x6_49
|
||||
1x6_38
|
||||
1x6_39
|
||||
2x5_121
|
||||
2x6_121
|
||||
1x6_52
|
||||
3x4_306
|
||||
1x6_54
|
||||
|
||||
@@ -17,4 +17,5 @@ TTT - Theoden Starter
|
||||
BoHD - Eowyn Starter
|
||||
BoHD - Legolas Starter
|
||||
EoF - Faramir Starter
|
||||
EoF - Witch-king Starter
|
||||
EoF - Witch-king Starter
|
||||
(S)TTT - Starter
|
||||
@@ -22,6 +22,7 @@ import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Singleton
|
||||
@Path("/collection")
|
||||
@@ -179,11 +180,11 @@ public class CollectionResource extends AbstractResource {
|
||||
Element collectionElem = doc.createElement("pack");
|
||||
doc.appendChild(collectionElem);
|
||||
|
||||
for (CardCollection.Item item : packContents.getItems(null, _library)) {
|
||||
String blueprintId = item.getBlueprintId();
|
||||
if (item.getType() == CardCollection.Item.Type.CARD) {
|
||||
for (Map.Entry<String, Integer> itemCount : packContents.getAll().entrySet()) {
|
||||
String blueprintId = itemCount.getKey();
|
||||
if (blueprintId.contains("_")) {
|
||||
Element card = doc.createElement("card");
|
||||
card.setAttribute("count", String.valueOf(item.getCount()));
|
||||
card.setAttribute("count", String.valueOf(itemCount.getValue()));
|
||||
card.setAttribute("blueprintId", blueprintId);
|
||||
Side side = _library.getLotroCardBlueprint(blueprintId).getSide();
|
||||
if (side != null)
|
||||
@@ -191,7 +192,7 @@ public class CollectionResource extends AbstractResource {
|
||||
collectionElem.appendChild(card);
|
||||
} else {
|
||||
Element pack = doc.createElement("pack");
|
||||
pack.setAttribute("count", String.valueOf(item.getCount()));
|
||||
pack.setAttribute("count", String.valueOf(itemCount.getValue()));
|
||||
pack.setAttribute("blueprintId", blueprintId);
|
||||
collectionElem.appendChild(pack);
|
||||
}
|
||||
|
||||
@@ -45,16 +45,16 @@ public class DeliveryResource extends AbstractResource {
|
||||
|
||||
Element collectionTypeElem = doc.createElement("collectionType");
|
||||
collectionTypeElem.setAttribute("name", collectionType);
|
||||
for (CardCollection.Item item : items.getItems(null, _library)) {
|
||||
String blueprintId = item.getBlueprintId();
|
||||
if (item.getType() == CardCollection.Item.Type.CARD) {
|
||||
for (Map.Entry<String, Integer> itemCount : items.getAll().entrySet()) {
|
||||
String blueprintId = itemCount.getKey();
|
||||
if (blueprintId.contains("_")) {
|
||||
Element card = doc.createElement("card");
|
||||
card.setAttribute("count", String.valueOf(item.getCount()));
|
||||
card.setAttribute("count", String.valueOf(itemCount.getValue()));
|
||||
card.setAttribute("blueprintId", blueprintId);
|
||||
collectionTypeElem.appendChild(card);
|
||||
} else {
|
||||
Element pack = doc.createElement("pack");
|
||||
pack.setAttribute("count", String.valueOf(item.getCount()));
|
||||
pack.setAttribute("count", String.valueOf(itemCount.getValue()));
|
||||
pack.setAttribute("blueprintId", blueprintId);
|
||||
collectionTypeElem.appendChild(pack);
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
@@ -6,7 +6,7 @@ var CardGroup = Class.extend({
|
||||
height: null,
|
||||
belongTestFunc: null,
|
||||
padding: 5,
|
||||
maxCardHeight: null,
|
||||
maxCardHeight: 497,
|
||||
descDiv: null,
|
||||
|
||||
init: function(container, belongTest, createDiv) {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
var cardCache = {};
|
||||
var cardScale = 357 / 497;
|
||||
var packBlueprints = {
|
||||
"(S)FotR - Tengwar": "/gemp-lotr/images/boosters/fotr_tengwar_selection.png",
|
||||
"(S)TTT - Starter": "/gemp-lotr/images/boosters/ttt_starter_selection.png",
|
||||
|
||||
"FotR - League Starter": "/gemp-lotr/images/boosters/fotr_league_starter.png",
|
||||
|
||||
"FotR - Gandalf Starter": "/gemp-lotr/images/boosters/fotr_gandalf_starter.png",
|
||||
@@ -25,7 +28,7 @@ var packBlueprints = {
|
||||
|
||||
"EoF - Faramir Starter": "/gemp-lotr/images/boosters/eof_faramir_starter.png",
|
||||
"EoF - Witch-king Starter": "/gemp-lotr/images/boosters/eof_witch_king_starter.png",
|
||||
"EoF - Booster": "/gemp-lotr/images/boosters/eof_booster.png",
|
||||
"EoF - Booster": "/gemp-lotr/images/boosters/eof_booster.png"
|
||||
};
|
||||
|
||||
var Card = Class.extend({
|
||||
@@ -121,8 +124,6 @@ var Card = Class.extend({
|
||||
},
|
||||
|
||||
getUrlByBlueprintId: function(blueprintId) {
|
||||
if (blueprintId.substr(0, 3) == "(S)")
|
||||
return "/gemp-lotr/images/boosters/selection.png";
|
||||
if (packBlueprints[blueprintId] != null)
|
||||
return packBlueprints[blueprintId];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user