Skip to content

Commit fc4aa06

Browse files
Tweaks to dropsim to abort for impossible items.
1 parent c32da76 commit fc4aa06

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

dropsim.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,13 +581,13 @@ int main(int argc, char* argv[]) {
581581
threadStorage[i].totalsims++;
582582

583583
// Check if all items have at least mindropcount drops, and if so, break the loop to finish this thread's execution.
584-
if (threadStorage[i].totalsims % 1000 == 0) {
584+
if (threadStorage[i].totalsims > 100000 && threadStorage[i].totalsims % 1000 == 0) {
585585
allAboveMin = true;
586586

587587
for (const auto& drop : threadStorage[i].totaldrops) {
588588
long dropsLeft = mindropcount - drop.second;
589589

590-
if (dropsLeft > 0) {
590+
if (dropsLeft > 0 && drop.second > 0) {
591591
allAboveMin = false;
592592
break;
593593
}
@@ -636,7 +636,7 @@ int main(int argc, char* argv[]) {
636636
escapedDrop.insert(pos, "\\");
637637
pos += 2; // Move past the escaped quote
638638
}
639-
std::cout << " [\"" + escapedDrop + "\", " << drop.second << ", " << drop.first.magic << ", " << drop.first.rare << ", " << drop.first.set << ", " << drop.first.unique << "]";
639+
std::cout << " [\"" + trim(escapedDrop) + "\", " << drop.second << ", " << drop.first.magic << ", " << drop.first.rare << ", " << drop.first.set << ", " << drop.first.unique << "]";
640640
if (++count < finaldrops.size()) {
641641
std::cout << ",";
642642
}

0 commit comments

Comments
 (0)