Exemple #1
0
        private void btnLoSTest_Click(object sender, EventArgs e)
        {
            const uint flags = 0x120171;

            WoWLocalPlayer me = Manager.LocalPlayer;

            if (me == null || !me.IsValid)
            {
                return;
            }
            Location start = me.Location;

            WoWObject target = me.Target;

            if (target == null || !target.IsValid)
            {
                return;
            }
            Location end = target.Location;

            start.Z += 1.3f;
            end.Z   += 1.3f;

            Manager.ExecutionQueue.AddExececution(() =>
            {
                Location result;
                bool los = (WoWWorld.Traceline(start, end, out result, flags) & 0xFF) == 0;
                Log.WriteLine("LoSTest: {0} -> {1} = {2} @ {3}", me.Location, target.Location, los, result);
            });
        }
        public override void OnStart()
        {
            if (!ObjectManager.IsInGame)
            {
                return;
            }

            var target = ObjectManager.LocalPlayer.Target;

            Print("-- {0}", target.Name);
            Print("Moving...");
            WoWWorld.ClickToMove(target.Location);

            Stop();
        }