TheGodfather

I am looking to make a deed that is purchasable that allows a player to dehue an ethy to look like the normal colors of that ethy. Any help would be much appreciated.
 
All you're doing is changing the hue. So in the OnDoubleClick method, you would have something like target.hue=0
By definition, an ethereal mount is only ethereal because of the hue it's given (16635, I think).

If you have a script that you double click something and get a target cursor, you can pretty much copy that code for the ethy deed and have it change the hue.
 
A simple "retouched" boolean in the base ethereal could do it quite easily.
It could be used in that:

Code:
public void MountMe()
        {
            ItemID = m_MountedID;
            Layer = Layer.Mount;
            Movable = false;

            if (Hue == 0)
            {
                Hue = EtherealHue;
            }

            ProcessDelta();
            m_Rider.ProcessDelta();
            m_Rider.EquipItem(this);
            m_Rider.ProcessDelta();
            ProcessDelta();
        }

Changing:
if (Hue == 0)
to:
if (Hue == 0 && !m_Retouched)

Basically:
Code:
private bool m_Retouched;

public bool Retouched { get { return m_Retouched; } set { m_Retouched = value; } }

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

    writer.Write(4); // version
   
    writer.Write(m_Retouched);

    writer.Write(m_IsDonationItem);
    writer.Write(m_IsRewardItem);

    writer.Write(m_MountedID);
    writer.Write(m_RegularID);
    writer.Write(m_Rider);
}

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

    int version = reader.ReadInt();

    switch (version)
    {
        case 4:
            m_Retouched = reader.ReadBool();
        case 3:
            m_IsDonationItem = reader.ReadBool();
            goto case 2;
        case 2:
            m_IsRewardItem = reader.ReadBool();
            goto case 0;
        case 1:
            reader.ReadInt();
            goto case 0;
        case 0:
            {
                m_MountedID = reader.ReadInt();
                m_RegularID = reader.ReadInt();
                m_Rider = reader.ReadMobile();

                if (m_MountedID == 0x3EA2)
                {
                    m_MountedID = 0x3EAA;
                }
            }
            break;
    }

    AddFollowers();

    if (version < 3 && Weight == 0)
    {
        Weight = -1;
    }
}

That's how i see it.
The deed in question could simply be setting "Retouched = true;" on the ethereal.
I would like to push that to the repo, but i'm too lazy.
 
Back