Item movement fix

This commit is contained in:
Shoghi Cervantes Pueyo 2013-01-29 19:29:16 +01:00
parent 5a2156c2bf
commit 1976e1c6f6
2 changed files with 8 additions and 5 deletions

View file

@ -174,6 +174,9 @@ class Player{
}
public function hasItem($type, $damage = false){
if($type === 0){
return true;
}
foreach($this->inventory as $s => $data){
if($data[0] === $type and ($data[1] === $damage or $damage === false) and $data[2] > 0){
return true;