/// <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); } } }
/// <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); }