コード例 #1
0
        // Find a buff not present in last BuffSnapshot
        public GBuff FindNew()
        {
            if (BuffSnap == null)
            {
                return(null);
            }

            GBuff[] buffs = GPlayerSelf.Me.GetBuffSnapshot();

            for (int i = 0; i < buffs.Length; i++)
            {
                GBuff b = buffs[i];
                // O(n^2) FTW
                GBuff old = null;

                for (int j = 0; j < BuffSnap.Length && old == null; j++)
                {
                    GBuff b2 = BuffSnap[j];
                    if (b2.SpellID == b.SpellID)
                    {
                        old = b;
                    }
                }

                if (old == null)
                {
                    PPather.WriteLine("BuffHelper: New buff: " + b.SpellName);
                    return(b);
                }
            }

            return(null);
        }
コード例 #2
0
        private void imageAnimator_Animate(object sender, System.EventArgs e)
        {
            if (!this.animating)
            {
                return;
            }

            if (this.InvokeRequired)
            {
                this.BeginInvoke((System.EventHandler) this.imageAnimator_Animate, sender, e);
                return;
            }

            ImageAnimator.UpdateFrames(this.bmp);

            this.Draw(GBuff.Graphics);
            GBuff.Render(anim_g);
        }