|
المشاركات 1,990 |
+التقييم 1.05 |
تاريخ التسجيل Jun 2019 |
الاقامة |
نظام التشغيل ويندوز 0 |
رقم العضوية 279 |
#region Ranged
#region Ranged
else if (attack.AttackType == Attack.Ranged)
{
if (attacker.Owner.Screen.TryGetValue(attack.Attacked, out attacked))
{
CheckForExtraWeaponPowers(attacker.Owner, attacked);
if (!CanAttack(attacker, attacked, null, false))
return;
var weapons = attacker.Owner.Weapons;
if (weapons.Item1 == null) return;
if ((weapons.Item1.ID / 1000 != 500 && weapons.Item1.ID / 1000 != 613) && !attacker.IsChaser1())
return;
if (weapons.Item1.ID / 1000 == 500)
if (weapons.Item2 != null && !attacker.IsChaser1())
if (!PacketHandler.IsArrow(weapons.Item2.ID))
return;
#region Kinetic Spark
if (attacker.ContainsFlag3((ulong)Update.Flags3.KineticSpark))
{
var spell = Database.SpellTable.GetSpell(11590, attacker.Owner);
if (spell != null)
{
spell.CanKill = true;
if (Kernel.Rate(spell.Percent))
{
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = attacker.X;
suse.Y = attacker.Y;
IMapObject lastAttacked = attacker;
uint p = 0;
if (Handle.CanAttack(attacker, attacked, spell, false))
{
lastAttacked = attacked;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack);
damage = (uint)((damage) / 1.50);
suse.Effect1 = attack.Effect1;
if (attacker.SpiritFocus)
{
damage = (uint)(damage * attacker.SpiritFocusPercent);
attacker.SpiritFocus = false;
}
damage = damage - damage * (p += 20) / 100;
Handle.ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null) continue;
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Entity)
{
if (_obj.UID == attacked.UID) continue;
var attacked1 = _obj as Entity;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attacked1.X, attacked1.Y) <= 5)
{
if (Handle.CanAttack(attacker, attacked1, spell, false))
{
lastAttacked = attacked1;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked1, spell, ref attack);
suse.Effect1 = attack.Effect1;
if (attacker.SpiritFocus)
{
damage = (uint)(damage * attacker.SpiritFocusPercent);
attacker.SpiritFocus = false;
}
damage = damage - damage * (p += 20) / 100;
if (damage == 0) break;
ReceiveAttack(attacker, attacked1, attack, ref damage, spell);
suse.AddTarget(attacked1, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attackedsob.X, attackedsob.Y) <= 5)
{
if (Handle.CanAttack(attacker, attackedsob, spell))
{
lastAttacked = attackedsob;
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
suse.Effect1 = attack.Effect1;
if (attacker.SpiritFocus)
{
damage = (uint)(damage * attacker.SpiritFocusPercent);
attacker.SpiritFocus = false;
}
damage = damage - damage * (p += 20) / 100;
if (damage == 0) break;
Handle.ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
}
}
}
attacker.Owner.SendScreen(suse, true);
return;
}
}
}
#endregion
#region ShadowofChaser
if (attacker.ContainsFlag4(Update.Flags4.ShadowofChaser) && attacker.IsChaser2())
{
var spell = Database.SpellTable.GetSpell(13090, attacker.Owner);
if (spell != null)
{
spell.CanKill = true;
if (Kernel.Rate(spell.Percent))
{
ShadowofChaser(attacker, attacked, attack, 1);
return;
}
}
}
#endregion
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= Constants.pScreenDistance)
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = 0;
if (!attacker.Assassin() && !attacker.IsChaser1())
damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack) * 300;
else
damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
damage = damage - (uint)(damage * .50);
damage = damage * 7 / 100;
attack.Damage = damage;
if (attacker.EntityFlag == EntityFlag.Entity && attacked.EntityFlag != EntityFlag.Entity)
if (damage > attacked.Hitpoints)
{
attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attacked.Hitpoints), (ushort)(weapons.Item1.ID / 1000));
}
else
{
attacker.Owner.IncreaseProficiencyExperience(damage, (ushort)(weapons.Item1.ID / 1000));
}
ReceiveAttack(attacker, attacked, attack, ref damage, null);
}
}
else if (attacker.Owner.Screen.TryGetSob(attack.Attacked, out attackedsob))
{
if (CanAttack(attacker, attackedsob, null))
{
var weapons = attacker.Owner.Weapons;
if (weapons.Item1 == null) return;
if (weapons.Item1.ID / 1000 != 500 && weapons.Item1.ID / 1000 != 613) return;
if (attacker.MapID != 1039)
{
if (weapons.Item1.ID / 1000 == 500)
{
if (weapons.Item2 == null)
{
attacker.SendSysMesage("please make sure you equipment an arrow");
return;
}
else
{
if (!PacketHandler.IsArrow(weapons.Item2.ID))
{
attacker.SendSysMesage("please make sure you equipment an arrow");
return;
}
}
}
}
#region Kinetic Spark
if (attacker.ContainsFlag3((ulong)Update.Flags3.KineticSpark))
{
var spell = Database.SpellTable.GetSpell(11590, attacker.Owner);
if (spell != null)
{
spell.CanKill = true;
if (Kernel.Rate(spell.Percent))
{
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = attacker.X;
suse.Y = attacker.Y;
IMapObject lastAttacked = attacker;
uint p = 0;
if (Handle.CanAttack(attacker, attackedsob, spell))
{
lastAttacked = attackedsob;
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
damage = (uint)((damage) / 1);
suse.Effect1 = attack.Effect1;
if (attacker.SpiritFocus)
{
damage = (uint)(damage * attacker.SpiritFocusPercent);
attacker.SpiritFocus = false;
}
damage = damage - damage * (p += 20) / 100;
Handle.ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null) continue;
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Entity)
{
var attacked1 = _obj as Entity;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attacked1.X, attacked1.Y) <= 5)
{
if (Handle.CanAttack(attacker, attacked1, spell, false))
{
lastAttacked = attacked1;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked1, spell, ref attack);
suse.Effect1 = attack.Effect1;
if (attacker.SpiritFocus)
{
damage = (uint)(damage * attacker.SpiritFocusPercent);
attacker.SpiritFocus = false;
}
damage = damage - damage * (p += 20) / 100;
if (damage == 0) break;
ReceiveAttack(attacker, attacked1, attack, ref damage, spell);
suse.AddTarget(attacked1, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
if (_obj.UID == Target) continue;
var attackedsob1 = _obj as SobNpcSpawn;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attackedsob1.X, attackedsob1.Y) <= 5)
{
if (Handle.CanAttack(attacker, attackedsob1, spell))
{
lastAttacked = attackedsob1;
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob1, ref attack);
suse.Effect1 = attack.Effect1;
if (attacker.SpiritFocus)
{
damage = (uint)(damage * attacker.SpiritFocusPercent);
attacker.SpiritFocus = false;
}
damage = damage - damage * (p += 20) / 100;
if (damage == 0) break;
Handle.ReceiveAttack(attacker, attackedsob1, attack, damage, spell);
suse.AddTarget(attackedsob1, damage, attack);
}
}
}
}
attacker.Owner.SendScreen(suse, true);
return;
}
}
}
#endregion
if (Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= Constants.pScreenDistance)
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = 0;
if (!attacker.Assassin() && !attacker.IsChaser1())
damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack) / 2;
else
damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack) / 2;
attack.Damage = damage;
ReceiveAttack(attacker, attackedsob, attack, damage, null);
if (damage > attackedsob.Hitpoints)
{
attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attackedsob.Hitpoints), (ushort)(weapons.Item1.ID / 1000));
}
else
{
attacker.Owner.IncreaseProficiencyExperience(damage, (ushort)(weapons.Item1.ID / 1000));
}
}
}
}
else
{
attacker.AttackPacket = null;
}
}
#endregion
الذين يشاهدون محتوى الموضوع الآن : 4 ( الأعضاء 0 والزوار 4) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
حل مشكلة اسكلة الارشر SpritFoucs | Zuko | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2022-03-03 01:52 AM |
حل مشكلة اسكلة [DaggerStorm] بتاعة الارشر | Mr. Co | تطوير سيرفرات كونكر | 0 | 2020-03-25 05:31 AM |
مشكلة في ضربة الاكونت الفيزيكال | Omar | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2019-12-18 09:44 PM |
مشكلة في ضربة الاكونت ف الاتكات | Omar | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-12-17 05:12 AM |
مشكلة ضربة الاجلتي بطيئ | ahmedfathy | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-12-06 12:59 PM |