Skip to content

Commit

Permalink
combat_simulator.php: fix wrong variable name
Browse files Browse the repository at this point in the history
Probably a copy+paste error between the attacker and defender code.

Fixes the phpstan warning:

> Variable $attackerName might not be defined.
  • Loading branch information
hemberger committed Apr 25, 2021
1 parent 38f64f4 commit 73195a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine/Default/combat_simulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
$duplicates = true;
continue;
}
$usedNames[$attackerName] = true;
$usedNames[$defenderName] = true;
$defenders[$i] =& DummyPlayer::getCachedDummyPlayer($defenderName);
$defenders[$i]->setAllianceID(2);
$realDefenders[$i] =& $defenders[$i];
Expand Down

0 comments on commit 73195a6

Please sign in to comment.