From 3c13f3597b66ccc63db60e766c9961c9bc1c89a5 Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Sun, 26 Nov 2017 22:37:50 +0100 Subject: [PATCH] fix: admin oasis data not showing correct resource values --- Admin/Templates/village.tpl | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Admin/Templates/village.tpl b/Admin/Templates/village.tpl index 78a830ce..611cb944 100644 --- a/Admin/Templates/village.tpl +++ b/Admin/Templates/village.tpl @@ -39,21 +39,21 @@ if(isset($id)) $result = $database->query_return($q); if(count($result) >0) { - foreach($result as $row) + foreach($result as &$row) { $type = $row['type']; - if($type==1) { $type = ' + 25%'; $wood+=1;} - elseif($type==2) { $type = ' + 25%'; $wood+=1;} - elseif($type==3) { $type = ' + 25%
+ 25%'; $wood+=1; $crop+=1;} - elseif($type==4) { $type = ' + 25%'; $clay+=1;} - elseif($type==5) { $type = ' + 25%'; $clay+=1;} - elseif($type==6) { $type = ' + 25%
+ 25%'; $clay+=1;$crop+=1;} - elseif($type==7) { $type = ' + 25%'; $iron+=1;} - elseif($type==8) { $type = ' + 25%'; $iron+=1;} - elseif($type==9) { $type = ' + 25%
+ 25%'; $iron+=1; $crop+=1;} - elseif($type==10){ $type = ' + 25%'; $crop+=1;} - elseif($type==11){ $type = ' + 25%'; $crop+=1;} - elseif($type==12){ $type = ' + 50%'; $crop+=2;} + if($type==1) { $row['type'] = ' + 25%'; $wood+=1;} + elseif($type==2) { $row['type'] = ' + 25%'; $wood+=1;} + elseif($type==3) { $row['type'] = ' + 25%
+ 25%'; $wood+=1; $crop+=1;} + elseif($type==4) { $row['type'] = ' + 25%'; $clay+=1;} + elseif($type==5) { $row['type'] = ' + 25%'; $clay+=1;} + elseif($type==6) { $row['type'] = ' + 25%
+ 25%'; $clay+=1;$crop+=1;} + elseif($type==7) { $row['type'] = ' + 25%'; $iron+=1;} + elseif($type==8) { $row['type'] = ' + 25%'; $iron+=1;} + elseif($type==9) { $row['type'] = ' + 25%
+ 25%'; $iron+=1; $crop+=1;} + elseif($type==10){ $row['type'] = ' + 25%'; $crop+=1;} + elseif($type==11){ $row['type'] = ' + 25%'; $crop+=1;} + elseif($type==12){ $row['type'] = ' + 50%'; $crop+=2;} } } $ocounter = array($wood,$clay,$iron,$crop); @@ -247,7 +247,7 @@ if(isset($id)) ".$row['name']." getMapCheck($row['wref'])."\" target=\"blank\">(".$row['x']."|".$row['y'].") ".round($row['loyalty'])."% - $type + ".$row['type']." "; } }