10 public override string Id
20 public override bool CanChangeIconColor
30 public override string TextTip
34 string text = this.text.IsEmpty(
"EQSet".lang()) + base.TextHotkey() + Environment.NewLine;
35 using (List<int>.Enumerator enumerator = this.ids.GetEnumerator())
37 while (enumerator.MoveNext())
39 int i = enumerator.Current;
41 text += ((thing ==
null) ?
"missingEQ".lang() : thing.Name);
42 text += Environment.NewLine;
45 return text.TrimEnd(Environment.NewLine.ToCharArray());
55 if (bodySlot.elementId != 44 && bodySlot.thing !=
null)
57 this.ids.Add(bodySlot.thing.uid);
65 public override void Perform()
67 for (
int j = 0; j < 2; j++)
69 Dictionary<int, Thing> dictionary =
new Dictionary<int, Thing>();
72 if (bodySlot.elementId != 44 && bodySlot.thing !=
null && bodySlot.thing.blessedState >= BlessedState.Normal)
74 dictionary.Add(bodySlot.thing.c_equippedSlot - 1, bodySlot.thing);
75 EClass.pc.body.Unequip(bodySlot.thing,
true);
79 using (List<int>.Enumerator enumerator2 = this.ids.GetEnumerator())
81 while (enumerator2.MoveNext())
83 int i = enumerator2.Current;
84 Thing thing =
EClass.pc.things.Find((
Thing t) => t.uid == i && !t.isEquipped,
true);
88 if (slot !=
null && thing != slot.thing)
90 Card parentCard = thing.parentCard;
91 int invX = thing.invX;
92 int invY = thing.invY;
93 EClass.pc.body.Equip(thing, slot,
false);
94 if (dictionary.ContainsKey(slot.index))
96 Thing thing2 = dictionary[slot.index];
97 if (thing2.uid != thing.uid)
99 parentCard.AddThing(thing2,
true, -1, -1);
103 dictionary.Remove(slot.index);
112 foreach (
Thing thing3
in dictionary.Values)
114 if (!thing3.isEquipped && !card.things.IsFull(thing3,
true,
true))
116 card.AddThing(thing3,
true, -1, -1);
125 public override void OnShowContextMenu(UIContextMenu m)
127 base.OnShowContextMenu(m);
128 m.AddButton(
"updateEQ", delegate()
136 public List<int> ids =
new List<int>();
142 public Card container;