404 | | $endpos = strlen($this->killmail_) - $startpos + 16; |
405 | | |
406 | | $dropped = explode("\n", trim(substr($this->killmail_, $startpos + 16, $endpos))); |
407 | | #var_dump($dropped); exit; |
408 | | |
409 | | $dropped_items = $this->scanForItems($dropped); |
410 | | foreach ($dropped_items as $item) |
411 | | { |
412 | | $ditem = new DroppedItem($item['item'], $item['quantity'], $item['location']); |
413 | | $kill->addDroppedItem($ditem); |
414 | | } |
415 | | } |
416 | | |
| 404 | if ($startpos) |
| 405 | { |
| 406 | $endpos = strlen($this->killmail_) - $startpos + 16; |
| 407 | |
| 408 | $dropped = explode("\n", trim(substr($this->killmail_, $startpos + 16, $endpos))); |
| 409 | #var_dump($dropped); exit; |
| 410 | |
| 411 | $dropped_items = $this->scanForItems($dropped); |
| 412 | foreach ($dropped_items as $item) |
| 413 | { |
| 414 | $ditem = new DroppedItem($item['item'], $item['quantity'], $item['location']); |
| 415 | $kill->addDroppedItem($ditem); |
| 416 | } |
| 417 | } |
| 418 | } |
548 | | $search = array('Ziel:','Allianz: NICHTS','Allianz: nichts','Allianz:','Zerst'.chr(246).'rte Gegenst'.chr(228).'nde', 'Zerst'.chr(246).'rt','Sicherheit:','Beteiligte Parteien:','Anz:', 'Corporation:', '(Fracht)'); |
549 | | $replace = array('Victim:','Alliance: None','Alliance: None','Alliance:','Destroyed items','Destroyed','Security:','Involved parties:', 'Qty:', 'Corp:', '(Cargo)'); |
| 550 | $search = array('Ziel:','Allianz: NICHTS','Allianz: nichts','Allianz:', |
| 551 | 'Zerst'.chr(246).'rte Gegenst'.chr(228).'nde', 'Zerst'.chr(246).'rt:', 'Sicherheit:', |
| 552 | 'Beteiligte Parteien:','Anz:','Corporation:','(Fracht)', 'Schiff:','Waffe:', |
| 553 | 'Verursachter Schaden:','Erlittener Schaden:', '(gab den letzten Schuss ab)', |
| 554 | 'Hinterlassene Gegenst'.chr(228).'nde:', 'Anz.:'); |
| 555 | $replace = array('Victim:','Alliance: None','Alliance: None','Alliance:', |
| 556 | 'Destroyed items','Destroyed:', 'Security:', |
| 557 | 'Involved parties:', 'Qty:', 'Corp:', '(Cargo)', 'Ship:', 'Weapon:', |
| 558 | 'Damage Done:', 'Damage Taken:', '(laid the final blow)', |
| 559 | 'Dropped items:', 'Qty:'); |
| 560 | |
| 561 | if (strpos($this->killmail, chr(246)) === false) |
| 562 | { |
| 563 | $this->killmail_ = utf8_decode($this->killmail_); |
| 564 | } |