Esempio n. 1
0
        private BNpcLocation[] BuildLocations(Libra.BNpcName libraRow)
        {
            var values     = new List <BNpcLocation>();
            var placeNames = Collection.Collection.GetSheet <PlaceName>();

            foreach (var srcRegion in libraRow.Regions)
            {
                var region = placeNames[srcRegion.Item1];

                foreach (var srcZone in srcRegion.Item2)
                {
                    var zone = placeNames[srcZone.Item1];
                    int lvMin, lvMax;
                    if (srcZone.Item2.Length > 0)
                    {
                        lvMin = srcZone.Item2.Min();
                        lvMax = srcZone.Item2.Max();
                    }
                    else
                    {
                        lvMax = lvMin = 0;
                    }

                    values.Add(new BNpcLocation(region, zone, lvMin, lvMax));
                }
            }

            return(values.ToArray());
        }
Esempio n. 2
0
 public BNpc(Collections.BNpcCollection collection, Libra.BNpcName libra)
 {
     this.Collection = collection;
     _LibraRow       = libra;
     this.Key        = libra.Key;
     this.Base       = collection.BaseSheet[(int)libra.BaseKey];
     this.Name       = collection.NameSheet[(int)libra.NameKey];
 }
Esempio n. 3
0
        private BNpc GetOrCreate(Libra.BNpcName libra)
        {
            BNpc npc;

            if (!_InnerDictionary.TryGetValue(libra.Key, out npc))
            {
                npc = Create(libra);
            }
            return(npc);
        }
Esempio n. 4
0
        private InstanceContent[] BuildInstanceContents(Libra.BNpcName libraRow)
        {
            var values           = new List <InstanceContent>();
            var instanceContents = Collection.Collection.GetSheet <InstanceContent>();

            foreach (var srcContent in libraRow.InstanceContents)
            {
                values.Add(instanceContents[srcContent]);
            }

            return(values.ToArray());
        }
Esempio n. 5
0
        private Item[] BuildItems(Libra.BNpcName libraRow)
        {
            var values = new List <Item>();
            var items  = Collection.Collection.GetSheet <Item>();

            foreach (var srcItem in libraRow.Items)
            {
                values.Add(items[srcItem]);
            }

            return(values.ToArray());
        }
Esempio n. 6
0
 public BNpc(BNpcCollection bNpcCollection, Libra.BNpcName libra)
 {
     this.bNpcCollection = bNpcCollection;
     this.libra          = libra;
 }
Esempio n. 7
0
 private BNpc Create(Libra.BNpcName libra)
 {
     return(new BNpc(this, libra));
 }
Esempio n. 8
0
 private BNpc GetOrCreate(Libra.BNpcName libra)
 {
     return(null);
 }
Esempio n. 9
0
 public BNpcData(XivCollection collection, Libra.BNpcName libraRow)
 {
     _Base = collection.GetSheet <BNpcBase>()[(int)libraRow.BaseKey];
     _Name = collection.GetSheet <BNpcName>()[(int)libraRow.NameKey];
 }