public void KillNearbyTargets() { while (SearchForTarget()) { mainPlayer.Refresh(mainwow); while (mainPlayer.Healthpercent < 0.7 || mainPlayer.Powerpercent < 0.7) { System.Threading.Thread.Sleep(100); mainPlayer.Refresh(mainwow); } KillTarget(); } }
public void Refresh() { wowConnection.TryToRefreshObjectManager(); WoWObject.GetAllObjects(ref Game1.allUnits, ref Game1.allSpells, ref Game1.allPlayers, wowConnection); player.Refresh(wowConnection); byte combatByte = wowConnection.Connection.ReadByte(wowConnection.Connection.ReadUInt(player.BaseAddress + MemoryOffsets.ObjectManagerLocalCombatInfoArray) + MemoryOffsets.UnitIsInCombat); channeledSpell = wowConnection.Connection.ReadByte((uint)wowConnection.Connection.MainModule.BaseAddress + MemoryOffsets.GlobalInfoSpellBeingChanelled); castedSpell = wowConnection.Connection.ReadByte((uint)wowConnection.Connection.MainModule.BaseAddress + MemoryOffsets.GlobalInfoSpellBeingCasted); isInCombat = (combatByte & 0x4) != 0; RefreshTarget(); RefreshPet(); }