public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int v = reader.ReadInt(); m_RefinementType = (RefinementType)reader.ReadInt(); m_CraftType = (RefinementCraftType)reader.ReadInt(); m_SubCraftType = (RefinementSubCraftType)reader.ReadInt(); m_ModType = (ModType)reader.ReadInt(); m_ModAmount = reader.ReadInt(); m_CheckBonus = reader.ReadBool(); m_Entry = new ModEntry(reader); }
public RefinementGump(RefinementItem item) : base(50, 50) { m_Item = item; m_Entry = item.Entry; if (m_Entry == null) return; AddBackground(0, 0, 400, 350, 83); int y = 70; m_CanRefine = true; AddHtmlLocalized(10, 10, 200, 20, 1154094, DarkGreen, false, false); // Refinement Crafting Options AddHtmlLocalized(10, 35, 200, 20, 1153967, m_Item.GetNameArgs(), DarkGreen, false, false); for (int i = 0; i < m_Item.ModAmount; i++) { AddButton(15, y, 4005, 4007, i + 100, GumpButtonType.Reply, 0); AddHtmlLocalized(55, y, 150, 16, 1154097 + i, WhiteLabel, false, false); // CHOOSE RESIST #1 AddHtmlLocalized(230, y, 150, 16, GetResistanceLabel(m_Entry.Resists[i], m_Entry.Values[i]), WhiteLabel, false, false); if (!m_Item.CheckBonus && i == m_Item.ModAmount - 1 && m_Item.GetBonusChance() > 0) { if (Utility.Random(100) <= m_Item.GetBonusChance()) m_Item.ModAmount++; m_Item.CheckBonus = true; } if (m_CanRefine && m_Entry.Values[i] == 0) m_CanRefine = false; y += 20; } y += 50; AddHtmlLocalized(10, y, 150, 16, 1154106, Yellow, false, false); // MODIFICATIONS: AddHtmlLocalized(170, y, 10, 16, 1114057, m_Item.ModAmount.ToString(), Yellow, false, false); if (m_CanRefine) { AddHtmlLocalized(230, y, 150, 16, 1154105, WhiteLabel, false, false); // REFINE ITEM AddButton(360, y, 4014, 4016, 1, GumpButtonType.Reply, 0); } else AddHtmlLocalized(230, y, 150, 16, 1154108, WhiteLabel, false, false); // SELECT RESISTS y += 25; AddHtmlLocalized(10, y, 200, 16, 1154107, WhiteLabel, false, false); // BONUS MOD CHANCE: AddHtmlLocalized(170, y, 15, 16, 1114057, m_Item.GetBonusChance().ToString() + "%", WhiteLabel, false, false); AddButton(10, 320, 4017, 4019, 0, GumpButtonType.Reply, 0); AddHtmlLocalized(50, 320, 100, 16, 3002084, WhiteLabel, false, false); // Close AddHtmlLocalized(250, 320, 100, 16, 3000391, WhiteLabel, false, false); // Help AddButton(360, 320, 4011, 4013, 2, GumpButtonType.Reply, 0); }
public RefinementItem(RefinementType type, RefinementCraftType craftType, RefinementSubCraftType srtype, ModType modType) : base(0) { m_RefinementType = type; m_CraftType = craftType; m_SubCraftType = srtype; ModType = modType; GetItemID(); GetHue(); ApplyModAmount(); m_Entry = new ModEntry(m_ModAmount); m_CheckBonus = false; }
public InternalTarget(RefinementItem item) : base(-1, false, TargetFlags.None) { m_Item = item; m_Entry = item.Entry; }