public static bool CheckForVendor(Mobile from, RefinementItem item) { IPooledEnumerable eable = from.Map.GetMobilesInRange(from.Location, 12); foreach (Mobile m in eable) { if (m is ArmorRefiner && ((ArmorRefiner)m).RefineType == item.CraftType) { eable.Free(); return(true); } } bool wtf = .5 > Utility.RandomDouble(); switch (item.CraftType) { case RefinementCraftType.Blacksmith: from.SendLocalizedMessage(wtf ? 1154012 : 1154009); break; case RefinementCraftType.Tailor: from.SendLocalizedMessage(wtf ? 1154011 : 1154008); break; case RefinementCraftType.Carpenter: from.SendLocalizedMessage(wtf ? 1154013 : 1154010); break; } eable.Free(); return(false); }
public static bool CheckForVendor(Mobile from, RefinementItem item) { IPooledEnumerable eable = from.Map.GetMobilesInRange(from.Location, 12); foreach (Mobile m in eable) { if (m is ArmorRefiner && ((ArmorRefiner)m).RefineType == item.CraftType) { eable.Free(); return true; } } bool wtf = .5 > Utility.RandomDouble(); switch (item.CraftType) { case RefinementCraftType.Blacksmith: from.SendLocalizedMessage(wtf ? 1154012 : 1154009); break; case RefinementCraftType.Tailor: from.SendLocalizedMessage(wtf ? 1154011 : 1154008); break; case RefinementCraftType.Carpenter: from.SendLocalizedMessage(wtf ? 1154013 : 1154010); break; } eable.Free(); return false; }
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 static bool CanApplyToArmor(Mobile from, BaseArmor armor, RefinementItem item) { switch (item.SubCraftType) { case RefinementSubCraftType.StuddedLeather: return armor is StuddedBustierArms || armor is StuddedArms || armor is StuddedChest || armor is StuddedGloves || armor is StuddedGorget || armor is StuddedLegs; case RefinementSubCraftType.StuddedSamurai: return armor is StuddedDo || armor is StuddedHaidate || armor is StuddedHiroSode || armor is StuddedMempo || armor is StuddedSuneate; case RefinementSubCraftType.Hide: return armor is HideChest || armor is HideFemaleChest || armor is HideGloves || armor is HideGorget || armor is HidePants || armor is HidePauldrons; case RefinementSubCraftType.Bone: return armor is BoneArms || armor is BoneChest || armor is BoneGloves || armor is BoneLegs; case RefinementSubCraftType.Ringmail: return armor is RingmailArms || armor is RingmailChest || armor is RingmailGloves || armor is RingmailLegs; case RefinementSubCraftType.Chainmail: return armor is ChainChest || armor is ChainLegs || armor is ChainCoif; case RefinementSubCraftType.Platemail: return armor is FemalePlateChest || armor is PlateArms || armor is PlateChest || armor is PlateGloves || armor is PlateGorget || armor is PlateLegs || armor is PlateHelm || armor is Bascinet || armor is CloseHelm || armor is Helmet; case RefinementSubCraftType.PlatemailSamurai: return armor is DecorativePlateKabuto || armor is HeavyPlateJingasa || armor is LightPlateJingasa || armor is PlateBattleKabuto || armor is PlateDo || armor is PlateHaidate || armor is PlateHatsuburi || armor is PlateHiroSode || armor is PlateMempo || armor is PlateSuneate || armor is SmallPlateJingasa || armor is StandardPlateKabuto; case RefinementSubCraftType.GargishPlatemail: return armor is GargishPlateArms || armor is GargishPlateChest || armor is GargishPlateKilt || armor is GargishPlateLegs || armor is GargishPlateWingArmor; case RefinementSubCraftType.Dragon: return armor is DragonArms || armor is DragonChest || armor is DragonGloves || armor is DragonHelm || armor is DragonLegs; case RefinementSubCraftType.Woodland: return armor is WoodlandArms || armor is WoodlandChest || armor is WoodlandGloves || armor is WoodlandGorget || armor is WoodlandLegs; case RefinementSubCraftType.GargishStone: return armor is GargishStoneArms || armor is GargishStoneChest || armor is GargishStoneLegs || armor is GargishStoneKilt || armor is GargishStoneWingArmor; } return false; }
public InternalTarget(RefinementItem item) : base(-1, false, TargetFlags.None) { m_Item = item; m_Entry = item.Entry; }