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

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

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

            Xml = getXmlItemForSlot();

            UpdateItemGroups();
        }
Exemplo 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();
        }
Exemplo 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;
            }
        }
Exemplo 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);
        }
Exemplo 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)));
            }
        }
Exemplo 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();
        }
Exemplo n.º 8
0
 public ItemContainerVM(CharacterVM character, string name, ItemCategories categories)
 {
     Name       = name;
     _character = character;
     Categories = categories;
 }
Exemplo n.º 9
0
 public CockArrayVM(CharacterVM character, AmfObject obj)
     : base(obj, x => new CockVM(character, x))
 {
 }
Exemplo n.º 10
0
 public ItemContainerVM(CharacterVM character, string name, List <String> itemTypes)
 {
     Name       = name;
     _character = character;
     Types      = itemTypes;
 }
Exemplo n.º 11
0
 public PregnancyDataArrayVM(CharacterVM character, AmfObject obj)
     : base(obj, x => new PregnancyDataVM(character, x))
 {
     _character = character;
 }
Exemplo n.º 12
0
 public BreastsVM(CharacterVM character, AmfObject obj)
     : base(obj)
 {
     _character = character;
 }
Exemplo n.º 13
0
 public PregnancyDataVM(CharacterVM character, AmfObject obj)
     : base(obj)
 {
     _character = character;
 }
Exemplo n.º 14
0
 public KeyItemVM(CharacterVM character, AmfObject keyItems, XmlStorageClass xml)
     : base(character, keyItems, xml)
 {
 }
Exemplo 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)));
 }
Exemplo 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)));
 }
Exemplo n.º 17
0
 public CockVM(CharacterVM character, AmfObject obj)
     : base(obj)
 {
     _character = character;
 }
Exemplo n.º 18
0
 public BreastArrayVM(CharacterVM character, AmfObject obj)
     : base(obj, x => new BreastsVM(character, x))
 {
 }
Exemplo n.º 19
0
 public PerkVM(CharacterVM character, AmfObject perksArray, XmlStorageClass xml)
     : base(character, perksArray, xml)
 {
 }
Exemplo n.º 20
0
 public VaginaArrayVM(CharacterVM character, AmfObject obj)
     : base(obj, x => new VaginaVM(character, x))
 {
 }
Exemplo n.º 21
0
 public StatusEffectVM(CharacterVM character, AmfObject statuses, XmlStorageClass xml)
     : base(character, statuses, xml)
 {
 }
Exemplo n.º 22
0
 public VaginaVM(CharacterVM character, AmfObject obj)
     : base(obj)
 {
     _character = character;
 }
Exemplo 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)));
 }
Exemplo n.º 24
0
 protected StorageClassVM(CharacterVM character, AmfObject items, XmlStorageClass xml)
 {
     _xml      = xml;
     Character = character;
     _items    = items;
 }