Fix ability to attack/capture/etc places without any energy
This commit is contained in:
parent
0ec6e93496
commit
a538519d2d
@ -10,6 +10,10 @@ $player = new Player(getRequestUser());
|
|||||||
|
|
||||||
$place = new Place($VARS["id"] * 1);
|
$place = new Place($VARS["id"] * 1);
|
||||||
|
|
||||||
|
if ($player->energy->getEnergy() == 0) {
|
||||||
|
sendJsonResp($Strings->get("You don't have enough energy!", false), "ERROR");
|
||||||
|
}
|
||||||
|
|
||||||
if ($place->isClaimed()) {
|
if ($place->isClaimed()) {
|
||||||
if ($place->getTeamID() == $player->getTeamID()) {
|
if ($place->getTeamID() == $player->getTeamID()) {
|
||||||
// Same teams, player is defending
|
// Same teams, player is defending
|
||||||
|
Loading…
x
Reference in New Issue
Block a user