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

class BeginUnderground extends AbstractBeginPlayer {
    function __construct() {
        parent::__construct(DungeonConstante::$ACTION_DUNGEON_PLAYER_START);
    }

    public function beginPlayer($locCenterZone) {
        $locManageAction = ManageAction::getInstance();
        $locPlayer = $locManageAction->getPlayer();
        $locPlayer->setPlayerType(DungeonConstante::$PLAYER_TYPE_DUNGEON_MASTER);
        Grunt::create($locCenterZone, $locPlayer->playerId, false);
        $locCenterZone->setZoneType(DungeonConstante::$ZONE_TYPE_TREASURE);
    }
    public function isOk($locCenterZone) {
        if($locCenterZone->isSurface()) {
            ManageAction::getInstance()->addPlayerInfo("Dungeon master must begin underground");
            return false;
        }
        return true;
    }
}
?>
Return current item: PhpBlock