X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;ds=inline;f=lib%2FNDWeb%2FController%2FCovOp.pm;h=ea67978ef9fd8037de2d9baf24d8bc1674bef33c;hb=b52c7c95096825846f53e73de627e6cda01d9bca;hp=21a47ebeb571c3d4d3e16d5fcb54ab6152c7b5cc;hpb=436af6a696e3488f5d25e027553ec356da4cde01;p=ndwebbie.git diff --git a/lib/NDWeb/Controller/CovOp.pm b/lib/NDWeb/Controller/CovOp.pm index 21a47eb..ea67978 100644 --- a/lib/NDWeb/Controller/CovOp.pm +++ b/lib/NDWeb/Controller/CovOp.pm @@ -50,18 +50,18 @@ sub list : Private { my $dbh = $c->model; my $query = $dbh->prepare(q{SELECT id, coords, metal, crystal, eonium - , covop_alert(seccents,structures,gov,0) AS minalert - , covop_alert(seccents,structures,gov,50) AS maxalert + , covop_alert(seccents,structures,size,guards,gov,0) AS minalert + , covop_alert(seccents,structures,size,guards,gov,50) AS maxalert , distorters,gov , MaxResHack,co.tick AS lastcovop - FROM (SELECT p.id,coords(x,y,z), metal,crystal,eonium, - seccents,NULLIF(ss.total::integer,0) AS structures,distorters + FROM (SELECT p.id,coords(x,y,z),size, metal,crystal,eonium,guards + ,seccents,NULLIF(ds.total::integer,0) AS structures,distorters ,max_bank_hack(metal,crystal,eonium,p.value ,(SELECT value FROM current_planet_stats WHERE id = ?)) AS MaxResHack , planet_status, relationship,gov FROM current_planet_stats p LEFT OUTER JOIN current_planet_scans ps ON p.id = ps.planet - LEFT OUTER JOIN current_structure_scans ss ON p.id = ss.planet + LEFT OUTER JOIN current_development_scans ds ON p.id = ds.planet ) AS foo LEFT OUTER JOIN (SELECT id,max(tick) AS tick FROM covop_attacks GROUP BY id) co USING (id) WHERE (metal IS NOT NULL OR seccents IS NOT NULL)