روح هندل و دور
0x1771
بدلها كلها
0x1771
بدلها كلها
كود:
case 0x1771:
if (CanUseSpell(spell, this.attacker.Owner))
{
PrepareSpell(spell, this.attacker.Owner);
use = new SpellUse(true)
{
Attacker = this.attacker.UID,
SpellID = spell.ID,
SpellLevel = spell.Level,
X = x,
Y = y
};
if (Kernel.GetDistance(this.attacker.X, this.attacker.Y, x, y) > spell.Distance)
{
this.attacker.AttackPacket = null;
}
else
{
foreach (IMapObject obj3 in this.attacker.Owner.Screen.Objects)
{
if (obj3.MapObjType == MapObjectType.Player)
{
attacker = obj3 as Entity;
if ((Kernel.GetDistance(x, y, attacker.X, attacker.Y) <= spell.Range) && CanAttack(this.attacker, attacker, spell, this.attack.AttackType == 2))
{
num27 = this.attacker.BattlePower - attacker.BattlePower;
num28 = (spell.Percent + num27) - 20;
if (Kernel.Rate(num28))
{
attacker.ToxicFogStamp = Time32.Now;
attacker.ToxicFogLeft = 20;
attacker.ToxicFogPercent = spell.PowerPercent;
use.Targets.Add(attacker.UID, 1);
}
if ((this.attacker.BattlePower - attacker.BattlePower) > 0)
{
attacker.ToxicFogStamp = Time32.Now;
attacker.ToxicFogLeft = 20;
attacker.ToxicFogPercent = spell.PowerPercent;
use.Targets.Add(attacker.UID, 1);
}
else
{
use.Targets.Add(attacker.UID, 0);
use.Targets[attacker.UID].Hit = false;
}
}
}
else if (obj3.MapObjType == MapObjectType.Monster)
{
attacker = obj3 as Entity;
if ((Kernel.GetDistance(x, y, attacker.X, attacker.Y) <= spell.Range) && CanAttack(this.attacker, attacker, spell, this.attack.AttackType == 2))
{
attacker.ToxicFogStamp = Time32.Now;
attacker.ToxicFogLeft = 20;
attacker.ToxicFogPercent = spell.PowerPercent;
use.Targets.Add(attacker.UID, 1);
}
}
}
}
this.attacker.Owner.SendScreen(use, true);
}
goto Label_C19A;







0 التعليقات:
إرسال تعليق