public bool MoveNext()
 {
     if (this._index < this._collection.Count - 1)
     {
         this._index          = this._index + 1;
         this._currentElement = this._collection[this._index];
         return(true);
     }
     this._index = this._collection.Count;
     return(false);
 }
Exemple #2
0
 public RunebookInfo this[PlayUO.Item runebook]
 {
     get
     {
         for (int index = 0; index < this.m_Runebooks.Count; ++index)
         {
             RunebookInfo runebookInfo = this.m_Runebooks[index];
             if (runebookInfo.Serial == runebook.Serial)
             {
                 return(runebookInfo);
             }
         }
         RunebookInfo runebookInfo1;
         this.m_Runebooks.Add(runebookInfo1 = new RunebookInfo(runebook));
         return(runebookInfo1);
     }
 }
 public void Reset()
 {
     this._index          = -1;
     this._currentElement = (RunebookInfo)null;
 }
 public void Insert(int index, RunebookInfo value)
 {
     this.List.Insert(index, (object)value);
 }
 public void Remove(RunebookInfo value)
 {
     this.List.Remove((object)value);
 }
 public int IndexOf(RunebookInfo value)
 {
     return(this.List.IndexOf((object)value));
 }
 public bool Contains(RunebookInfo value)
 {
     return(this.List.Contains((object)value));
 }
 public int Add(RunebookInfo value)
 {
     return(this.List.Add((object)value));
 }
Exemple #9
0
        protected internal override void OnDoubleClick(int X, int Y)
        {
            Mobile mobile = GRadar.m_FocusMob == null ? World.Player : GRadar.m_FocusMob;

            if (mobile == null)
            {
                return;
            }
            int    xCenter    = mobile.Visible || mobile.Player ? mobile.X : mobile.m_KUOC_X;
            int    yCenter    = mobile.Visible || mobile.Player ? mobile.Y : mobile.m_KUOC_Y;
            int    width      = this.m_Width - 4;
            int    height     = this.m_Height - 4;
            int    xDotCenter = (width >> 1) - 1;
            int    yDotCenter = (int)((double)((GRadar.m_Image.Height >> 1) - 16) / (double)GRadar.m_Image.Height * (double)height);
            double xScale     = (double)width / 256.0;
            double yScale     = (double)height / 256.0;

            if (Engine.GMPrivs)
            {
                int num1 = (int)((double)(X - xDotCenter) / xScale / 2.0);
                int num2 = (int)((double)(Y - yDotCenter) / yScale / 2.0);
                Engine.commandEntered(string.Format("[go {0} {1}", (object)(xCenter + (num2 + num1)), (object)(yCenter + (num2 - num1))));
            }
            else
            {
                TravelAgent  travelAgent = Player.Current.TravelAgent;
                RuneInfo     rune1       = (RuneInfo)null;
                RunebookInfo book        = (RunebookInfo)null;
                int          num1        = 0;
                foreach (RunebookInfo runebook in travelAgent.Runebooks)
                {
                    if (runebook.IsValid)
                    {
                        foreach (RuneInfo rune2 in runebook.Runes)
                        {
                            int xDot;
                            int yDot;
                            GRadar.GetDotPoint(false, rune2.Point.X, rune2.Point.Y, width, height, xCenter, yCenter, xScale, yScale, xDotCenter, yDotCenter, out xDot, out yDot);
                            xDot -= X;
                            yDot -= Y;
                            xDot += 2;
                            yDot += 2;
                            int num2 = Math.Max(Math.Abs(xDot), Math.Abs(yDot));
                            if (rune1 == null || num2 < num1)
                            {
                                rune1 = rune2;
                                book  = runebook;
                                num1  = num2;
                            }
                        }
                    }
                }
                if (rune1 == null)
                {
                    return;
                }
                Mobile player = World.Player;
                bool   flag   = Control.ModifierKeys == (Keys.Shift | Keys.Control);
                new TravelContext(book, rune1, !flag).Enqueue();
            }
        }