bojangles2872
Member
In BandanaBearingTheCrestOfBlackthorn.cs you can find
But the issue is that it doesn't actually work. I have added weapon attributes to my jewelry and it's the same issue, it doesn't work. In the BaseWeapon.cs I found this
It appears that the code is trying to pull the weapon attribute from the bandana but in game it's not actually using the attribute unless it's attached to the weapon. So what I am wondering is it possible to code it to where your weapon can search all your items by layer for weapon attributes and then actually apply them and work when attacking. I have tried this so far and yet it still doesn't want to work
Code:
public override void AppendChildNameProperties(ObjectPropertyList list)
{
base.AppendChildNameProperties(list);
int prop;
if ((prop = this.m_AosWeaponAttributes.HitColdArea) != 0)
list.Add(1060416, prop.ToString()); // hit cold area ~1_val~%
if ((prop = this.m_AosWeaponAttributes.HitDispel) != 0)
list.Add(1060417, prop.ToString()); // hit dispel ~1_val~%
if ((prop = this.m_AosWeaponAttributes.HitEnergyArea) != 0)
list.Add(1060418, prop.ToString()); // hit energy area ~1_val~%
if ((prop = this.m_AosWeaponAttributes.HitFireArea) != 0)
list.Add(1060419, prop.ToString()); // hit fire area ~1_val~%
if ((prop = this.m_AosWeaponAttributes.HitFireball) != 0)
list.Add(1060420, prop.ToString()); // hit fireball ~1_val~%
if ((prop = this.m_AosWeaponAttributes.HitHarm) != 0)
list.Add(1060421, prop.ToString()); // hit harm ~1_val~%
if ((prop = this.m_AosWeaponAttributes.HitLeechHits) != 0)
list.Add(1060422, prop.ToString()); // hit life leech ~1_val~%
if ((prop = this.m_AosWeaponAttributes.HitLightning) != 0)
list.Add(1060423, prop.ToString()); // hit lightning ~1_val~%
if ((prop = this.m_AosWeaponAttributes.HitLowerAttack) != 0)
list.Add(1060424, prop.ToString()); // hit lower attack ~1_val~%
if ((prop = this.m_AosWeaponAttributes.HitLowerDefend) != 0)
list.Add(1060425, prop.ToString()); // hit lower defense ~1_val~%
if ((prop = this.m_AosWeaponAttributes.HitMagicArrow) != 0)
list.Add(1060426, prop.ToString()); // hit magic arrow ~1_val~%
if ((prop = this.m_AosWeaponAttributes.HitLeechMana) != 0)
list.Add(1060427, prop.ToString()); // hit mana leech ~1_val~%
if ((prop = this.m_AosWeaponAttributes.HitPhysicalArea) != 0)
list.Add(1060428, prop.ToString()); // hit physical area ~1_val~%
if ((prop = this.m_AosWeaponAttributes.HitPoisonArea) != 0)
list.Add(1060429, prop.ToString()); // hit poison area ~1_val~%
if ((prop = this.m_AosWeaponAttributes.HitLeechStam) != 0)
list.Add(1060430, prop.ToString()); // hit stamina leech ~1_val~%
}
But the issue is that it doesn't actually work. I have added weapon attributes to my jewelry and it's the same issue, it doesn't work. In the BaseWeapon.cs I found this
Code:
if (!Core.HS)
{
int ldChance = (int)(AosWeaponAttributes.GetValue(attacker, AosWeaponAttribute.HitLowerDefend) * propertyBonus);
if (ldChance != 0 && ldChance > Utility.Random(100))
{
DoLowerDefense(attacker, defender);
}
}
else
{
int hldWep = m_AosWeaponAttributes.HitLowerDefend;
int hldGlasses = 0;
var helm = attacker.FindItemOnLayer(Layer.Helm);
if (helm != null)
{
var attrs = RunicReforging.GetAosWeaponAttributes(helm);
if(attrs != null)
hldGlasses = attrs.HitLowerDefend;
}
if ((hldWep > 0 && hldWep > Utility.Random(100)) || (hldGlasses > 0 && hldGlasses > Utility.Random(100)))
{
DoLowerDefense(attacker, defender);
}
}
It appears that the code is trying to pull the weapon attribute from the bandana but in game it's not actually using the attribute unless it's attached to the weapon. So what I am wondering is it possible to code it to where your weapon can search all your items by layer for weapon attributes and then actually apply them and work when attacking. I have tried this so far and yet it still doesn't want to work
Code:
if (!Core.HS)
{
int fireballChance = (int)(AosWeaponAttributes.GetValue(attacker, AosWeaponAttribute.HitFireball) * propertyBonus);
if (fireballChance != 0 && fireballChance > Utility.Random(100))
{
DoFireball(attacker, defender);
}
}
else
{
int hldWep = m_AosWeaponAttributes.HitFireball;
var bracelet = attacker.FindItemOnLayer(Layer.Bracelet);
if ((hldWep > 0 && hldWep > Utility.Random(100)))
{
DoFireball(attacker, defender);
}
}