|
#region Single magic damage spells
case 1002:
{
if (CanUseSpell(spell, attacker.Owner))
{
if (spell.ID == 10310)
{
if (Time32.Now > attacker.EagleEyeStamp.AddSeconds(20))
return;
attacker.EagleEyeStamp = Time32.Now;
}
if (attacked != null)
{
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.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, attacked, spell, attack.AttackType == Attack.Melee))
{
PrepareSpell(spell, attacker.Owner);
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * .8);
if (spell.ID == 11030)
{
attack.Effect1 = Attack.AttackEffects1.None;
damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack);
}
suse.Effect1 = attack.Effect1;
suse.Effect1 = attack.Effect1;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
if (Time32.Now >= attacker.SpellStamp.AddMilliseconds(1900))
{
if (spell.ID == 1002)
{
if (attacked.EntityFlag == EntityFlag.Entity)
attacked.Owner.BreakTouch(attacker.Owner);
attack.Effect1 = Attack.AttackEffects1.None;
damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * 1);
}
}
suse.AddTarget(attacked, damage, attack);
attacker.Owner.Player.IsEagleEyeShooted = true;
if (attacked.EntityFlag == EntityFlag.Entity)
attacked.Owner.SendScreen(suse, true);
else
attacked.MonsterInfo.SendScreen(suse);
var attackd = attacked as Entity;
if (Kernel.BlackSpoted.ContainsKey(attackd.UID) && spell.ID == 11030)
{
attacker.Owner.Player.IsEagleEyeShooted = false;
if (attacker.Owner.Spells.ContainsKey(11130))
{
var s = attacker.Owner.Spells[11130];
var sspell = Database.SpellTable.SpellInformations[s.ID][s.Level];
if (spell != null)
{
attacker.EagleEyeStamp = Time32.Now;
attacker.Owner.Player.IsEagleEyeShooted = false;
SpellUse ssuse = new SpellUse(true);
ssuse.Attacker = attacker.UID;
ssuse.SpellID = sspell.ID;
ssuse.SpellLevel = sspell.Level;
ssuse.AddTarget(attacker.Owner.Player, new SpellUse.DamageClass().Damage = 11030, attack);
if (attacker.EntityFlag == EntityFlag.Entity)
{
attacker.Owner.SendScreen(ssuse, true);
}
}
}
}
}
}
else
{
attacker.AttackPacket = null;
}
}
else
{
if (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);
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell, ref attack);
suse.Effect1 = attack.Effect1;
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
attacker.Owner.SendScreen(suse, true);
}
}
}
}
else
{
attacker.AttackPacket = null;
}
break;
}
#endregion
#region Single magic damage spells
case 1002:
{
if (CanUseSpell(spell, attacker.Owner))
{
if (spell.ID == 10310)
{
if (Time32.Now > attacker.EagleEyeStamp.AddSeconds(20))
return;
attacker.EagleEyeStamp = Time32.Now;
}
if (attacked != null)
{
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.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, attacked, spell, attack.AttackType == Attack.Melee))
{
PrepareSpell(spell, attacker.Owner);
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * .8);
if (spell.ID == 11030)
{
attack.Effect1 = Attack.AttackEffects1.None;
damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack);
}
suse.Effect1 = attack.Effect1;
suse.Effect1 = attack.Effect1;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
if (Time32.Now >= attacker.SpellStamp.AddMilliseconds(1900))
{
if (spell.ID == 1002)
{
if (attacked.EntityFlag == EntityFlag.Entity)
attacked.Owner.BreakTouch(attacker.Owner);
attack.Effect1 = Attack.AttackEffects1.None;
damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * 1);
}
}
suse.AddTarget(attacked, damage, attack);
attacker.Owner.Player.IsEagleEyeShooted = true;
if (attacked.EntityFlag == EntityFlag.Entity)
attacked.Owner.SendScreen(suse, true);
else
attacked.MonsterInfo.SendScreen(suse);
var attackd = attacked as Entity;
if (Kernel.BlackSpoted.ContainsKey(attackd.UID) && spell.ID == 11030)
{
attacker.Owner.Player.IsEagleEyeShooted = false;
if (attacker.Owner.Spells.ContainsKey(11130))
{
var s = attacker.Owner.Spells[11130];
var sspell = Database.SpellTable.SpellInformations[s.ID][s.Level];
if (spell != null)
{
attacker.EagleEyeStamp = Time32.Now;
attacker.Owner.Player.IsEagleEyeShooted = false;
SpellUse ssuse = new SpellUse(true);
ssuse.Attacker = attacker.UID;
ssuse.SpellID = sspell.ID;
ssuse.SpellLevel = sspell.Level;
ssuse.AddTarget(attacker.Owner.Player, new SpellUse.DamageClass().Damage = 11030, attack);
if (attacker.EntityFlag == EntityFlag.Entity)
{
attacker.Owner.SendScreen(ssuse, true);
}
}
}
}
}
}
else
{
attacker.AttackPacket = null;
}
}
else
{
if (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);
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell, ref attack);
suse.Effect1 = attack.Effect1;
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
attacker.Owner.SendScreen(suse, true);
}
}
}
}
else
{
attacker.AttackPacket = null;
}
break;
}
#endregion
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
لو سمحت محتاج مساعدة انا محتاج اتعلم ازاى اعدل على سورسات كونكر وافكسدها | fersony | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2020-03-09 01:46 PM |
اسكلة الرون | مجدى | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2020-01-31 04:59 PM |
حل مشكله اسكلة ShadowClone | Tefa | تطوير سيرفرات كونكر | 2 | 2019-10-24 02:55 PM |
مشكلة فى اسكلة ShadowClone | osama | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2019-08-05 09:10 AM |
مشكلة في اسكلة SuperTwofoldBlade | ElSaher | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2019-08-04 12:34 PM |