Exemple #1
0
        internal void InvokePlayerReloadEvent(Player player, ref bool allow, Items.SynapseItem syncItemInfo)
        {
            var ev = new PlayerReloadEventArgs {
                Allow = allow, Item = syncItemInfo, Player = player
            };

            PlayerReloadEvent?.Invoke(ev);

            allow = ev.Allow;
        }
        internal void InvokePlayerDropItemPatch(Player player, Items.SynapseItem item, out bool allow)
        {
            allow = true;
            if (PlayerDropItemEvent == null)
            {
                return;
            }

            var ev = new PlayerDropItemEventArgs
            {
                Player = player,
                Item   = item,
                Allow  = true,
            };

            PlayerDropItemEvent.Invoke(ev);

            allow = ev.Allow;
        }