crymi
Initiate
Overrrding Item Ranks.

By using the code below (Nockar Colored Name) edited to make it list under the name rather than change the name to a string colored version of the name.
This works quite well it will change the rank listed under the name depending on the props of a item.
I am trying to override it tho for example Hat Of Magi should always be [Artifact].
Ive tried to use the same method as LableNumber but i get the following error.
Ovveride Code??
Error?
Inside the core they are both using
..
If anyone has some insight on where i am going wrong please help me out...
Thanks
Crymi
P.S I am using a modified Item.cs core file in order to display the "rank" below the name..

By using the code below (Nockar Colored Name) edited to make it list under the name rather than change the name to a string colored version of the name.
Code:
public override void AddNameProperty(ObjectPropertyList list)
{//Colored Item Name Mod Start
BaseArmor arm = this;
//AddNamePropertiey Code
string oreType = CraftResources.GetName(m_Resource);
if (oreType.ToLower() == "none" || oreType.ToLower() == "normal" || oreType != "0") oreType = "";
oreType = null;
if (this.m_Quality == ArmorQuality.Exceptional)
{
if (oreType != null)
list.Add(1053100, "#{0}\t{1}", oreType, this.GetNameString()); // exceptional ~1_oretype~ ~2_armortype~
else
list.Add(1050040, this.GetNameString()); // exceptional ~1_ITEMNAME~
}
else
{
if (oreType != null)
list.Add(1053099, "#{0}\t{1}", oreType, this.GetNameString()); // ~1_oretype~ ~2_armortype~
else if (this.Name == null)
list.Add(this.LabelNumber);
else
list.Add(this.Name);
}
int props = 0;
foreach (int i in Enum.GetValues(typeof(AosAttribute)))
{
if (arm != null && arm.Attributes[(AosAttribute)i] > 0) ++props;
}
if (arm != null) foreach (int i in Enum.GetValues(typeof(AosArmorAttribute))) { if (arm.ArmorAttributes[(AosArmorAttribute)i] > 0) ++props; }
if (this.SkillBonuses.Skill_1_Value > 0) ++props;
if (this.SkillBonuses.Skill_2_Value > 0) ++props;
if (this.SkillBonuses.Skill_3_Value > 0) ++props;
if (this.SkillBonuses.Skill_4_Value > 0) ++props;
if (this.SkillBonuses.Skill_5_Value > 0) ++props;
// Props code display
if (props == 0) // No color (Common)
{
ItemValue = ItemValue.Common;
}
if (props >= 1 && props <= 2) // Green (Uncommon)
{
ItemValue = ItemValue.Uncommon;
}
if (props >= 3 && props <= 4) // Blue (Rare)
{
ItemValue = ItemValue.Rare;
}
if (props >= 5 && props <= 6) // Purple (Epic)
{
ItemValue = ItemValue.Epic;
}
if (props >= 7 && props <= 8) // Orange (Legendary)
{
ItemValue = ItemValue.Legendary;
}
This works quite well it will change the rank listed under the name depending on the props of a item.
I am trying to override it tho for example Hat Of Magi should always be [Artifact].
Ive tried to use the same method as LableNumber but i get the following error.
Ovveride Code??
Code:
public override int ItemValue
{
get
{
return ItemValue.Artifact;
}
}
Error?
Code:
Errors:
+ Items/Armor/Artifacts/ArmorOfFortune.cs:
CS1715: Line 37: 'Server.Items.ArmorOfFortune.ItemValue': type must be 'Serv
er.ItemValue' to match overridden member 'Server.Item.ItemValue'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
Inside the core they are both using
Code:
public virtual void AddItemValueProperty(ObjectPropertyList list) //ItemValue
public virtual void AddNameProperty(ObjectPropertyList list)//LabelNumber
If anyone has some insight on where i am going wrong please help me out...
Thanks
Crymi
P.S I am using a modified Item.cs core file in order to display the "rank" below the name..