diff --git a/webapp/controller/KefuController.class.php b/webapp/controller/KefuController.class.php index e8901d1..28f91e4 100644 --- a/webapp/controller/KefuController.class.php +++ b/webapp/controller/KefuController.class.php @@ -55,7 +55,16 @@ class KefuController { } $ret = json_decode($response, true); if ($ret['errcode'] == 0) { - return $ret['items']; + if ($gameid == 2001) { + if (count($ret['items']) > 0) { + $item = $ret['items'][rand() % count($ret['items'])]; + return array($item); + } else { + return $ret['items']; + } + } else { + return $ret['items']; + } } else { return; }