Exemplo n.º 1
0
        public void Direct3D_EndScene()
        {
            if (!Manager.ObjectManager.IsInGame)
            {
                return;
            }

            if (!Update)
            {
                return;
            }

            var knownspells = new List <WoWSpell>();

            for (int i = 0; i < Manager.Memory.Read <int>((IntPtr)Pointers.Spell.SpellCount); i++)
            {
                var spellId = Manager.Memory.Read <uint>((IntPtr)(Pointers.Spell.SpellBook + (i * 4)));
                knownspells.Add(new WoWSpell(spellId));
            }

            if (KnownSpells.Count() == 0)
            {
                Log.WriteLine("SpellBook: {0} spells", knownspells.Count());
            }

            KnownSpells = knownspells;

            Update = false;
        }
Exemplo n.º 2
0
        public void Direct3D_EndScene()
        {
            if (!Manager.ObjectManager.IsInGame)
            {
                return;
            }

            // --- DEBUG ----
            if (CastQueue.Count > 0 && this.Count() > 0)
            {
                if (!Manager.LocalPlayer.IsCasting)
                {
                    var spell = CastQueue.Peek();
                    //if (spell.IsReady)
                    //{
                    spell.Cast();
                    CastQueue.Dequeue();
                    //}
                }
            }
            // --------------

            if (!Update)
            {
                return;
            }

            var knownspells = new List <WoWSpell>();

            for (var i = 0; i < Manager.Memory.Read <int>((IntPtr)Pointers.Spell.SpellCount); i++)
            {
                var spellId = Manager.Memory.Read <uint>((IntPtr)(Pointers.Spell.SpellBook + (i * 4)));
                knownspells.Add(new WoWSpell(spellId));
            }

            if (KnownSpells.Count() == 0)
            {
                Log.WriteLine("SpellBook: {0} spells", knownspells.Count());
            }

            KnownSpells = knownspells;

            Update = false;
        }