X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb%2FController%2FRaids.pm;h=98b3a39e8012033296983490f3d7af9152565eb1;hb=27f93c2b1d0e6c9c8a073b18ed508cf68ded6003;hp=16ce6b508d715fdbb025032e677c3bf0735d24fb;hpb=efcd1b9a43e47cf1fa5dff3afe1c348bcc2421fb;p=ndwebbie.git diff --git a/lib/NDWeb/Controller/Raids.pm b/lib/NDWeb/Controller/Raids.pm index 16ce6b5..98b3a39 100644 --- a/lib/NDWeb/Controller/Raids.pm +++ b/lib/NDWeb/Controller/Raids.pm @@ -4,7 +4,7 @@ use strict; use warnings; use parent 'Catalyst::Controller'; -use POSIX; +use POSIX qw/floor pow/; use NDWeb::Include; use ND::Include; @@ -129,7 +129,7 @@ sub view : Local { $targetquery->execute($raid->{id},$planet->{x},$planet->{y}); my @targets; while (my $target = $targetquery->fetchrow_hashref){ - if ($planet){ + if ($planet && $planet->{x}){ if ($planet->{x} == $target->{x}){ $target->{style} = 'incluster'; } @@ -171,7 +171,7 @@ sub view : Local { my $roids = floor(0.25*$size); $size -= $roids; my $xp = 0; - if ($planet){ + if ($planet && $planet->{score}){ $xp = pa_xp($roids,$planet->{score},$planet->{value},$target->{score},$target->{value}); } push @roids,{wave => $i, roids => $roids, xp => $xp};