Skip to content

Commit

Permalink
Fix for GVG patch, they changed the DB format again.
Browse files Browse the repository at this point in the history
  • Loading branch information
bru7us committed Dec 16, 2014
1 parent 532a2dc commit 59de402
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions HS-DeckTrack.app/Contents/Resources/Scripts/HS-DeckTrack
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,16 @@ sub load_cache_db {
my $xmldata;

if ( -e $cards_db ) {
$xmldata = $xml->XMLin($cards_db, KeyAttr => { Entity => 'CardID', Tag => 'name' }) or $load_failed = 1;
$xmldata = $xml->XMLin($cards_db, KeyAttr => { Entity => 'CardID', Tag => 'enumID' }) or $load_failed = 1;
} else {
$load_failed = 1;
}

if (!$load_failed) {
foreach my $entity ( keys $xmldata->{Entity} ) {
if (!($entity =~ m/XXX/)) {
my $tmpname = $xmldata->{Entity}->{$entity}->{Tag}->{CardName}->{content} // 0;
my $tmpcost = $xmldata->{Entity}->{$entity}->{Tag}->{Cost}->{value} // '-1';
my $tmpname = $xmldata->{Entity}->{$entity}->{Tag}->{185}->{content} // 0;
my $tmpcost = $xmldata->{Entity}->{$entity}->{Tag}->{48}->{value} // '-1';
if ($tmpname) {
if ( (!defined $card_cost{$tmpname}) || ( (defined $card_cost{$tmpname}) && ($tmpcost ne '-1') ) ) {
$card_cost{$tmpname} = $tmpcost;
Expand Down

0 comments on commit 59de402

Please sign in to comment.