Fixed #1100 Item multiplication cheat

This commit is contained in:
Shoghi Cervantes 2014-01-22 22:11:54 +01:00
parent edfcdd0c17
commit 4ae1709196

View File

@ -242,7 +242,7 @@ class Entity extends Position{
$time = microtime(true); $time = microtime(true);
if($this->class === ENTITY_PLAYER and ($this->player instanceof Player) and $this->player->spawned === true and $this->player->blocked !== true){ if($this->class === ENTITY_PLAYER and ($this->player instanceof Player) and $this->player->spawned === true and $this->player->blocked !== true){
foreach($this->server->api->entity->getRadius($this, 1.5, ENTITY_ITEM) as $item){ foreach($this->server->api->entity->getRadius($this, 1.5, ENTITY_ITEM) as $item){
if($item->spawntime > 0 and ($time - $item->spawntime) >= 0.6){ if($item->closed === false and $item->spawntime > 0 and ($time - $item->spawntime) >= 0.6){
if((($this->player->gamemode & 0x01) === 1 or $this->player->hasSpace($item->type, $item->meta, $item->stack) === true) and $this->server->api->dhandle("player.pickup", array( if((($this->player->gamemode & 0x01) === 1 or $this->player->hasSpace($item->type, $item->meta, $item->stack) === true) and $this->server->api->dhandle("player.pickup", array(
"eid" => $this->player->eid, "eid" => $this->player->eid,
"player" => $this->player, "player" => $this->player,