Beispiel #1
0
        public void SendUnclusterBadgeRequest(int badgeId, int clusterId, int topicId, int usrId, bool playImmidiately,
                                              int callToken)
        {
            if (peer == null || peer.PeerState != PeerStateValue.Connected)
            {
                return;
            }

            peer.OpCustom((byte)DiscussionOpCode.UnclusterBadgeRequest,
                          UnclusterBadgeMessage.Write(badgeId, clusterId, playImmidiately,
                                                      topicId, usrId, callToken),
                          true);
            Service();
        }
Beispiel #2
0
        private void __unclusterBadge(Clusterable badge, Cluster cluster, int userId)
        {
            _room.BroadcastReliableToRoom((byte)DiscussionEventCode.UnclusterBadgeEvent,
                                          UnclusterBadgeMessage.Write(
                                              badge.GetId(),
                                              cluster.GetId(),
                                              true, _topicId, userId, -1));

            EventLogger.LogAndBroadcast(new DiscCtx(Discussions.ConfigManager.ConnStr),
                                        _room,
                                        StEvent.ClusterOut,
                                        userId,
                                        _topicId);
            _pendingChanges = true;
        }