Exemple #1
0
 /**
  * Delete one loot
  * @param int $item_id
  * @return boolean
  */
 public function deleteloot($item_id)
 {
     global $config;
     $this->loot = new \bbdkp\controller\loot\Loot($item_id);
     $this->loot->delete_loot();
     $raid = new \bbdkp\controller\raids\Raids($this->loot->raid_id);
     $PointsController = new \bbdkp\controller\points\PointsController($raid->event_dkpid);
     $PointsController->removeloot_update_dkprecord($this->loot);
     if ($config['bbdkp_zerosum'] == 1) {
         $PointsController->zero_balance_delete($this->loot);
     }
     $log_action = array('header' => 'L_ACTION_ITEM_DELETED', 'L_NAME' => $this->loot->item_name, 'L_BUYER' => $this->loot->member_name, 'L_RAID_ID' => $this->loot->raid_id, 'L_VALUE' => $this->loot->item_value);
     $this->log_insert(array('log_type' => $log_action['header'], 'log_action' => $log_action));
     return true;
 }