Hey there I am trying to remove a few bonus when we craft such as resist, or durability bonus, and I think it's not necessary to have, and I would like to remove it. I've removed them, the game play fine, but if I craft it will cause a crash on the shard. This is what I have now, and it make a crash when crafted, and I just remove resist, and durability bonus. It is in BaseRunicTool.cs.


int random = GetUniqueRandom(20);

if (random == -1)
break;

switch ( random )
{
case 0:
{
switch ( Utility.Random(5) )
{
case 0:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitPhysicalArea, 2, 50, 2);
break;
case 1:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitFireArea, 2, 50, 2);
break;
case 2:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitColdArea, 2, 50, 2);
break;
case 3:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitPoisonArea, 2, 50, 2);
break;
case 4:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitEnergyArea, 2, 50, 2);
break;
}

break;
}
case 1:
{
switch ( Utility.Random(4) )
{
case 0:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitMagicArrow, 2, 50, 2);
break;
case 1:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitHarm, 2, 50, 2);
break;
case 2:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitFireball, 2, 50, 2);
break;
case 3:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitLightning, 2, 50, 2);
break;
}

break;
}
case 2:
{
switch ( Utility.Random(2) )
{
case 0:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.UseBestSkill, 1, 1);
break;
case 1:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.MageWeapon, 1, 10);
break;
}

break;
}
case 3:
int dmgMin = primary.WeaponDamage;
int dmgMax = Math.Max(dmgMin, 50);
primary.WeaponDamage = 0;
ApplyAttribute(primary, min, max, AosAttribute.WeaponDamage, dmgMin, dmgMax);
break;
case 4:
ApplyAttribute(primary, min, max, AosAttribute.DefendChance, 1, 15);
break;
case 5:
ApplyAttribute(primary, min, max, AosAttribute.CastSpeed, 1, 1);
break;
case 6:
ApplyAttribute(primary, min, max, AosAttribute.AttackChance, 1, 15);
break;
case 7:
ApplyAttribute(primary, min, max, AosAttribute.Luck, 1, 100);
break;
case 8:
ApplyAttribute(primary, min, max, AosAttribute.WeaponSpeed, 5, 30, 5);
break;
case 9:
ApplyAttribute(primary, min, max, AosAttribute.SpellChanneling, 1, 1);
break;
case 10:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitDispel, 2, 50, 2);
break;
case 11:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitLeechHits, 2, Server.SkillHandlers.Imbuing.GetPropRange(weapon, AosWeaponAttribute.HitLeechHits)[1], 2);
break;
case 12:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitLowerAttack, 2, 50, 2);
break;
case 13:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitLowerDefend, 2, 50, 2);
break;
case 14:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitLeechMana, 2, Server.SkillHandlers.Imbuing.GetPropRange(weapon, AosWeaponAttribute.HitLeechMana)[1], 2);
break;
case 15:
ApplyAttribute(secondary, min, max, AosWeaponAttribute.HitLeechStam, 2, 50, 2);
break;
case 16:
weapon.Slayer = GetRandomSlayer();
break;
case 17:
ApplyElementalDamage(weapon, min, max);
break;
case 18:
((BaseRanged)weapon).Balanced = true;
break;
case 19:
ApplyVelocityAttribute((BaseRanged)weapon, min, max, 2, 50, 2);
break;
 
O.K. I fix it I didn't know when I change the number it doesn't line up with other code slightly up above so I had to change it to 18, and 19 to match it up.


m_Props.Set(18, true); // Only bows can be Balanced
m_Props.Set(19, true); // Only bows have Velocity
 
Back