public override void OnSingleClick(Mobile from) { LabelToExpansion(from); string v = " "; if (!CraftResources.IsStandard(Resource)) { int num = CraftResources.GetLocalizationNumber(Resource); if (num > 0) { v = String.Format("#{0}", num); } else { v = CraftResources.GetName(Resource); } } LabelTo(from, 1061119, v); // ~1_LEATHER_TYPE~ runic sewing kit if (ShowUsesRemaining) { DisplayDurabilityTo(from); } }
public override void AddNameProperties(ObjectPropertyList list) { base.AddNameProperties(list); int index = CraftResources.GetIndex(Resource); if (index >= 1 && index <= 8) { return; } if (!CraftResources.IsStandard(Resource)) { int num = CraftResources.GetLocalizationNumber(Resource); if (num > 0) { list.Add(num); } else { list.Add(CraftResources.GetName(Resource)); } } }
public override void AddNameProperties(ObjectPropertyList list) { base.AddNameProperties(list); if (!CraftResources.IsStandard(Resource)) { list.Add(1060662, "{0}\t{1}", "Resource", CraftResources.GetName(Resource)); } }
public override void OnSingleClick(Mobile from) { if (CraftResources.IsStandard(m_Resource)) { LabelTo(from, string.Format(Amount == 1 ? "{0} log" : "{0} logs", Amount)); } else { LabelTo(from, string.Format("{0} {1} log{2}", Amount, CraftResources.GetName(m_Resource).ToLower(), Amount > 1 ? "s" : "")); } }
public BaseLog(CraftResource resource, int amount) : base(0x1BDD) { Stackable = true; Weight = 0.3; Amount = amount; m_Resource = resource; Name = CraftResources.GetName(resource) + " log"; Hue = CraftResources.GetHue(resource); }
public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); if (!CraftResources.IsStandard(m_Resource)) { /*int num = CraftResources.GetLocalizationNumber( m_Resource ); * * if ( num > 0 ) * list.Add( num ); * else*/ list.Add(CraftResources.GetName(m_Resource)); } }
public override void GetProperties(ObjectPropertyList list) { int oldUses = m_UsesRemaining; CheckReplenishUses(false); base.GetProperties(list); if (m_ReplenishesCharges) { list.Add(1070928); // Replenish Charges } if (m_Slayer != SlayerName.None) { SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer); if (entry != null) { list.Add(entry.Title); } } if (m_Slayer2 != SlayerName.None) { SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2); if (entry != null) { list.Add(entry.Title); } } if (!CraftResources.IsStandard(m_Resource)) { int num = CraftResources.GetLocalizationNumber(m_Resource); if (num > 0) { list.Add(num); } else { list.Add(CraftResources.GetName(m_Resource)); } } if (m_UsesRemaining != oldUses) { Timer.DelayCall(TimeSpan.Zero, new TimerCallback(InvalidateProperties)); } }
public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); if (!CraftResources.IsStandard(this.m_Resource)) { int num = CraftResources.GetLocalizationNumber(this.m_Resource); if (num > 0) { list.Add(num); } else { list.Add(CraftResources.GetName(this.m_Resource)); } } }
public override void GetProperties(IPropertyList list) { base.GetProperties(list); if (!CraftResources.IsStandard(_resource)) { var num = CraftResources.GetLocalizationNumber(_resource); if (num > 0) { list.Add(num); } else { list.Add(CraftResources.GetName(_resource)); } } }
public override void OnSingleClick(Mobile from) { string v = " "; if (!CraftResources.IsStandard(Resource)) { int num = CraftResources.GetLocalizationNumber(Resource); if (num > 0) { v = String.Format("#{0}", num); } else { v = CraftResources.GetName(Resource); } } LabelTo(from, 1061119, v); // ~1_LEATHER_TYPE~ runic sewing kit }
public override LocalizedText GetNameProperty() { string v = " "; if (!CraftResources.IsStandard(Resource)) { int num = CraftResources.GetLocalizationNumber(Resource); if (num > 0) { v = String.Format("#{0}", num); } else { v = CraftResources.GetName(Resource); } } return(new LocalizedText(1061119, v)); // ~1_LEATHER_TYPE~ runic sewing kit }
public override void AddNameProperty(ObjectPropertyList list) { string v = " "; if (!CraftResources.IsStandard(this.Resource)) { int num = CraftResources.GetLocalizationNumber(this.Resource); if (num > 0) { v = String.Format("#{0}", num); } else { v = CraftResources.GetName(this.Resource); } } list.Add(1061119, v); // ~1_LEATHER_TYPE~ runic sewing kit }
public override void OnSingleClick(Mobile from) { var v = " "; if (!CraftResources.IsStandard(Resource)) { var num = CraftResources.GetLocalizationNumber(Resource); if (num > 0) { v = $"#{num}"; } else { v = CraftResources.GetName(Resource); } } LabelTo(from, 1061119, v); // ~1_LEATHER_TYPE~ runic sewing kit }
public override void AddNameProperty(IPropertyList list) { var v = " "; if (!CraftResources.IsStandard(Resource)) { var num = CraftResources.GetLocalizationNumber(Resource); if (num > 0) { v = $"#{num}"; } else { v = CraftResources.GetName(Resource); } } list.Add(1061119, v); // ~1_LEATHER_TYPE~ runic sewing kit }
public override void AddNameProperty(IPropertyList list) { if (CraftResources.IsStandard(Resource)) { list.Add(1061119, " "); // ~1_LEATHER_TYPE~ runic sewing kit return; } var num = CraftResources.GetLocalizationNumber(Resource); if (num > 0) { // ~1_LEATHER_TYPE~ runic sewing kit list.Add(1061119, $"#{num}"); } else { // ~1_LEATHER_TYPE~ runic sewing kit list.Add(1061119, CraftResources.GetName(Resource)); } }
public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); if (m_AosAttributes.Brittle != 0) { list.Add(1116209); // Brittle } if (m_AosSkillBonuses != null) { m_AosSkillBonuses.GetProperties(list); } base.AddResistanceProperties(list); int prop = 0; if ((prop = (m_AosAttributes.WeaponDamage)) != 0) { list.Add(1060401, prop.ToString()); // damage increase ~1_val~% } if ((prop = m_AosAttributes.DefendChance) != 0) { list.Add(1060408, prop.ToString()); // defense chance increase ~1_val~% } if ((prop = m_AosAttributes.EnhancePotions) != 0) { list.Add(1060411, prop.ToString()); // enhance potions ~1_val~% } if ((prop = m_AosAttributes.CastRecovery) != 0) { list.Add(1060412, prop.ToString()); // faster cast recovery ~1_val~ } if ((prop = m_AosAttributes.CastSpeed) != 0) { list.Add(1060413, prop.ToString()); // faster casting ~1_val~ } if ((prop = (m_AosAttributes.AttackChance)) != 0) { list.Add(1060415, prop.ToString()); // hit chance increase ~1_val~% } if ((prop = m_AosAttributes.BonusDex) != 0) { list.Add(1060409, prop.ToString()); // dexterity bonus ~1_val~ } if ((prop = m_AosAttributes.BonusHits) != 0) { list.Add(1060431, prop.ToString()); // hit point increase ~1_val~ } if ((prop = m_AosAttributes.BonusInt) != 0) { list.Add(1060432, prop.ToString()); // intelligence bonus ~1_val~ } if ((prop = m_AosAttributes.LowerManaCost) != 0) { list.Add(1060433, prop.ToString()); // lower mana cost ~1_val~% } if ((prop = m_AosAttributes.LowerRegCost) != 0) { list.Add(1060434, prop.ToString()); // lower reagent cost ~1_val~% } if ((prop = m_LowerStatReq) != 0) { list.Add(1060435, m_LowerStatReq.ToString()); // lower requirements ~1_val~% } if ((prop = m_AosAttributes.SpellChanneling) != 0) { list.Add(1060482); // spell channeling } if (!CraftResources.IsStandard(m_Resource)) { list.Add(CraftResources.GetName(m_Resource)); } if ((prop = (GetLuckBonus() + m_AosAttributes.Luck)) != 0) { list.Add(1060436, prop.ToString()); // luck ~1_val~ } if ((prop = m_AosAttributes.BonusMana) != 0) { list.Add(1060439, prop.ToString()); // mana increase ~1_val~ } if ((prop = m_AosAttributes.RegenMana) != 0) { list.Add(1060440, prop.ToString()); // mana regeneration ~1_val~ } if ((prop = m_AosAttributes.NightSight) != 0) { list.Add(1060441); // night sight } if ((prop = m_AosAttributes.ReflectPhysical) != 0) { list.Add(1060442, prop.ToString()); // reflect physical damage ~1_val~% } if ((prop = m_AosAttributes.RegenStam) != 0) { list.Add(1060443, prop.ToString()); // stamina regeneration ~1_val~ } if ((prop = m_AosAttributes.RegenHits) != 0) { list.Add(1060444, prop.ToString()); // hit point regeneration ~1_val~ } if ((prop = m_AosAttributes.SpellDamage) != 0) { list.Add(1060483, prop.ToString()); // spell damage increase ~1_val~% } if ((prop = m_AosAttributes.BonusStam) != 0) { list.Add(1060484, prop.ToString()); // stamina increase ~1_val~ } if ((prop = m_AosAttributes.BonusStr) != 0) { list.Add(1060485, prop.ToString()); // strength bonus ~1_val~ } //if ( (prop = m_AosAttributes.WeaponSpeed) != 0 ) // list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~% int hookCliloc = BaseFishingHook.GetHookType(m_HookType); if (m_HookType > HookType.None && hookCliloc > 0) { list.Add(1150885, String.Format("#{0}", hookCliloc)); //special hook: ~1_token~ list.Add(1150889, String.Format("#{0}", BaseFishingHook.GetCondition(m_HookUses))); //Hook condition: ~1_val~ } if (m_BaitType != null) { object label = FishInfo.GetFishLabel(m_BaitType); if (label is int) { list.Add(1116468, String.Format("#{0}", (int)label)); //baited to attract: ~1_val~ } else if (label is string) { list.Add(1116468, (string)label); } list.Add(1116466, m_BaitUses.ToString()); // amount: ~1_val~ } list.Add(1061170, GetStrRequirement().ToString()); // strength requirement ~1_val~ }
public override void OnSingleClick(Mobile from) { LabelTo(from, string.Format("{0} {1} ore{2}", Amount, CraftResources.GetName(m_Resource).ToLower(), Amount != 1 ? "s" : "")); }
public override void OnSingleClick(Mobile from) { LabelTo(from, string.Format("{0} {1} ingot{2}", Amount > 1 ? Amount.ToString() : "", CraftResources.GetName(m_Resource).ToLower(), Amount > 1 ? "s" : "")); }
public void GetNameProperty() { if (!PlayerConstructed) { return; } string metaltype = ""; string gemtype = ""; if (Resource != CraftResource.None) { metaltype = CraftResources.GetName(m_Resource); } if (Resource == CraftResource.MIron) { Hue = 2105; } if (Resource == CraftResource.MGold) { Hue = 0; } switch (GemType) { case GemType.Amber: gemtype = "d'ambres"; break; case GemType.Amethyst: gemtype = "d'améthystes"; break; case GemType.Citrine: gemtype = "de citrines"; break; case GemType.Diamond: gemtype = "de diamants"; break; case GemType.Emerald: gemtype = "d'émeraudes"; break; case GemType.Ruby: gemtype = "de rubis"; break; case GemType.Sapphire: gemtype = "de saphirs"; break; case GemType.StarSapphire: gemtype = "de saphirs étoilés"; break; case GemType.Tourmaline: gemtype = "de tourmalines"; break; } if (this is GoldBracelet) { Name = string.Format("Un bracelet{0}{1}", Resource != CraftResource.None ? " en " + metaltype : "", GemType != GemType.None ? " serti " + gemtype : ""); } else if (this is GoldRing) { Name = string.Format("Une bague{0}{1}", Resource != CraftResource.None ? " en " + metaltype : "", GemType != GemType.None ? " sertie " + gemtype : ""); } else if (this is GoldBeadNecklace) { Name = string.Format("Un collier de perle{0}{1}", Resource != CraftResource.None ? " en " + metaltype : "", GemType != GemType.None ? " serti " + gemtype : ""); } else if (this is GoldNecklace) { Name = string.Format("Un collier{0}{1}", Resource != CraftResource.None ? " en " + metaltype : "", GemType != GemType.None ? " serti " + gemtype : ""); } else if (this is GoldEarrings) { Name = string.Format("Des boucles d'oreille{0}{1}", Resource != CraftResource.None ? " en " + metaltype : "", GemType != GemType.None ? " serties " + gemtype : ""); } else if (this is Diademe) { Name = string.Format("Un diadème{0}{1}", Resource != CraftResource.None ? " en " + metaltype : "", GemType != GemType.None ? " serti " + gemtype : ""); } else if (this is DiademeDecore) { Name = string.Format("Un diadème{0}{1}", Resource != CraftResource.None ? " en " + metaltype : "", GemType != GemType.None ? " richement serti " + gemtype : ""); } else { Name = string.Format("Un bijou{0}{1}", Resource != CraftResource.None ? " en " + metaltype : "", GemType != GemType.None ? " serti " + gemtype : ""); } }
public RunicHouseGump(Mobile from, RunicHouse house) : base(25, 25) { m_From = from; rh_House = house; from.CloseGump(typeof(RunicHouseGump)); AddPage(0); AddBackground(50, 10, 600, 360, 5170); AddPage(0); AddLabel(280, 30, 25, "Runic Box"); for (int line = 0; line < 13; line++) { AddLabel(80, 70 + line * 20, 0x486, (CraftResources.GetName(((CraftResource)line + 2))).ToString()); AddLabel(160, 50, 1164, "Tinker"); if (rh_House.Tinker.ContainsKey(((CraftResource)line + 2))) { AddButton(155, 68 + line * 20, 4015, 4016, 52 + line, GumpButtonType.Reply, 0); AddLabel(190, 70 + line * 20, 0x480, rh_House.Tinker[((CraftResource)line + 2)].ToString()); } else { AddButton(155, 68 + line * 20, 4006, 4007, 52 + line, GumpButtonType.Reply, 0); AddLabel(190, 70 + line * 20, 0x480, "0"); } AddLabel(240, 50, 1164, "Blacksmith"); if (rh_House.Rest.ContainsKey(((CraftResource)line + 2))) { AddButton(235, 68 + line * 20, 4015, 4016, 2 + line, GumpButtonType.Reply, 0); AddLabel(270, 70 + line * 20, 0x480, rh_House.Rest[((CraftResource)line + 2)].ToString()); } else { AddButton(235, 68 + line * 20, 4006, 4007, 2 + line, GumpButtonType.Reply, 0); AddLabel(270, 70 + line * 20, 0x480, "0"); } AddLabel(390, 50, 1164, "Tailor"); if (line < 10) { AddLabel(320, 70 + line * 20, 0x486, (CraftResources.GetName(((CraftResource)line + 102))).ToString()); if (rh_House.Tailor.ContainsKey(((CraftResource)line + 102))) { AddButton(385, 68 + line * 20, 4015, 4016, 102 + line, GumpButtonType.Reply, 0); AddLabel(420, 70 + line * 20, 0x480, rh_House.Tailor[((CraftResource)line + 102)].ToString()); } else { AddButton(385, 68 + line * 20, 4006, 4007, 102 + line, GumpButtonType.Reply, 0); AddLabel(420, 70 + line * 20, 0x480, "0"); } } AddLabel(550, 50, 1164, "Fletcher"); if (line < 11) { AddLabel(470, 70 + line * 20, 0x486, (CraftResources.GetName(((CraftResource)line + 301))).ToString()); if (rh_House.Rest.ContainsKey(((CraftResource)line + 301))) { AddButton(545, 68 + line * 20, 4015, 4016, 301 + line, GumpButtonType.Reply, 0); AddLabel(580, 70 + line * 20, 0x480, rh_House.Rest[((CraftResource)line + 301)].ToString()); } else { AddButton(545, 68 + line * 20, 4006, 4007, 301 + line, GumpButtonType.Reply, 0); AddLabel(580, 70 + line * 20, 0x480, "0"); } } AddLabel(470, 310, 0x486, "Add"); AddButton(545, 308, 4015, 4016, 999, GumpButtonType.Reply, 0); } }