Esempio n. 1
0
        private void CollectEntities(int addr, Dictionary <int, Poe_Entity> list)
        {
            int num = addr;

            addr = this.m.ReadInt(addr + 4);
            HashSet <int> hashSet = new HashSet <int>();
            Queue <int>   queue   = new Queue <int>();

            queue.Enqueue(addr);
            while (queue.Count > 0)
            {
                int num2 = queue.Dequeue();
                if (!hashSet.Contains(num2))
                {
                    hashSet.Add(num2);
                    if (this.m.ReadByte(num2 + 21) == 0 && num2 != num && num2 != 0)
                    {
                        int key = this.m.ReadInt(num2 + 12);
                        if (!list.ContainsKey(key))
                        {
                            int        address = this.m.ReadInt(num2 + 16);
                            Poe_Entity @object = base.GetObject <Poe_Entity>(address);
                            list.Add(key, @object);
                        }
                        queue.Enqueue(this.m.ReadInt(num2));
                        queue.Enqueue(this.m.ReadInt(num2 + 8));
                    }
                }
            }
        }
Esempio n. 2
0
 public Entity(PathOfExile Poe, Poe_Entity entity)
 {
     this.Poe            = Poe;
     this.InternalEntity = entity;
     this.Components     = this.InternalEntity.GetComponents();
     this.Path           = this.InternalEntity.Path;
     this.cachedId       = this.InternalEntity.ID;
     this.LongId         = this.InternalEntity.LongId;
 }
Esempio n. 3
0
 public ItemStats(Poe_Entity item)
 {
     this.item = item;
     if (ItemStats.translate == null)
     {
         ItemStats.translate = new ItemStats.StatTranslator();
     }
     this.stats = new float[Enum.GetValues(typeof(ItemStat)).Length];
     this.ParseSockets();
     this.ParseExplicitMods();
     if (item.HasComponent <Weapon>())
     {
         this.ParseWeaponStats();
     }
 }