|
@@ -21,6 +21,7 @@ require_once(BASE_ROOT_PATH . '/helper/room/bargain_manager.php');
|
|
require_once(BASE_ROOT_PATH . '/helper/room/room_parts.php');
|
|
require_once(BASE_ROOT_PATH . '/helper/room/room_parts.php');
|
|
require_once(BASE_ROOT_PATH . '/helper/room/room_avatar.php');
|
|
require_once(BASE_ROOT_PATH . '/helper/room/room_avatar.php');
|
|
|
|
|
|
|
|
+use \room\proto_type;
|
|
class room_helper
|
|
class room_helper
|
|
{
|
|
{
|
|
const room_name_usercount = 5;
|
|
const room_name_usercount = 5;
|
|
@@ -148,6 +149,18 @@ class room_helper
|
|
return $result;
|
|
return $result;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static function other_rooms()
|
|
|
|
+ {
|
|
|
|
+ $result = [];
|
|
|
|
+ $mod_room = Model('room');
|
|
|
|
+ $items = $mod_room->getRooms(['type' => proto_type::room_chat],'*');
|
|
|
|
+ foreach ($items as $item) {
|
|
|
|
+ $room = new room\room_info($item);
|
|
|
|
+ $result[] = $room->format();
|
|
|
|
+ }
|
|
|
|
+ return $result;
|
|
|
|
+ }
|
|
|
|
+
|
|
public static function onSpendBonus($roomid,$amount,$userid)
|
|
public static function onSpendBonus($roomid,$amount,$userid)
|
|
{
|
|
{
|
|
if($roomid > 0 && intval($amount * 100 + 0.5) > 0 && $userid > 0)
|
|
if($roomid > 0 && intval($amount * 100 + 0.5) > 0 && $userid > 0)
|