what wrong? full +12 archer attacking only 18k birdmands... can any help me?
Quote:
#region Ranged
else if (attack.AttackType == Attack.Ranged)
{
if (attacker.Owner.Screen.TryGetValue(attack.Attacked , out attacked))
{
CheckForExtraWeaponPowers(attacker.Owner, attacked);
if (attacker.Owner.Equipment.TryGetItem(ConquerItem.L eftWeapon) == null)
return;
if (!CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee))
return;
if (!attacker.Owner.Equipment.Free((byte)ConquerItem. LeftWeapon))
{
Interfaces.IConquerItem arrow = attacker.Owner.Equipment.TryGetItem(ConquerItem.Le ftWeapon);
arrow.Durability -= 1;
ItemUsage usage = new ItemUsage(true) { UID = arrow.UID, dwParam = arrow.Durability, ID = ItemUsage.UpdateDurability };
usage.Send(attacker.Owner);
if (arrow.Durability <= 0 || arrow.Durability > 5000)
{
Network.PacketHandler.ReloadArrows(attacker.Owner. Equipment.TryGetItem(ConquerItem.LeftWeapon), attacker.Owner);
}
}
if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= ServerBase.Constants.pScreenDistance)
{
uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked);
attack.Damage = damage;
if (attacker.EntityFlag == EntityFlag.Player && attacked.EntityFlag != EntityFlag.Player)
if (damage > attacked.Hitpoints)
{
attacker.Owner.IncreaseProficiencyExperience(Math. Min(damage, attacked.Hitpoints), 500);
}
else
{
attacker.Owner.IncreaseProficiencyExperience(damag e, 500);
}
ReceiveAttack(attacker, attacked, attack, damage, null);
}
}
else if (attacker.Owner.Screen.TryGetSob(attack.Attacked, out attackedsob))
{
if (CanAttack(attacker, attackedsob, null))
{
if (attacker.Owner.Equipment.TryGetItem(ConquerItem.L eftWeapon) == null)
return;
if (attacker.MapID != 1039)
{
if (!attacker.Owner.Equipment.Free((byte)ConquerItem. LeftWeapon))
{
Interfaces.IConquerItem arrow = attacker.Owner.Equipment.TryGetItem(ConquerItem.Le ftWeapon);
arrow.Durability -= 1;
ItemUsage usage = new ItemUsage(true) { UID = arrow.UID, dwParam = arrow.Durability, ID = ItemUsage.UpdateDurability };
usage.Send(attacker.Owner);
if (arrow.Durability <= 0 || arrow.Durability > 5000)
{
Network.PacketHandler.ReloadArrows(attacker.Owner. Equipment.TryGetItem(ConquerItem.LeftWeapon), attacker.Owner);
}
}
}
if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= ServerBase.Constants.pScreenDistance)
{
uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob);
attack.Damage = damage;
ReceiveAttack(attacker, attackedsob, attack, damage, null);
if (damage > attackedsob.Hitpoints)
{
attacker.Owner.IncreaseProficiencyExperience(Math. Min(damage, attackedsob.Hitpoints), 500);
}
else
{
attacker.Owner.IncreaseProficiencyExperience(damag e, 500);
}
}
}
}
else
{
attacker.AttackPacket = null;
}
}
#endregion Ranged