mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-24 12:07:15 +00:00
Clea Automation.php
Clean unused code
This commit is contained in:
committed by
GitHub
parent
0b1bd44d22
commit
abe36748d7
@@ -3157,10 +3157,6 @@ class Automation {
|
|||||||
$totalsend_alldef = $reinfReport['totalsend_alldef'];
|
$totalsend_alldef = $reinfReport['totalsend_alldef'];
|
||||||
$Defender['hero'] = $reinfReport['defenderHero'];
|
$Defender['hero'] = $reinfReport['defenderHero'];
|
||||||
|
|
||||||
#################################################
|
|
||||||
################FIXED BY SONGER################
|
|
||||||
#################################################
|
|
||||||
|
|
||||||
for($i = 1; $i <= 11; $i++){
|
for($i = 1; $i <= 11; $i++){
|
||||||
//MUST TO BE FIX : This is only for defender and still not properly coded
|
//MUST TO BE FIX : This is only for defender and still not properly coded
|
||||||
if (isset($battlepart['casualties_attacker']) && isset($battlepart['casualties_attacker'][$i]) && $battlepart['casualties_attacker'][$i] <= 0) {
|
if (isset($battlepart['casualties_attacker']) && isset($battlepart['casualties_attacker'][$i]) && $battlepart['casualties_attacker'][$i] <= 0) {
|
||||||
@@ -3172,8 +3168,6 @@ class Automation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#################################################
|
|
||||||
|
|
||||||
$dead = [];
|
$dead = [];
|
||||||
$owndead = [];
|
$owndead = [];
|
||||||
$alldead = [];
|
$alldead = [];
|
||||||
@@ -3346,27 +3340,6 @@ class Automation {
|
|||||||
//Update starvation data
|
//Update starvation data
|
||||||
$database->addStarvationData($to['wref']);
|
$database->addStarvationData($to['wref']);
|
||||||
|
|
||||||
//Returning units back to village is not necessary because it will be taken care when processing movement
|
|
||||||
// Fix by AL-Kateb
|
|
||||||
// if evasion was active, return units back to base
|
|
||||||
/*
|
|
||||||
if (isset($evaded)) {
|
|
||||||
foreach ($evasionUnitModifications_modes as $index => $mode) {
|
|
||||||
$evasionUnitModifications_modes[$index] = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$database->modifyUnit($data['to'], $evasionUnitModifications_units, $evasionUnitModifications_amounts, $evasionUnitModifications_modes);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#################################################
|
|
||||||
################FIXED BY SONGER################
|
|
||||||
#################################################
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
##############ISUE: Lag, fixed3####################################################
|
|
||||||
#### PHP.NET manual: unset() destroy more than one variable unset($foo1, $foo2, $foo3);######
|
|
||||||
################################################################################
|
|
||||||
$data_num++;
|
$data_num++;
|
||||||
|
|
||||||
unset(
|
unset(
|
||||||
@@ -3428,9 +3401,6 @@ class Automation {
|
|||||||
,$DefenderUnit
|
,$DefenderUnit
|
||||||
,$info_trap
|
,$info_trap
|
||||||
,$report);
|
,$report);
|
||||||
|
|
||||||
#################################################
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user