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

class BuildNecropolis extends DungeonAbstractChangeZoneTypeAction {
    function __construct() {
        parent::__construct(DungeonConstante::$ACTION_BUILD_NECROPOLIS, 
        	DungeonConstante::$ZONE_TYPE_NECROPOLIS, DungeonConstante::$ACTION_BUY_NECROPOLIS_COST, false, false);
    }

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

        if($locZone->isSurface()) {
            $locManageAction->addPlayerInfo("Necropolis must begin underground");
        } else {
            return parent::isOkToChange($locBlock, $locZone);
        }
        return false;
    }
}













?>
Return current item: PhpBlock