private unsafe void PopulateLOLObjects() { try { uint firstObj = *(uint *)(Memory.LOLBaseAddress + Offsets.ObjectManager); uint lastObj = *(uint *)(Memory.LOLBaseAddress + Offsets.ObjectManager + 0x4); while (firstObj < lastObj) { var obj = new LOLObject(firstObj); switch (obj.ObjectType) { case ObjectType.Player: obj = new LOLPlayer(firstObj); break; case ObjectType.Minion: obj = new LOLMinion(firstObj); break; case ObjectType.Ward: obj = new LOLWard(firstObj); break; } if (obj.BaseAddress != Me.BaseAddress) { LOLObjectBag.Add(obj); } firstObj += 0x4; } } catch (Exception ex) { Frame.Log(ex.StackTrace); } }
private unsafe void PopulateLOLObjects() { try { uint firstObj = *(uint*)(Memory.LOLBaseAddress + Offsets.ObjectManager); uint lastObj = *(uint*)(Memory.LOLBaseAddress + Offsets.ObjectManager + 0x4); while(firstObj < lastObj) { var obj = new LOLObject(firstObj); switch (obj.ObjectType) { case ObjectType.Player: obj = new LOLPlayer(firstObj); break; case ObjectType.Minion: obj = new LOLMinion(firstObj); break; case ObjectType.Ward: obj = new LOLWard(firstObj); break; } if( obj.BaseAddress != Me.BaseAddress ) LOLObjectBag.Add(obj); firstObj += 0x4; } } catch (Exception ex) { Frame.Log(ex.StackTrace); } }