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

class BeginHuman extends AbstractBeginPlayer {
    function __construct() {
        parent::__construct(DungeonConstante::$ACTION_HUMAN_PLAYER_START);
    }

    public function beginPlayer($locCenterZone) {
        $locManageAction = ManageAction::getInstance();
        $locPlayer = $locManageAction->getPlayer();
        $locPlayer->setPlayerType(DungeonConstante::$PLAYER_TYPE_HUMAN_KNIGHT);
        Soldier::create($locCenterZone, $locPlayer->playerId, false);
        $locCenterZone->setZoneType(DungeonConstante::$ZONE_TYPE_CITY);
    }
    public function isOk($locCenterZone) {
        if(!$locCenterZone->isSurface()) {
            ManageAction::getInstance()->addPlayerInfo("Human knight must begin on ground");
            return false;
        }
        return true;
    }
}
?>
Return current item: PhpBlock