|
المشاركات 1,993 |
+التقييم 1.01 |
تاريخ التسجيل Jun 2019 |
الاقامة |
نظام التشغيل ويندوز 0 |
رقم العضوية 279 |
#region SuperTwofoldBlade
case 12080:
{
if (CanUseSpell(spell, attacker.Owner))
{
//var dis = spell.Distance;
//if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= dis)
if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Distance)
{
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;
//suse.SpellLevelHu = client_Spell.UseSpell;
Game.Attacking.InLineAlgorithm ila = new KhaledMohamed.Game.Attacking.InLineAlgorithm(attacker.X,
X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
bool aaAttack = false;
var Array = attacker.Owner.Screen.Objects;
foreach (Interfaces.IMapObject _obj in Array)
{
if (_obj.MapObjType == MapObjectType.Monster)
{
attacked = _obj as Entity;
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= 7)
{
if (attacked.UID == Target)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
aaAttack = true;
var damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * 1.4);
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
else if (ila.InLine(attacked.X, attacked.Y))
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
aaAttack = true;
var damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * 0.1);
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
}
else if (_obj.MapObjType == MapObjectType.Entity)
{
attacked = _obj as Entity;
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= 7)
{
if (attacked.UID == Target)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
aaAttack = true;
var damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * 80 / 100);
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (attackedsob.UID == Target)
{
if (CanAttack(attacker, attackedsob, spell))
{
aaAttack = true;
// if (!moveIn.InRange(attackedsob.X, attackedsob.Y, 4, ranger))
// continue;
var damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
damage = (uint)(damage * 2.4);
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
}
}
}
if (aaAttack)
attacker.Owner.SendScreen(suse, true);
attacker.SpellStamp = Time32.Now;
//attacker.RadiantStamp = DateTime.Now;
}
}
break;
}
#endregion
#region SuperTwofoldBlade
case 12080:
{
if (CanUseSpell(spell, attacker.Owner))
{
//var dis = spell.Distance;
//if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= dis)
if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Distance)
{
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;
//suse.SpellLevelHu = client_Spell.UseSpell;
Game.Attacking.InLineAlgorithm ila = new KhaledMohamed.Game.Attacking.InLineAlgorithm(attacker.X,
X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
bool aaAttack = false;
var Array = attacker.Owner.Screen.Objects;
foreach (Interfaces.IMapObject _obj in Array)
{
if (_obj.MapObjType == MapObjectType.Monster)
{
attacked = _obj as Entity;
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= 7)
{
if (attacked.UID == Target)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
aaAttack = true;
var damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * 1.4);
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
else if (ila.InLine(attacked.X, attacked.Y))
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
aaAttack = true;
var damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * 0.1);
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
}
else if (_obj.MapObjType == MapObjectType.Entity)
{
attacked = _obj as Entity;
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= 7)
{
if (attacked.UID == Target)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
aaAttack = true;
var damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * 80 / 100);
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (attackedsob.UID == Target)
{
if (CanAttack(attacker, attackedsob, spell))
{
aaAttack = true;
// if (!moveIn.InRange(attackedsob.X, attackedsob.Y, 4, ranger))
// continue;
var damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
damage = (uint)(damage * 2.4);
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
}
}
}
if (aaAttack)
attacker.Owner.SendScreen(suse, true);
attacker.SpellStamp = Time32.Now;
//attacker.RadiantStamp = DateTime.Now;
}
}
break;
}
#endregion
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
مشكلة اسلت SuperTwofoldBlade | ElSaher | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2020-02-04 02:14 AM |
حل مشكلة ان الاميل بيرقص لما يبندرب بي اسكلت SuperTwofoldBlade | ElSaher | تطوير سيرفرات كونكر | 0 | 2020-02-04 01:08 AM |
مشكلة في اسكلة ThunedCloud | Mostafa Shalby | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2019-11-01 12:42 AM |
مشكلة فى اسكلة TwilightDance | ViORX | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2019-09-27 02:44 PM |
مشكلة في اسكلة SuperTwofoldBlade | ElSaher | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-08-03 03:06 AM |