boosters fix
This commit is contained in:
parent
6e685f9a79
commit
56a127aafc
@ -31,6 +31,7 @@ public class OpenBooster extends ClientRequestParser {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
// TODO: optimize this
|
// TODO: optimize this
|
||||||
|
// TODO: union dbf cards and cardsxml0 into one list
|
||||||
List<Protocol.BoosterCard> l = Util.getRandomItems(conn.getDbfConfig().getCardsXML().findEntitiesByTagVal(GameTag.CARD_SET, 3).stream().filter(p -> {
|
List<Protocol.BoosterCard> l = Util.getRandomItems(conn.getDbfConfig().getCardsXML().findEntitiesByTagVal(GameTag.CARD_SET, 3).stream().filter(p -> {
|
||||||
Optional<DBFCard> c = conn.getDbfConfig().getCards().findWithMiniGuid(p.getCardId());
|
Optional<DBFCard> c = conn.getDbfConfig().getCards().findWithMiniGuid(p.getCardId());
|
||||||
return c.isPresent() && c.get().findField("IS_COLLECTIBLE").isPresent() && c.get().findField("IS_COLLECTIBLE").get().getVal().equals("True");
|
return c.isPresent() && c.get().findField("IS_COLLECTIBLE").isPresent() && c.get().findField("IS_COLLECTIBLE").get().getVal().equals("True");
|
||||||
@ -52,34 +53,6 @@ public class OpenBooster extends ClientRequestParser {
|
|||||||
.addAllList(l)
|
.addAllList(l)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
/* Protocol.BoosterContent response = Protocol.BoosterContent.newBuilder()
|
|
||||||
.addList(Protocol.BoosterCard.newBuilder()
|
|
||||||
.setCardDef(Protocol.CardDef.newBuilder()
|
|
||||||
.setAsset(459)
|
|
||||||
.setPremium(1))
|
|
||||||
.setInsertDate(d))
|
|
||||||
.addList(Protocol.BoosterCard.newBuilder()
|
|
||||||
.setCardDef(Protocol.CardDef.newBuilder()
|
|
||||||
.setAsset(457)
|
|
||||||
.setPremium(1))
|
|
||||||
.setInsertDate(d))
|
|
||||||
.addList(Protocol.BoosterCard.newBuilder()
|
|
||||||
.setCardDef(Protocol.CardDef.newBuilder()
|
|
||||||
.setAsset(777)
|
|
||||||
.setPremium(1))
|
|
||||||
.setInsertDate(d))
|
|
||||||
.addList(Protocol.BoosterCard.newBuilder()
|
|
||||||
.setCardDef(Protocol.CardDef.newBuilder()
|
|
||||||
.setAsset(459)
|
|
||||||
.setPremium(1))
|
|
||||||
.setInsertDate(d))
|
|
||||||
.addList(Protocol.BoosterCard.newBuilder()
|
|
||||||
.setCardDef(Protocol.CardDef.newBuilder()
|
|
||||||
.setAsset(459)
|
|
||||||
.setPremium(0))
|
|
||||||
.setInsertDate(d))
|
|
||||||
.build();*/
|
|
||||||
|
|
||||||
Protocol.Notification n = generateNotification(226, response.toByteString(), response.getSerializedSize());
|
Protocol.Notification n = generateNotification(226, response.toByteString(), response.getSerializedSize());
|
||||||
|
|
||||||
Protocol.Header header = Protocol.Header.newBuilder()
|
Protocol.Header header = Protocol.Header.newBuilder()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user