Anomaly
Member
fun facts about what i am doing:
- No changes have been made to DyeTub.cs
- This was originally "Blaze DyeTub", attempting to modify it to fit my need.
So, i can add the game in fine. And the item is created w/ its assigned hue based on the int i pass in on [add
EG: [add bossdyetub1 or [add bossdyetub 2
However after reviewing [props of both, and with both the commented line within the switch and the non-commented lines the Dyed Hue is not being set. Another thing to note w/ this.DyedHue is i also tried 0x489 for example instead of 1161..
TLDR: item creates w/ assigned hue, however won't dye things and has no dyedhue assigned though it is defined.
leaving the post here in case anyone comes after me... i wasn't giving up and waiting... got to looking at DyedHue in DyeTub.cs...
Applying this change to my code worked:
Only downside is now this item will be redyeable.. but it works now.
- No changes have been made to DyeTub.cs
- This was originally "Blaze DyeTub", attempting to modify it to fit my need.
BossDyeTub.cs:
using System;
namespace Server.Items
{
public class BossDyeTub : DyeTub
{
[Constructable]
public BossDyeTub(int i)
{
this.Redyable = false;
//this.Hue = this.DyedHue = 0x300;
switch (i)
{
case 1:
{
//this.Hue = this.DyedHue = 0x300; //tried no worky worky
this.Hue = 0x300; //<--this works, item hue works w/ above too.
this.DyedHue = 768; //<--this is not being set ingame [props.
break;
}
case 2:
{
//this.Hue = this.DyedHue = 0x300; //tried no worky worky
this.Hue = 0x489; //<--this works, item hue works w/ above too.
this.DyedHue = 1161; //<--this is not being set ingame [props.
break;
}
}
}
public BossDyeTub(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
So, i can add the game in fine. And the item is created w/ its assigned hue based on the int i pass in on [add
EG: [add bossdyetub1 or [add bossdyetub 2
However after reviewing [props of both, and with both the commented line within the switch and the non-commented lines the Dyed Hue is not being set. Another thing to note w/ this.DyedHue is i also tried 0x489 for example instead of 1161..
TLDR: item creates w/ assigned hue, however won't dye things and has no dyedhue assigned though it is defined.
Post automatically merged:
leaving the post here in case anyone comes after me... i wasn't giving up and waiting... got to looking at DyedHue in DyeTub.cs...
DyeTub.cs:
[CommandProperty(AccessLevel.GameMaster)]
public int DyedHue
{
get { return m_DyedHue; }
set
{
if (m_Redyable)
{
m_DyedHue = value;
Hue = value;
}
}
}
Applying this change to my code worked:
BossDyeTub.cs:
public BossDyeTub(int i)
{
//this.Redyable = false;
//this.Hue = this.DyedHue = 0x300;
switch (i)
{
case 1:
{
//this.Hue = this.DyedHue = 0x300; //tried no worky worky
this.Hue = 0x300; //<--this works, item hue works w/ above too.
this.DyedHue = 768; //<--this is not being set ingame [props.
break;
}
case 2:
{
//this.Hue = this.DyedHue = 0x300; //tried no worky worky
this.Hue = 0x489; //<--this works, item hue works w/ above too.
this.DyedHue = 1161; //<--this is not being set ingame [props.
break;
}
}
}
Only downside is now this item will be redyeable.. but it works now.
Last edited: