Any ideas? Thanks
Here is the Code:
Code:
#region TripleAttack
case 10490:
{
if (CanUseSpell(spell, attacker.Owner))
{
ushort Xx, Yx;
if (attacked != null)
{
Xx = attacked.X;
Yx = attacked.Y;
}
else
{
Xx = attackedsob.X;
Yx = attackedsob.Y;
}
if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1)
{
if (attackedsob != null)
if (attacker.ContainsFlag(Network.GamePackets.Update.Flags.Fly))
return;
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
bool send = false;
if (attackedsob != null)
{
if (CanAttack(attacker, attackedsob, spell))
{
PrepareSpell(spell, attacker.Owner);
suse.MakeConst();
for (uint c = 0; c < 4; c++)
{
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob);
if (damage > attackedsob.Hitpoints)
damage = attackedsob.Hitpoints;
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.Targets.Add(attackedsob.UID + c, damage);
send = true;
}
}
}
else
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
PrepareSpell(spell, attacker.Owner);
suse.MakeConst();
for (uint c = 0; c < 4; c++)
{
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell);
if (damage > attacked.Hitpoints)
damage = attacked.Hitpoints;
ReceiveAttack(attacker, attacked, attack, damage, spell);
suse.Targets.Add(attacked.UID + c, damage);
send = true;
}
}
}
if (send)
attacker.Owner.SendScreen(suse, true);
}
else
{
attacker.AttackPacket = null;
}
}
break;
}
#endregion






