Item pickup

This commit is contained in:
Shoghi Cervantes Pueyo 2013-01-05 03:16:11 +01:00
parent 57282225d2
commit 518afeae48
2 changed files with 39 additions and 27 deletions

View file

@ -81,6 +81,8 @@ class Entity extends stdClass{
if($player !== true and $player !== false){
if($this->server->api->dhandle("player.item.pick", array(
"eid" => $player["EID"],
"block" => $this->type,
"meta" => $this->meta,
"target" => $this->eid
)) !== false){
$this->close();
@ -163,6 +165,7 @@ class Entity extends stdClass{
$this->server->query("DELETE FROM entities WHERE EID = ".$this->eid.";");
$this->server->api->dhandle("entity.remove", $this->eid);
$this->closed = true;
unset($this);
}
}