Location: PHPKode > projects > PhpBlock > A9.8/modules/dungeon/action/builddoor.class.php
<?php
include_once $PATH_TO_CODE."/modules/dungeon/action/abstractchangezonetype.class.php";

class BuildDoor extends DungeonAbstractChangeZoneTypeAction {
    function __construct() {
        parent::__construct(DungeonConstante::$ACTION_BUILD_DOOR, DungeonConstante::$ZONE_TYPE_DOOR, DungeonConstante::$ACTION_BUILD_DOOR_COST);
    }

    public function isOkToChange($locBlock, $locZone) {
        $locManageAction = ManageAction::getInstance();
        $locPlayer = $locManageAction->getPlayer();

        if($locZone->zoneType != Constante::$ZONE_TYPE_PLAIN) {
            $locManageAction->addPlayerInfo("Target zone is not plain");
        } else {
            return parent::isOkToChange($locBlock, $locZone);
        }
        return false;
    }
}
?>
Return current item: PhpBlock