[ISSUE 387] - Grade setting are not applied correctly

Known bugs and issues not yet fixed are moved to this section. Please do not post cards bugs here post them in the current version bug topic.
Locked
almosthumane
Posts: 66
Joined: Wed Mar 31, 2010 3:52 am

[ISSUE 387] - Grade setting are not applied correctly

Post by almosthumane »

A few days ago I've noticed I was testing grade function with a modded mtg_todo.dat file.
I've noticed that when selecting "-3: Dangerous" graded cards on this setting that would never be applied while -2: Unsupported works (and the remaining ones) work fine.
I've confirmed later that that setting was the only one that was not recorded in the "options.txt" file.
After a few erroneus testing on the code and after trying to make the another function on the program i've started creation a item on option menu and used grade as a reference (as a source to copy, i mean).

While doing it I noticed that max grade was the only variable that use a constante enumeration that starts by 1, as follows:

mtgdefinitions.h
(...)
GRADE_SUPPORTED = 1,
GRADE_BORDERLINE = 2,
GRADE_CRAPPY = 3,
GRADE_UNSUPPORTED = 4,
GRADE_DANGEROUS = 5,
(...)
so i've changed it to:

(...)
GRADE_SUPPORTED = 0,
GRADE_BORDERLINE = 1,
GRADE_CRAPPY = 2,
GRADE_UNSUPPORTED = 3,
GRADE_DANGEROUS = 4
(...)

and it started to work fine (as well as my option item that had the same problem).
Hope that's helpful.

[EDIT ABRA : Renamed - link in the SVN : http://code.google.com/p/wagic/issues/detail?id=387 ]
wololo
Site Admin
Posts: 3728
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Grade Function issue

Post by wololo »

Thanks, can you open a ticket and put your solution in there so that we don't forget about it ?
http://code.google.com/p/wagic/issues/list
Locked