Ejemplo n.º 1
0
        internal void InvokePlayerDropAmmoEvent(Player player, ref AmmoType type, ref ushort amount, out bool allow)
        {
            var ev = new PlayerDropAmmoEventArgs
            {
                AmmoType = type,
                Amount   = amount,
                Player   = player
            };

            PlayerDropAmmoEvent?.Invoke(ev);

            amount = (ushort)ev.Amount;
            type   = ev.AmmoType;
            allow  = ev.Allow;
        }
Ejemplo n.º 2
0
        internal void InvokePlayerDropAmmoEvent(Player player, SynapseItem item, ref uint amount, ref int type, out bool allow)
        {
            var ev = new PlayerDropAmmoEventArgs
            {
                Tablet   = item,
                AmmoType = (Enum.AmmoType)type,
                Amount   = amount,
                Player   = player
            };

            PlayerDropAmmoEvent?.Invoke(ev);

            amount = ev.Amount;
            type   = (int)ev.AmmoType;
            allow  = ev.Allow;
        }