DragnMaw
Member
I have a few items, none of them stackable, that for some reason as soon as I add to the GetProperties for text underneath the normal properties, the name vanishes. (If the item is stackable, and theres 2 it works.)
public class OnlineTicket : Item
{
[Constructable]
public OnlineTicket()
: base(5360)
{
Name = "Online Ticket";
Weight = 0.1;
Hue = 1916;
}
// public override void GetProperties( ObjectPropertyList list )
// {
// base.GetProperties( list );
//
// list.Add( "Reward Item" );
// list.Add( "Double Click: Randomly recieve your rewards" );
// list.Add( "Or turn in to complete a daily quest" );
// }
Theres the code (Commented out atm so it works), and I've looked into everything in Item.cs about AddNameProperty, and GetProperties, and I've even merged the entire GetProperties into the override, even tho it shouldn't need it, and still no go.
public virtual void AddNameProperty(ObjectPropertyList list)
{
string name = Name ?? string.Empty;
if (string.IsNullOrWhiteSpace(name))
{
if (m_Amount <= 1)
{
list.Add(LabelNumber);
}
else
{
list.Add(1050039, "{0}\t#{1}", m_Amount, LabelNumber); // ~1_NUMBER~ ~2_ITEMNAME~
}
}
else
{
if (m_Amount <= 1)
{
list.Add(name);
}
else
{
list.Add(1050039, "{0}\t{1}", m_Amount, Name); // ~1_NUMBER~ ~2_ITEMNAME~
}
}
}
public virtual void GetProperties(ObjectPropertyList list)
{
AddNameProperties(list);
AddItemSocketProperties(list);
if (Spawner != null)
{
Spawner.GetSpawnProperties(this, list);
}
AddItemPowerProperties(list);
}
Anyone know how to make the item name show up properly?
public class OnlineTicket : Item
{
[Constructable]
public OnlineTicket()
: base(5360)
{
Name = "Online Ticket";
Weight = 0.1;
Hue = 1916;
}
// public override void GetProperties( ObjectPropertyList list )
// {
// base.GetProperties( list );
//
// list.Add( "Reward Item" );
// list.Add( "Double Click: Randomly recieve your rewards" );
// list.Add( "Or turn in to complete a daily quest" );
// }
Theres the code (Commented out atm so it works), and I've looked into everything in Item.cs about AddNameProperty, and GetProperties, and I've even merged the entire GetProperties into the override, even tho it shouldn't need it, and still no go.
public virtual void AddNameProperty(ObjectPropertyList list)
{
string name = Name ?? string.Empty;
if (string.IsNullOrWhiteSpace(name))
{
if (m_Amount <= 1)
{
list.Add(LabelNumber);
}
else
{
list.Add(1050039, "{0}\t#{1}", m_Amount, LabelNumber); // ~1_NUMBER~ ~2_ITEMNAME~
}
}
else
{
if (m_Amount <= 1)
{
list.Add(name);
}
else
{
list.Add(1050039, "{0}\t{1}", m_Amount, Name); // ~1_NUMBER~ ~2_ITEMNAME~
}
}
}
public virtual void GetProperties(ObjectPropertyList list)
{
AddNameProperties(list);
AddItemSocketProperties(list);
if (Spawner != null)
{
Spawner.GetSpawnProperties(this, list);
}
AddItemPowerProperties(list);
}
Anyone know how to make the item name show up properly?