protected function onSendNotifications(BrowserGamesHub_Notification $notification) { foreach ($this->getVillages() as $v) { $loc = $v->buildings->getTownCenterLocation(); $width = 600; $height = 400; $zoom = mt_rand(50, 100); $loc[0] += mt_rand(0, 10) - 5; $loc[1] += mt_rand(0, 10) - 5; $notification->addImage(ABSOLUTE_URL . 'image/snapshot/?zoom=' . $zoom . '&x=' . $loc[0] . '&y=' . $loc[1] . '&width=' . $width . '&height=' . $height, $v->getName(), ABSOLUTE_URL . '#' . $loc[0] . ',' . $loc[1]); } }