[Only registered and activated users can see links. Click Here To Register...]
Code:
#region BladeTempest
case 11110:
if (CanUseSpell(spell, this.attacker.Owner))
{
if (spell.ID == 11110)
{
spell.UseStamina = 20;
spell.Range = 20;
}
PrepareSpell(spell, this.attacker.Owner);
InLineAlgorithm algorithm = new InLineAlgorithm(this.attacker.X, x, this.attacker.Y, y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
use = new SpellUse(true)
{
Attacker = this.attacker.UID,
SpellID = damage,
SpellLevel = this.attacker.Owner.Spells[damage].Level,
X = x,
Y = y
};
if (spell.Level < 4)
{
this.attacker.Owner.Spells[damage].Level++;
this.attacker.Owner.Spells[damage].Experience = 0; ;
this.attacker.Owner.Spells[damage].Send(this.attacker.Owner);
}
if (this.attacker.Owner.Map.Floor[use.X, use.Y, MapObjectType.Player, this.attacker] == true)
{
this.attacker.X = x;
this.attacker.Y = y;
foreach (IMapObject obj3 in this.attacker.Owner.Screen.Objects)
{
if (obj3 != null)
{
if ((obj3.MapObjType == MapObjectType.Monster) || (obj3.MapObjType == MapObjectType.Player))
{
attacker = obj3 as Entity;
if (algorithm.InLine(attacker.X, attacker.Y) && CanAttack(this.attacker, attacker, spell, this.attack.AttackType == 2))
{
if (attacker.BlackSpot == false)
{
if (this.attacker.Owner.Spells.ContainsKey(11120))
{
{
if (this.attacker.Owner.Spells[11120].Level < 4)
{
this.attacker.Owner.Spells[11120].Level++;
this.attacker.Owner.Spells[11120].Experience = 0; ;
this.attacker.Owner.Spells[11120].Send(this.attacker.Owner);
}
Update ud = new Update(true);
ud.Blackspot(attacker, true);
attacker.BlackSpot = true;
attacker.BlackSpottime = 12;
attacker.BlackSpotStamp = Time32.Now;
}
}
}
this.attack.Effect1 = Attack.AttackEffects1.None;
power = Calculate.Melee(this.attacker, attacker, spell, ref this.attack);
use.Effect1 = this.attack.Effect1;
this.attack.Damage = power;
ReceiveAttack(this.attacker, attacker, this.attack, power, spell);
use.Targets.Add(attacker.UID, power);
}
}
else if (obj3.MapObjType == MapObjectType.SobNpc)
{
sob = obj3 as SobNpcSpawn;
if (algorithm.InLine(sob.X, sob.Y) && CanAttack(this.attacker, sob, spell))
{
this.attack.Effect1 = Attack.AttackEffects1.None;
power = (uint)(Calculate.Melee(this.attacker, sob, ref this.attack) * spell.PowerPercent);
this.attack.Damage = power;
ReceiveAttack(this.attacker, sob, this.attack, power, spell);
use.Targets.Add(sob.UID, power);
}
}
}
}
this.attacker.Owner.SendScreen(use, true);
this.attacker.Owner.Screen.Reload(use);
}
}
goto Label_C19A;
#endregion