mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-17 16:51:00 +00:00
fix somthing for train
This commit is contained in:
@@ -451,7 +451,7 @@ private function trainUnit($unit,$amt,$great=false) {
|
|||||||
if($unit%10 == 9 && $slots['chiefs'] <= $amt) { $amt = $slots['chiefs']; }
|
if($unit%10 == 9 && $slots['chiefs'] <= $amt) { $amt = $slots['chiefs']; }
|
||||||
} else {
|
} else {
|
||||||
if($unit != 99){
|
if($unit != 99){
|
||||||
if($this->maxUnit($unit,$great) <= $amt) {
|
if($this->maxUnit($unit,$great) < $amt) {
|
||||||
$amt = 0;
|
$amt = 0;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
@@ -460,7 +460,7 @@ private function trainUnit($unit,$amt,$great=false) {
|
|||||||
$train_amt += $train['amt'];
|
$train_amt += $train['amt'];
|
||||||
}
|
}
|
||||||
$max = $bid36[$village->resarray['f'.$id]]['attri'] - ($village->unitarray['u99'] + $train_amt);
|
$max = $bid36[$village->resarray['f'.$id]]['attri'] - ($village->unitarray['u99'] + $train_amt);
|
||||||
if($max <= $amt) {
|
if($max < $amt) {
|
||||||
$amt = 0;
|
$amt = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user