mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Import data from mtgjson's allsets.xml
* add multiverse id to cards.xml * remove pictures urls from cards.xml TBD: * fix/clean oracle’s gui * add support in cockatrice
This commit is contained in:
parent
0d3ec71e8f
commit
f3a57d5506
5 changed files with 193 additions and 268 deletions
|
|
@ -406,12 +406,27 @@ QXmlStreamWriter &operator<<(QXmlStreamWriter &xml, const CardInfo *info)
|
|||
xml.writeTextElement("name", info->getName());
|
||||
|
||||
const SetList &sets = info->getSets();
|
||||
QString tmpString;
|
||||
QString tmpSet;
|
||||
for (int i = 0; i < sets.size(); i++) {
|
||||
xml.writeStartElement("set");
|
||||
xml.writeAttribute("picURL", info->getPicURL(sets[i]->getShortName()));
|
||||
xml.writeAttribute("picURLHq", info->getPicURLHq(sets[i]->getShortName()));
|
||||
xml.writeAttribute("picURLSt", info->getPicURLSt(sets[i]->getShortName()));
|
||||
xml.writeCharacters(sets[i]->getShortName());
|
||||
|
||||
tmpSet=sets[i]->getShortName();
|
||||
xml.writeAttribute("muId", QString::number(info->getMuId(tmpSet)));
|
||||
|
||||
tmpString = info->getPicURL(tmpSet);
|
||||
if(!tmpString.isEmpty())
|
||||
xml.writeAttribute("picURL", tmpString);
|
||||
|
||||
tmpString = info->getPicURLHq(tmpSet);
|
||||
if(!tmpString.isEmpty())
|
||||
xml.writeAttribute("picURLHq", tmpString);
|
||||
|
||||
tmpString = info->getPicURLSt(tmpSet);
|
||||
if(!tmpString.isEmpty())
|
||||
xml.writeAttribute("picURLSt", tmpString);
|
||||
|
||||
xml.writeCharacters(tmpSet);
|
||||
xml.writeEndElement();
|
||||
}
|
||||
const QStringList &colors = info->getColors();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue