コード例 #1
0
        public override void HandleMessage(Yupi.Model.Domain.Habbo session, Yupi.Protocol.Buffers.ClientMessage message,
                                           Yupi.Protocol.IRouter router)
        {
            if (!session.Info.HasPermission("fuse_mod"))
            {
                return;
            }

            int ticketCount = message.GetInteger();

            for (int i = 0; i < ticketCount; i++)
            {
                int ticketId = message.GetInteger();

                SupportTicket ticket = TicketRepository.Find(ticketId);

                if (ticket != null)
                {
                    ticket.Release();
                    TicketRepository.Save(ticket);
                }

                foreach (Habbo staff in ClientManager.GetByPermission("handle_cfh"))
                {
                    staff.Router.GetComposer <ModerationToolIssueMessageComposer>().Compose(staff, ticket);
                }
            }
        }
コード例 #2
0
 public void Handle(GameClient session, ClientMessage message)
 {
     if (session.GetHabbo().HasPermission("acc_supporttool"))
     {
         int amount = message.PopWiredInt32();
         for (int i = 0; i < amount; i++)
         {
             uint          ticketId = message.PopWiredUInt();
             SupportTicket ticket   = Skylight.GetGame().GetModerationToolManager().TryGetSupportTicket(ticketId);
             if (ticket != null && ticket.Status == SupportTicketStatus.Picked && ticket.PickerID == session.GetHabbo().ID)
             {
                 ticket.Release(true);
                 Skylight.GetGame().GetModerationToolManager().SerializeSupportTicketToMods(ticket);
             }
         }
     }
 }