private void JoinRoomList(JoinRoomListEvent e) { if (e.RoomPlayerList != null) { var evt = RoomEvent.AllocEvent <JoinRoomListResponseEvent>(); evt.HallRoomId = e.HallRoomId; evt.RetCode = 0; foreach (var roomPlayer in e.RoomPlayerList) { evt.JoinRoomResponseInfoList.Add(JoinRoom(e.HallRoomId, roomPlayer)); } _dispatcher.AddEvent(evt); } }
private void JoinRoomList(JoinRoomListEvent e) { if (e.RoomPlayerList != null) { var evt = RoomEvent.AllocEvent <JoinRoomListResponseEvent>(); evt.HallRoomId = e.HallRoomId; evt.RetCode = 0; foreach (var roomPlayer in e.RoomPlayerList) { evt.JoinRoomResponseInfoList.Add(JoinRoom(e.HallRoomId, roomPlayer)); } _dispatcher.AddEvent(evt); var args = _roomFactory.contexts().session.commonSession.FreeArgs as IEventArgs; if (args != null) { args.Trigger(FreeTriggerConstant.PRELOAD_RESOURCE, new TempUnit("roomInfo", new ObjectUnit(e.RoomPlayerList))); } } }