Exemple #1
0
 public void EquipChanged()
 {
     GCombatGump.Update();
     this.m_Equip.Sort(LayerComparer.FromDirection(this.m_Direction));
     if (this.m_Paperdoll != null)
     {
         Gumps.OpenPaperdoll(this, this.m_PaperdollName, this.m_PaperdollCanDrag);
     }
 }
Exemple #2
0
 public void AddEquip(EquipEntry e)
 {
     if (LayerComparer.FromDirection(this.m_Direction).IsValid(e.m_Layer))
     {
         int count = this.m_Equip.Count;
         int index = 0;
         while (index < count)
         {
             EquipEntry entry = (EquipEntry)this.m_Equip[index];
             if (entry.m_Layer == e.m_Layer)
             {
                 this.m_Equip.RemoveAt(index);
                 count--;
             }
             else
             {
                 index++;
             }
         }
         this.m_Equip.Add(e);
         this.EquipChanged();
     }
 }
Exemple #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);
         }
     }
 }