private void AddFurnitureToItems(RoomItem item) { InteractionType type = item.GetBaseItem().InteractionType; if (!WiredUtillity.TypeIsWired(type)) { return; } if (actionItems.ContainsKey(type)) { ((List <RoomItem>)actionItems[type]).Add(item); } else { List <RoomItem> stack = new List <RoomItem>(); stack.Add(item); actionItems.Add(type, stack); } }
private static List <RoomItem> GetItems(ClientMessage message, Room room, out int itemCount) { List <RoomItem> items = new List <RoomItem>(); itemCount = message.ReadInt32(); uint itemID; RoomItem item; for (int i = 0; i < itemCount; i++) { itemID = message.ReadUInt32(); item = room.GetRoomItemHandler().GetItem(itemID); if (item != null && !WiredUtillity.TypeIsWired(item.GetBaseItem().InteractionType)) { items.Add(item); } } return(items); }