public function addSecondHandItem(SR_Player $player, SR_Item $item, $price) { $items = $this->getStoreItems($player); $items[] = array($item->getItemName(), 100.0, round($price * 11.5, 2)); // shuffle($items); $max = $this->getMaxItems(); $num = count($items); if ($num > $max) { $items = array_slice($items, $num - $max, $max); } return $this->saveStoreSettings($items); }
public function putInBank(SR_Item $item) { if ($item->isItemStackable()) { if (false !== ($other = $this->getBankItemByName($item->getItemName()))) { $other->increase('sr4it_amount', $item->getAmount()); return $item->delete(); } } $this->sr4_bank[$item->getID()] = $item; return $item->changePosition('bank'); // $bank = $this->getBankItems(); // $bank[$item->getID()] = $item; // return $this->updateBank($bank); }
private function combatAIPushEquip(SR_Item $item) { $this->combatPush('equip ' . $item->getItemName()); }
public function ai_use(SR_Item $item) { $this->ai_act('use ' . $item->getItemName()); }