mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-02 18:44:21 +00:00
fix crop consumption with horse drinking trough (now the consumption down to trained soldiers too) + fix duration
This commit is contained in:
+11
-10
@@ -365,23 +365,24 @@ class Technology {
|
||||
break;
|
||||
}
|
||||
for($i=$start;$i<=$end;$i++) {
|
||||
$hdt = 0;
|
||||
if($i>=4 && $i<=6) {
|
||||
for($j=19;$j<=38;$j++) {
|
||||
if($buildarray['f'.$j.'t'] == 41) {
|
||||
$hdt = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
$unit = "u".$i;
|
||||
global $$unit;
|
||||
$dataarray = $$unit;
|
||||
$upkeep += ($dataarray['pop'] - $hdt) * $array[$unit];
|
||||
for($j=19;$j<=38;$j++) {
|
||||
if($buildarray['f'.$j.'t'] == 41) {
|
||||
$horsedrinking = $j;
|
||||
}
|
||||
}
|
||||
if($i>=4 && $i<=6 && $dataarray['drinking'] <= $buildarray['f'.$horsedrinking]) {
|
||||
$upkeep += ($dataarray['pop']-1) * $array[$unit];
|
||||
}else{
|
||||
$upkeep += $dataarray['pop'] * $array[$unit];
|
||||
}
|
||||
}
|
||||
// $unit = "hero";
|
||||
// global $$unit;
|
||||
// $dataarray = $$unit;
|
||||
$upkeep += $array['hero'] * 6;
|
||||
$upkeep += $array['hero'] * 6;
|
||||
return $upkeep;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user