예제 #1
0
        private static void HandleSuperChat(GameSession session, string message, ChatType type)
        {
            if (session.Player.SuperChat == 0)
            {
                return;
            }

            Item superChatItem = session.Player.Inventory.Items.Values.FirstOrDefault(x => x.Function.Id == session.Player.SuperChat);

            if (superChatItem == null)
            {
                session.Player.SuperChat = 0;
                session.Send(SuperChatPacket.Deselect(session.FieldPlayer));
                session.Send(ChatPacket.Error(session.Player, SystemNotice.InsufficientSuperChatThemes, ChatType.NoticeAlert));
                return;
            }

            MapleServer.BroadcastPacketAll(ChatPacket.Send(session.Player, message, type));
            InventoryController.Consume(session, superChatItem.Uid, 1);
            session.Send(SuperChatPacket.Deselect(session.FieldPlayer));
            session.Player.SuperChat = 0;
        }
 private static void HandleDeselect(GameSession session)
 {
     session.Send(SuperChatPacket.Deselect(session.FieldPlayer));
 }