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

        packet.ReadInt();
        IInventory inventory = session.Player.Inventory;

        if (!inventory.HasItem(itemUid))
        {
            return;
        }
        // GMS2 Always 100% success rate
        session.Send(LapenshardPacket.Select(10000));
    }
Ejemplo n.º 2
0
    private static void HandleAddCatalyst(GameSession session, PacketReader packet)
    {
        long itemUid = packet.ReadLong();
        int  itemId  = packet.ReadInt();

        packet.ReadInt();
        int       amount    = packet.ReadInt();
        Inventory inventory = session.Player.Inventory;

        if (!inventory.Items.TryGetValue(itemUid, out Item item) || item.Amount < amount)
        {
            return;
        }

        // GMS2 Always 100% success rate
        session.Send(LapenshardPacket.Select(10000));
    }
Ejemplo n.º 3
0
    private static void HandleAddCatalyst(GameSession session, PacketReader packet)
    {
        long itemUid = packet.ReadLong();
        int  itemId  = packet.ReadInt();

        packet.ReadInt();
        int        amount    = packet.ReadInt();
        IInventory inventory = session.Player.Inventory;

        Item item = inventory.GetByUid(itemUid);

        if (item == null || item.Amount < amount)
        {
            return;
        }

        // GMS2 Always 100% success rate
        session.Send(LapenshardPacket.Select(10000));
    }