improve matching of entries to objectives
If the faction does not match, we don't care about the other match criteria.
This commit is contained in:
parent
2cf21f159d
commit
6d404a99e2
@ -32,6 +32,19 @@ namespace EliteBGS.BGS {
|
||||
}
|
||||
}
|
||||
|
||||
if (e.Faction != null && faction != null) {
|
||||
if (string.Compare(e.Faction, faction, true) != 0) {
|
||||
/* if we have a faction, and it doesn't match we don't care.
|
||||
* faction is the most important comparision, so if it doesn't match
|
||||
* it is not the right objective
|
||||
*/
|
||||
return 0;
|
||||
} else {
|
||||
++match_count;
|
||||
}
|
||||
}
|
||||
|
||||
/* system and station only add to the match strength though */
|
||||
if (e.System != null && system != null) {
|
||||
if (string.Compare(e.System, system, true) == 0) {
|
||||
++match_count;
|
||||
@ -44,12 +57,6 @@ namespace EliteBGS.BGS {
|
||||
}
|
||||
}
|
||||
|
||||
if (e.Faction != null && faction != null) {
|
||||
if (string.Compare(e.Faction, faction, true) == 0) {
|
||||
++match_count;
|
||||
}
|
||||
}
|
||||
|
||||
return match_count;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user