Fix BuyerJobCondition not being checked when the user has no job (#19726)
This commit is contained in:
@@ -34,19 +34,18 @@ public sealed partial class BuyerJobCondition : ListingCondition
|
||||
return true;
|
||||
|
||||
var jobs = ent.System<SharedJobSystem>();
|
||||
if (jobs.MindTryGetJob(mindId, out var job, out _))
|
||||
{
|
||||
if (Blacklist != null)
|
||||
{
|
||||
if (job.PrototypeId != null && Blacklist.Contains(job.PrototypeId))
|
||||
return false;
|
||||
}
|
||||
jobs.MindTryGetJob(mindId, out var job, out _);
|
||||
|
||||
if (Whitelist != null)
|
||||
{
|
||||
if (job.PrototypeId == null || !Whitelist.Contains(job.PrototypeId))
|
||||
return false;
|
||||
}
|
||||
if (Blacklist != null)
|
||||
{
|
||||
if (job?.PrototypeId != null && Blacklist.Contains(job.PrototypeId))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Whitelist != null)
|
||||
{
|
||||
if (job?.PrototypeId == null || !Whitelist.Contains(job.PrototypeId))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user