Location: PHPKode > projects > PhpBlock > A9.8/modules/dungeon/update/dungeonplayerobjectlistupdate.class.php
<?php
include_once $PATH_TO_CODE."/script/update/playerobjectlistupdate.class.php";


class DungeonPlayerObjectListUpdate extends PlayerObjectListUpdate {
	public function __construct($parArguments, $parPlayer) {
		parent::__construct($parArguments, $parPlayer);
	}
	protected function isObjectActive(RealObject  $locObject) {
		return $locObject->realObjectType != DungeonConstante::$REAL_OBJECT_TYPE_TRAP
		&& parent::isObjectActive($locObject);
	}
	public function echoObjectUpdate(RealObject  $parObject) {
		parent::echoObjectUpdate($parObject);
		//XP and IA information
		echo Constante::$SEP_URL_2;

		echo $parObject->getLevel();
		echo Constante::$SEP_URL_3;
		echo $parObject->getXP();
		echo Constante::$SEP_URL_3;
		echo $parObject->getIAMode();
	}
	protected function getObjectsList() {
		$locObjectList = $this->player->getAllRealObject();
		$locObjectListFiltered = array();
		
		//First hero !!!
		foreach($locObjectList as $locObject) {
			if($locObject->getHeroMode() > 0) {
				array_push($locObjectListFiltered, $locObject);
			}
		}
		foreach($locObjectList as $locObject) {
			if(RealObject::$IA_MODE_NO == $locObject->getIAMode() && $locObject->getHeroMode()==0) {
				array_push($locObjectListFiltered, $locObject);
			}
		}
		
		return $locObjectListFiltered;
	}
}
?>
Return current item: PhpBlock