Ejemplo n.º 1
0
    private static void HandleSelect(GameSession session, PacketReader packet)
    {
        int itemId = packet.ReadInt();

        Item superChatItem = session.Player.Inventory.GetById(itemId);
        if (superChatItem == null)
        {
            return;
        }

        session.Player.SuperChatId = superChatItem.Function.Id;
        session.Send(SuperChatPacket.Select(session.Player.FieldPlayer, superChatItem.Id));
    }
        private static void HandleSelect(GameSession session, PacketReader packet)
        {
            int item = packet.ReadInt();

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

            if (superChatItem == null)
            {
                return;
            }

            session.Player.SuperChat = superChatItem.Function.Id;
            session.Send(SuperChatPacket.Select(session.FieldPlayer, superChatItem.Id));
        }