コード例 #1
0
        private static void HandleSpin(GameSession session)
        {
            List <Tuple <int, byte, int> > items = new List <Tuple <int, byte, int> >()
            {
                new Tuple <int, byte, int>(20000527, 1, 1),
                new Tuple <int, byte, int>(20000528, 1, 1),
                new Tuple <int, byte, int>(20000529, 1, 1),
                new Tuple <int, byte, int>(12100073, 3, 1),
                new Tuple <int, byte, int>(12088889, 3, 1),
                new Tuple <int, byte, int>(11200069, 3, 1),
                new Tuple <int, byte, int>(11900089, 3, 1),
                new Tuple <int, byte, int>(11800087, 3, 1),
                new Tuple <int, byte, int>(40220121, 4, 1),
                new Tuple <int, byte, int>(11050011, 1, 1),
                new Tuple <int, byte, int>(11050020, 1, 1),
                new Tuple <int, byte, int>(20300041, 1, 1),
            };
            int randomIndex = RandomProvider.Get().Next(0, items.Count);

            session.Send(BonusGamePacket.SpinWheel(randomIndex, items[randomIndex]));
        }
コード例 #2
0
        private static void HandleOpen(GameSession session, PacketReader packet)
        {
            int gameId = packet.ReadInt();

            // Static data for now
            // Tuple<item id, rarity, quantity>
            List <Tuple <int, byte, int> > items = new List <Tuple <int, byte, int> >()
            {
                new Tuple <int, byte, int>(20000527, 1, 1),
                new Tuple <int, byte, int>(20000528, 1, 1),
                new Tuple <int, byte, int>(20000529, 1, 1),
                new Tuple <int, byte, int>(12100073, 3, 1),
                new Tuple <int, byte, int>(12088889, 3, 1),
                new Tuple <int, byte, int>(11200069, 3, 1),
                new Tuple <int, byte, int>(11900089, 3, 1),
                new Tuple <int, byte, int>(11800087, 3, 1),
                new Tuple <int, byte, int>(40220121, 4, 1),
                new Tuple <int, byte, int>(11050011, 1, 1),
                new Tuple <int, byte, int>(11050020, 1, 1),
                new Tuple <int, byte, int>(20300041, 1, 1),
            };

            session.Send(BonusGamePacket.OpenWheel(items));
        }