Beispiel #1
0
        public void OnAgentUpdated()
        {
            Item obj = this._item;
            int  id  = obj.ID;
            int  hue = (int)obj.Hue;

            this.GumpID = Gumps.GetEquipGumpID(id, this._mobile.BodyGender, ref hue);
            this.Hue    = Hues.GetItemHue(id, hue);
            int num = (int)obj.Layer;

            this.m_QuickDrag = num < 1 || num > 24 || num == 11 || num == 16;
        }
Beispiel #2
0
        private Texture GetPreviewTexture()
        {
            Item obj = this._dragPreview;

            if (obj != null)
            {
                int     id          = obj.ID;
                int     hue         = (int)obj.Hue;
                int     equipGumpId = Gumps.GetEquipGumpID(id, this.m_Mobile.BodyGender, ref hue);
                Texture gump        = Hues.GetItemHue(id, hue).GetGump(equipGumpId);
                if (gump != null && !gump.IsEmpty())
                {
                    return(gump);
                }
            }
            return((Texture)null);
        }
Beispiel #3
0
 protected internal override void OnDragEnter(Gump g)
 {
     if ((g != null) && (g.GetType() == typeof(GDraggedItem)))
     {
         GDraggedItem item  = (GDraggedItem)g;
         Item         item2 = item.Item;
         int          iD    = item2.ID;
         int          hue   = item2.Hue;
         Engine.ItemArt.Translate(ref iD, ref hue);
         if (Map.m_ItemFlags[iD][TileFlag.Wearable])
         {
             if (this.m_Image != null)
             {
                 Gumps.Destroy(this.m_Image);
             }
             this.m_Image       = new GImage(Gumps.GetEquipGumpID(iD, this.m_Gender, ref hue), Hues.GetItemHue(iD, hue), 8, 0x13);
             this.m_Image.Alpha = 0.5f;
             int           count     = base.m_Children.Count;
             LayerComparer paperdoll = LayerComparer.Paperdoll;
             int           num4      = paperdoll.GetValue(iD, (Layer)Map.GetQuality(iD));
             for (int i = 0; i < base.m_Children.Count; i++)
             {
                 Gump gump = base.m_Children[i];
                 if (gump.GetType() == typeof(GPaperdollItem))
                 {
                     GPaperdollItem item3 = (GPaperdollItem)gump;
                     if (paperdoll.GetValue(item3.Item.ID, (Layer)((byte)item3.Layer)) < num4)
                     {
                         count = i;
                         break;
                     }
                 }
             }
             base.m_Children.Insert(count, this.m_Image);
         }
     }
 }