well heres what i did i added the Code in Handle.cs and i called it back when player attack like that
Code:
#region Single magic damage spells
case 1000:
case 1001:
case 1002:
case 1150:
case 1160:
case 1180:
case 1320:
{
if (CanUseSpell(spell, attacker.Owner))
{
if (attacked != null)
{
if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance)
{
CheckForSuperGems <<== i dont know what to write beside it
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
PrepareSpell(spell, attacker.Owner);
uint damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell);
damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell);
suse.Targets.Add(attacked.UID, damage);
if (attacked.EntityFlag == EntityFlag.Player)
attacked.Owner.Screen.SendScreen(suse, true);
else
attacked.MonsterInfo.SendScreen(suse);
}
}
else
{
attacker.AttackPacket = null;
}
}
else
{
if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Distance)
{
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
if (CanAttack(attacker, attackedsob, spell))
{
PrepareSpell(spell, attacker.Owner);
uint damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell);
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.Targets.Add(attackedsob.UID, damage);
attacker.Owner.Screen.SendScreen(suse, true);
}
}
}
}
else
{
attacker.AttackPacket = null;
}
break;
}
#endregion
So what should i write bet.Checkforgems .and is this what u say call ?