示例#1
0
 /// <summary>
 /// Removes item from map.
 /// </summary>
 public void RemoveItem(int itemId)
 {
     if (Items.TryRemove(itemId, out var mapItem))
     {
         foreach (var player in GetAllPlayers(true))
         {
             _packetsHelper.SendRemoveItem(player.Client, mapItem);
         }
     }
 }
示例#2
0
        /// <summary>
        /// Removes item from map.
        /// </summary>
        public MapItem RemoveItem(int itemId)
        {
            if (Items.TryRemove(itemId, out var mapItem))
            {
                mapItem.StopRemoveTimer();
                foreach (var player in GetAllPlayers(true))
                {
                    _packetsHelper.SendRemoveItem(player.Client, mapItem);
                }
            }

            return(mapItem);
        }