BelfortUO

Member
ServUO Version
Publish 57
Ultima Expansion
Time Of Legends
Is there a way to force a crafter name on item?

For example:
Code:
using System;
using Server;

namespace Server.Items
{
    public class Spellweaving : GoldRing
    {

        [Constructable]
        public Spellweaving()
        {
            Name = "Spellweaving";
            SkillBonuses.SetValues( 0, SkillName.Spellweaving, 10 );
            m_Crafter = "Zoltar" //Yes I know this doesn't work.
        }

        public Spellweaving( Serial serial ) : base( serial )
        {
        }

        public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );

            writer.Write( (int) 0 );
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();
        }

    }
}
**I think the ServUO version is correct
 
You'd want to do this with the ICraftable interface like this
Code:
    public class Spellweaving : GoldRing, ICraftable
    {

        [Constructable]
        public Spellweaving()
        {
            Name = "Spellweaving";
            SkillBonuses.SetValues(0, SkillName.Spellweaving, 10);
            //m_Crafter = "Zoltar" //Yes I know this doesn't work.
}

        public Spellweaving(Serial serial) : base(serial)
        {
        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            writer.Write((int)0);
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();
        }

        #region ICraftable Members
        public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, ITool tool, CraftItem craftItem, int resHue)
        {
            this.Crafter = from;
            return quality;
        }
        #endregion

    }
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back