CODE |
public virtual void XmlAddChest(BaseCreature bc, int treasureLevel) public virtual double XmlChestChance(BaseCreature bc) public virtual string XmlGetParagonLabel(BaseCreature bc) public virtual void XmlConvert(BaseCreature bc) public virtual void XmlUnConvert(BaseCreature bc) public virtual bool XmlCheckConvert(BaseCreature bc, Point3D location, Map m) public virtual bool XmlCheckArtifactChance(Mobile m, BaseCreature bc) public virtual void XmlGiveArtifactTo(Mobile m, BaseCreature bc) |
CODE |
[CommandProperty( AccessLevel.GameMaster )] public bool Tamable { get { return m_bTamable && !m_Paragon; } set { m_bTamable = value; } } |
QUOTE |
[CommandProperty( AccessLevel.GameMaster )] public bool Tamable { get { return m_bTamable && (!m_Paragon || XmlParagon.GetXmlParagon(this) is TamableParagon); } set { m_bTamable = value; } } |
QUOTE |
[CommandProperty( AccessLevel.GameMaster )] public bool Tamable { get { return m_bTamable && (!m_Paragon || XmlAttach.FindAttachment(this, typeof(XmlData), "TamableParagon") != null); } set { m_bTamable = value; } } |
QUOTE |
[CommandProperty( AccessLevel.GameMaster )] public bool Tamable { get { return m_bTamable && (!m_Paragon || XmlParagon.GetXmlParagon(this) is TamableParagon || XmlAttach.FindAttachment(this, typeof(XmlData), "TamableParagon") != null); } set { m_bTamable = value; } } |
CODE |
using System; using Server; using Server.Items; using Server.Mobiles; namespace Server.Engines.XmlSpawner2 { public class TamableParagon : XmlParagon { // string that is displayed on the xmlspawner when this is attached public override string OnIdentify(Mobile from) { return String.Format("Albino {0}", base.OnIdentify(from)); } public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)0); // version 0 } public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); // version 0 } #region constructors public TamableParagon(ASerial serial) : base(serial) { } [Attachable] public TamableParagon() : base() { Hue = 1151; // reduced buff modifiers HitsBuff = 1.5; StrBuff = 1.05; IntBuff = 1.10; DexBuff = 1.10; SkillsBuff = 1.20; SpeedBuff = 1.0; FameBuff = 1.40; KarmaBuff = 1.40; DamageBuff = 2; ArtifactFactor = 0; ChestChance = .10; ParagonLabel = "(Albino)"; } #endregion } } |
QUOTE |
public override string ApplyNameSuffix(string suffix) { XmlData customtitle = (XmlData)XmlAttach.FindAttachment(this, typeof(XmlData),"ParagonTitle"); if (customtitle != null) { // use the existing custom title instead of generating one suffix = customtitle.Data; } else if (IsParagon) { // ARTEGORDONMOD // allow custom paragon labels if (suffix.Length == 0) suffix = XmlParagon.GetParagonLabel(this); else suffix = String.Concat(suffix, " " + XmlParagon.GetParagonLabel(this)); // add the custom paragon labels to the creature in the form of an XmlData attachment so that it will remain even if the spawner association is lost such as after taming XmlAttach.AttachTo(this, new XmlData("ParagonTitle", suffix)); // end mod to allow custom paragon labels } return base.ApplyNameSuffix(suffix); } |