Example #1
0
        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);
            }
        }
Example #2
0
        private static List <RoomItem> GetItems(ClientMessage message, Room room, out int itemCount)
        {
            List <RoomItem> items = new List <RoomItem>();

            itemCount = message.PopWiredInt32();

            uint     itemID;
            RoomItem item;

            for (int i = 0; i < itemCount; i++)
            {
                itemID = message.PopWiredUInt();
                item   = room.GetRoomItemHandler().GetItem(itemID);

                if (item != null && !WiredUtillity.TypeIsWired(item.GetBaseItem().InteractionType))
                {
                    items.Add(item);
                }
            }

            return(items);
        }