modified debug string for card id collision
This commit is contained in:
@@ -395,7 +395,9 @@ bool MTGAllCards::addCardToCollection(MTGCard * card, int setId){
|
||||
if (collection.find(newId) != collection.end()){
|
||||
#if defined (_DEBUG)
|
||||
char outBuf[4096];
|
||||
sprintf(outBuf,"warning, card id collision! : %i -> %s (%s) \n", newId, card->data->name.c_str(), setlist.getInfo( setId )->getName().c_str());
|
||||
string cardName = card->data ? card->data->name : card->getImageName();
|
||||
string setName = setId != -1 ? setlist.getInfo( setId ) -> getName() : "";
|
||||
sprintf(outBuf,"warning, card id collision! : %i -> %s (%s) \n", newId, cardName.c_str(), setName.c_str());
|
||||
OutputDebugString(outBuf);
|
||||
#endif
|
||||
SAFE_DELETE(card);
|
||||
@@ -816,7 +818,7 @@ MTGSetInfo* MTGSets::randomSet(int blockId, int atleast){
|
||||
free(unlocked);
|
||||
return NULL;
|
||||
}
|
||||
int blockSize(int blockId);
|
||||
int blockSize(int blockId);
|
||||
|
||||
int MTGSets::Add(const char * name){
|
||||
int setid = findSet(name);
|
||||
@@ -965,4 +967,4 @@ void MTGSetInfo::processConfLine(string line){
|
||||
block = setlist.findBlock(value.c_str());
|
||||
else if(key.compare("year") == 0)
|
||||
year = atoi(value.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user