kavezo / ZipZap

48 stars 16 forks source link

Fixed reset shop to use beforeToday when checking for expired items. #53

Closed boumarca closed 3 years ago

boumarca commented 3 years ago

I fixed the shop reset so that it uses beforeToday when checking 'endAt'. This will make sure that the date is past, instead of checking only the month or year. February shop was broken because the template items also expired in January and only checking the month would prune them out.

I also change the part where it checks if the shop needs to be updated. I only check if the date is not 2050 and if it is passed. A small optimization was made with reversed because the limited items are at the bottom of the shopItemList.