- # if we are still a PC11, save it for a better offer
- if ($pcno == 11) {
- $pc11_saved = [$key, $self, $pcno, $line, $origin, $pc];
- $pc11_saved_time = $main::systime;
- dbg("saved new PC11 spot $key for a better offer") if isdbg("pc11");
- return;
+ # if it is STILL (despite all efforts to change it) a PC11
+ if ($pcno == 11) {
+ if ($pc11_saved && $key ne $pc11_saved->[0]) {
+ if (Spot::dup_find(@spot[0..4,7])) {
+ dbg("DUPE saved PC11 $self->{call} -> key: $pc11_saved->[0] recurse: $recurse dumped") if isdbg('pc11');
+ } else {
+ dbg("RECURSE $self->{call} -> NEW $pc->[0] spot $key ne $pc11_saved->[0] recurse: $recurse, SAVE + recursing") if isdbg("pc11");
+ # shift @$pc11_saved; # saved key
+ my $self = $pc11_saved->[1];
+ my @saved = @$pc11_saved[2..5];
+ $self->handle_11(@saved, 1);
+ }
+ }
+ $pc11_saved = [$key, $self, $pcno, $line, $origin, $pc];
+ $pc11_saved_time = $main::systime;
+ dbg("SAVED $self->{call} -> NEW $pc->[0] spot $key for a better offer, recurse: $recurse") if isdbg("pc11");
+ return;
+ }
+