示例#1
0
    public override bool Load(SecurityElement element)
    {
        if (element.Tag != "Items")
        {
            return(false);
        }

        if (element.Children != null)
        {
            foreach (SecurityElement childrenElement in element.Children)
            {
                RoomObject roomObject = RoomObject.Load(childrenElement);

                if (!_roomObjectDict.ContainsKey(roomObject.ID))
                {
                    _roomObjectDict[roomObject.ID] = roomObject;
                }
            }
        }
        return(true);
    }