Esempio n. 1
0
        public CharacterVM GetCharacter(string name)
        {
            var tmpChar = GetObj("characters");

            tmpChar = tmpChar.GetObj(name);
            var tcChar = new CharacterVM(this, tmpChar);

            return(tcChar);
        }
Esempio n. 2
0
        public ItemSlotVM(CharacterVM character, AmfObject obj, List <String> types)
            : base(obj)
        {
            Types      = types;
            _character = character;

            Xml = getXmlItemForSlot();

            UpdateItemGroups();
        }
Esempio n. 3
0
        public ItemSlotVM(CharacterVM character, AmfObject obj, ItemCategories categories)
            : base(obj)
        {
            Categories  = categories;
            _character  = character;
            _categories = categories;

            //find the xml definition for this slot type
            var className = GetString("classInstance");
            var variant   = GetString("variant");

            setXml(getXmlItemForSlot(className, variant));

            UpdateItemGroups();
        }
Esempio n. 4
0
        private void setCharacter(string name)
        {
            var tmpChar = GetObj("characters");

            tmpChar    = tmpChar.GetObj(name);
            Character  = new CharacterVM(this, tmpChar);
            _character = name;
            if (name == "PC")
            {
                IsPC = true;
            }
            else
            {
                IsPC = false;
            }
        }
Esempio n. 5
0
        public ItemSlotVM(CharacterVM character, AmfObject obj, ItemCategories categories)
            : base(obj)
        {
            Categories = categories;
            _character = character;

            //find the xml definition for this slot type
            var id = GetString("classInstance");

            _xml = XmlItem.Empty;
            foreach (XmlItem item in XmlData.Current.Items)
            {
                if (item.ID == id)
                {
                    _xml = item;
                    break;
                }
            }

            //create our groups
            var groups    = new List <ItemGroupVM>();
            var enumNames = Enum.GetNames(typeof(ItemCategories));

            Array.Sort <String>(enumNames);

            //check enum support
            foreach (string ename in enumNames)
            {
                var etype = Enum.Parse(typeof(ItemCategories), ename);
                int eint  = (int)etype;
                if (((int)categories & eint) == eint)
                {
                    //create the group for this supported type
                    ItemGroupVM vm = new ItemGroupVM(ename, this);
                    if (vm.Items.Count > 0)
                    {
                        groups.Add(vm);
                    }
                }
            }

            AllGroups = new UpdatableCollection <ItemGroupVM>(groups);
        }
Esempio n. 6
0
        private void setCharacter(string name)
        {
            var tmpChar = GetObj("characters");

            tmpChar        = tmpChar.GetObj(name);
            Character      = new CharacterVM(this, tmpChar);
            _characterName = name;
            if (name == "PC")
            {
                IsPC = true;
            }
            else
            {
                IsPC = false;
            }

            if (null == Character.KeyItems && (null != _allKeyItems))
            {
                Character.KeyItems = new UpdatableCollection <KeyItemVM>(_allKeyItems.Where(x => x.Match(KeyItemSearchText)));
            }

            if (null == Character.PerkGroups && (null != _allPerks))
            {
                Character.PerkGroups = new List <PerkGroupVM>();
                var charPerks = Character.PerksArray;
                foreach (var xmlGroup in XmlData.Current.PerkGroups)
                {
                    var perksVM = xmlGroup.Perks.OrderBy(x => x.Name).Select(x => new PerkVM(this, charPerks, x)).ToArray();
                    var groupVM = new PerkGroupVM(this, xmlGroup.Name, perksVM);
                    Character.PerkGroups.Add(groupVM);
                }
            }

            if (null == Character.StatusEffects && (null != _allStatuses))
            {
                Character.StatusEffects = new UpdatableCollection <StatusEffectVM>(_allStatuses.Where(x => x.Match(RawDataSearchText)));
            }
        }
Esempio n. 7
0
        private void setCharacter(string name)
        {
            var tmpChar = GetObj("characters");

            tmpChar        = tmpChar.GetObj(name);
            Character      = new CharacterVM(this, tmpChar);
            _characterName = name;
            if (name == "PC")
            {
                IsPC = true;
            }
            else
            {
                IsPC = false;
            }

            Character.CharacterName = _characterName;

            Character.UpdateKeyItems();

            Character.UpdatePerks();

            Character.UpdateStatusEffects();
        }
Esempio n. 8
0
 public ItemContainerVM(CharacterVM character, string name, ItemCategories categories)
 {
     Name       = name;
     _character = character;
     Categories = categories;
 }
Esempio n. 9
0
 public CockArrayVM(CharacterVM character, AmfObject obj)
     : base(obj, x => new CockVM(character, x))
 {
 }
Esempio n. 10
0
 public ItemContainerVM(CharacterVM character, string name, List <String> itemTypes)
 {
     Name       = name;
     _character = character;
     Types      = itemTypes;
 }
Esempio n. 11
0
 public PregnancyDataArrayVM(CharacterVM character, AmfObject obj)
     : base(obj, x => new PregnancyDataVM(character, x))
 {
     _character = character;
 }
Esempio n. 12
0
 public BreastsVM(CharacterVM character, AmfObject obj)
     : base(obj)
 {
     _character = character;
 }
Esempio n. 13
0
 public PregnancyDataVM(CharacterVM character, AmfObject obj)
     : base(obj)
 {
     _character = character;
 }
Esempio n. 14
0
 public KeyItemVM(CharacterVM character, AmfObject keyItems, XmlStorageClass xml)
     : base(character, keyItems, xml)
 {
 }
Esempio n. 15
0
 public StatusGroupVM(CharacterVM character, string name, StatusEffectVM[] statusEffects)
 {
     Character     = character;
     Name          = name;
     StatusEffects = new UpdatableCollection <StatusEffectVM>(statusEffects.Where(x => x.Match(Character.Game.RawDataSearchText)));
 }
Esempio n. 16
0
 public PerkGroupVM(CharacterVM character, string name, PerkVM[] perks)
 {
     Character = character;
     Name      = name;
     Perks     = new UpdatableCollection <PerkVM>(perks.Where(x => x.Match(Character.Game.SearchText)));
 }
Esempio n. 17
0
 public CockVM(CharacterVM character, AmfObject obj)
     : base(obj)
 {
     _character = character;
 }
Esempio n. 18
0
 public BreastArrayVM(CharacterVM character, AmfObject obj)
     : base(obj, x => new BreastsVM(character, x))
 {
 }
Esempio n. 19
0
 public PerkVM(CharacterVM character, AmfObject perksArray, XmlStorageClass xml)
     : base(character, perksArray, xml)
 {
 }
Esempio n. 20
0
 public VaginaArrayVM(CharacterVM character, AmfObject obj)
     : base(obj, x => new VaginaVM(character, x))
 {
 }
Esempio n. 21
0
 public StatusEffectVM(CharacterVM character, AmfObject statuses, XmlStorageClass xml)
     : base(character, statuses, xml)
 {
 }
Esempio n. 22
0
 public VaginaVM(CharacterVM character, AmfObject obj)
     : base(obj)
 {
     _character = character;
 }
Esempio n. 23
0
 public KeyItemGroupVM(CharacterVM character, string name, KeyItemVM[] keyItems)
 {
     Character = character;
     Name      = name;
     KeyItems  = new UpdatableCollection <KeyItemVM>(keyItems.Where(x => x.Match(Character.Game.KeyItemSearchText)));
 }
Esempio n. 24
0
 protected StorageClassVM(CharacterVM character, AmfObject items, XmlStorageClass xml)
 {
     _xml      = xml;
     Character = character;
     _items    = items;
 }