Fun fact, all items minus weapons will only require 1 strong to half the dura loss while weapons require 3 to reduce it by a third.
Sent from my iPhone using Tapatalk
private void DamageItem(UserItem item, int amount, bool isChanged = false)
{
if (item == null || item.CurrentDura == 0 || item.Info.Type == ItemType.Amulet) return;
if ((item.WeddingRing == Info.Married) && (Info.Equipment[(int)EquipmentSlot.RingL].UniqueID == item.UniqueID)) return;
if (item.Info.Strong > 0) amount = Math.Max(1, amount - item.Info.Strong);
item.CurrentDura = (ushort)Math.Max(ushort.MinValue, item.CurrentDura - amount);
item.DuraChanged = true;
if (item.CurrentDura > 0 && isChanged != true) return;
Enqueue(new S.DuraChanged { UniqueID = item.UniqueID, CurrentDura = item.CurrentDura });
item.DuraChanged = false;
RefreshStats();
}
public void DamageWeapon()
{
if (!NoDuraLoss)
DamageItem(Info.Equipment[(int)EquipmentSlot.Weapon], Envir.Random.Next(4) + 1);
}
hey pete i was looking into this because on default crystal i believe its different, i cant see anyhting in the source that uses strong for weapon dura loss?
could you point me in the right location please?
private void DamageItem(UserItem item, int amount, bool isChanged = false)
{
if (item == null || item.CurrentDura == 0 || item.Info.Type == ItemType.Amulet) return;
if ((item.WeddingRing == Info.Married) && (Info.Equipment[(int)EquipmentSlot.RingL].UniqueID == item.UniqueID)) return;
if (item.Info.Strong > 0) amount = Math.Max(1, amount - item.Info.Strong);
item.CurrentDura = (ushort)Math.Max(ushort.MinValue, item.CurrentDura - amount);
item.DuraChanged = true;
if (item.CurrentDura > 0 && isChanged != true) return;
Enqueue(new S.DuraChanged { UniqueID = item.UniqueID, CurrentDura = item.CurrentDura });
item.DuraChanged = false;
RefreshStats();
}
thanks bud lol what a douche ^^DamageWeapon just calls DamageItem, the value passed through is the reduction before any other modifications.