예제 #1
0
 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);
 }
예제 #2
0
파일: SR_Player.php 프로젝트: sinfocol/gwf3
 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);
 }
예제 #3
0
파일: SR_NPC.php 프로젝트: sinfocol/gwf3
 private function combatAIPushEquip(SR_Item $item)
 {
     $this->combatPush('equip ' . $item->getItemName());
 }
예제 #4
0
 public function ai_use(SR_Item $item)
 {
     $this->ai_act('use ' . $item->getItemName());
 }