diff --git a/Killbot.php b/Killbot.php index 40f26a1..fc3f140 100644 --- a/Killbot.php +++ b/Killbot.php @@ -79,7 +79,7 @@ private function processKill() { $isVictimCorpWatched = in_array($victim->{'corporation_id'}, Settings::$WATCHED_ENTITIES['corporations']); $isVictimAllianceWatched = isset($victim->{'alliance'}) && - in_array($victim->{'alliance'}->{'id'}, Settings::$WATCHED_ENTITIES['alliances']); + in_array($victim->{'alliance_id'}, Settings::$WATCHED_ENTITIES['alliances']); // Dissociating kill and loss if ($isVictimAllianceWatched || $isVictimCorpWatched) { @@ -146,14 +146,14 @@ private function isVictimWatched($killmail) { $victim = $killmail->{'victim'}; - if (isset($victim->{'corporation'}->{'id'})) { - if (in_array($victim->{'corporation'}->{'id'}, Settings::$WATCHED_ENTITIES['corporations'])){ + if (isset($victim->{'corporation_id'})) { + if (in_array($victim->{'corporation_id'}, Settings::$WATCHED_ENTITIES['corporations'])){ return true; } } - if (isset($victim->{'alliance'}->{'id'})) { - if (in_array($victim->{'alliance'}->{'id'}, Settings::$WATCHED_ENTITIES['alliances'])){ + if (isset($victim->{'alliance_id'})) { + if (in_array($victim->{'alliance_id'}, Settings::$WATCHED_ENTITIES['alliances'])){ return true; } } @@ -167,14 +167,14 @@ private function isAttackerWatched($killmail) { foreach ($attackers as $attacker) { - if (isset($attacker->{'corporation'}->{'id'})) { - if (in_array($attacker->{'corporation'}->{'id'}, Settings::$WATCHED_ENTITIES['corporations'])){ + if (isset($attacker->{'corporation_id'})) { + if (in_array($attacker->{'corporation_id'}, Settings::$WATCHED_ENTITIES['corporations'])){ return true; } } - if (isset($attacker->{'alliance'}->{'id'})) { - if (in_array($attacker->{'alliance'}->{'id'}, Settings::$WATCHED_ENTITIES['alliances'])){ + if (isset($attacker->{'alliance_id'})) { + if (in_array($attacker->{'alliance_id'}, Settings::$WATCHED_ENTITIES['alliances'])){ return true; } } @@ -285,4 +285,3 @@ private function storeKillJson($killId, $data) { } } -