private int PredictDamage(AoEPacket aoe) { int def = client.PlayerData.Defense; if (aoe.Effects == ConditionEffectIndex.ArmorBroken) ArmorBroken = true; if (Armored) def *= 2; if (ArmorBroken) def = 0; return Math.Max(Math.Max(aoe.Damage - def, 0), (int)(0.15f * aoe.Damage)); }
public void AoE(AoEPacket aoe) { if (client.PlayerData.Pos.DistanceSquaredTo(aoe.Location) <= aoe.Radius * aoe.Radius) { aoe.Send = ApplyDamage(PredictDamage(aoe)); } }