IhanaMies / LootValue

2 stars 13 forks source link

Quicksell button bypassing flea market FIR restriction #14

Open newlogan opened 3 months ago

newlogan commented 3 months ago

The quick sell to flea action (Alt + Shift + RMB), despite /SPT_DATA/Server/database/globals.json "ragfair":{"isOnlyFoundInRaidAllowed": true}, will ignore the required FIR status, allowing the listing of items that are not FIR. Attempting to list items on the flea market through the normal means remains unaffected.

In Plugin.cs, it does appear that the function SellToFlea used to have a globals.json independent hard coded restriction on non-FIR items prior to 3.0.1, thereafter this restriction was removed following in the footsteps of the live version of the game. Either an additional setting in the config or an automatic reading of globals.json combined with the check for the item's FIR status in the first conditional would solve the issue. (I'd make a pull request if I was better at coding) Ex.

if (!Session.RagFair.Available || !(item.MarkedAsSpawnedInSession || !LootValueMod.RequireInRaid.Value))
                return;