Location: PHPKode > projects > PhpBlock > A9.8/modules/dungeon/tick/dungeongrowthworldtick.class.php
<?php
include_once $PATH_TO_CODE."/script/tick/allincludefortick.php";
include_once $PATH_TO_CODE."/modules/dungeon/dungeonserver.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/zonegenerator.class.php";

class DungeonGrowthWorldTick extends AbstractGrowthWorld {
	public function getName() {
		return "Dungeon world extension";
	}

	public function run() {
		if(!(DungeonServer::getInstance()->getAnHappyHomeBlockId(DungeonConstante::$PLAYER_TYPE_DUNGEON_MASTER)
		&& DungeonServer::getInstance()->getAnHappyHomeBlockId(DungeonConstante::$PLAYER_TYPE_HUMAN_KNIGHT))) {
			parent::run();
		}
	}

	public function generateBlock($parBlockId, $parZoneGenerator) {
		Log::info("DungeonGrowthWorldTick generateBlock $parBlockId");
		DungeonBlock::create($parBlockId, $parZoneGenerator);
	}

	public function getZoneGenerate($parZ) {
		if($parZ == Site::$ZONE_COORD_Z_GROUND_LEVEL) {
			return new ZoneGenerator(Constante::$ZONE_TYPE_PLAIN);
		} else {
			return new ZoneGenerator(DungeonConstante::$ZONE_TYPE_ROCK);
		}
	}
}
?>
Return current item: PhpBlock