fix: undefined indexes

This commit is contained in:
Martin Ambrus
2017-11-01 21:35:24 +01:00
parent 396250f393
commit 041726fbd2
6 changed files with 22 additions and 15 deletions
+1 -1
View File
@@ -468,7 +468,7 @@ class Battle {
// Formula for calculating points attackers (Infantry & Cavalry)
if($AttackerWref != 0){
$rap = ($ap+$cap)+(($ap+$cap)/100*$bid35[$this->getTypeLevel(35,$AttackerWref)]['attri']);
$rap = ($ap+$cap)+(($ap+$cap)/100*(isset($bid35[$this->getTypeLevel(35,$AttackerWref)]) ? $bid35[$this->getTypeLevel(35,$AttackerWref)]['attri'] : 0));
}else{
$rap = $ap+$cap;
}