|
|
أفضل جواب - كتبه Rider
|
|
جرب كده كود:
|
#region DragonPunch
case 12240:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1)
{
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null) continue;
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Entity)
{
attacked = _obj as Entity;
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range)
{
if (attacked.ContainsFlag((ulong)Update.Flags.Fly)) return;
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 = (damage * 35) / 100;
suse.Effect1 = attack.Effect1;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range)
{
if (CanAttack(attacker, attackedsob, spell))
{
PrepareSpell(spell, attacker.Owner);
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Calculate.Melee(attacker, attackedsob, ref attack);
//damage = (uint)(damage * spell.IncreaseDMG);
//damage = (uint)(damage / spell.DecreaseDMG);
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
}
}
}
}
//else
//{
// attacker.AttackPacket = null;
//}
attacker.Owner.SendScreen(suse, true);
}
break;
}
#endregion
#region DragonPunch
case 12240:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1)
{
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null) continue;
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Entity)
{
attacked = _obj as Entity;
if (attacked.ContainsFlag((ulong)Update.Flags.Fly)) return;
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range)
{
PrepareSpell(spell, attacker.Owner);
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack, client_Spell.LevelHu2);
damage = (damage * 35) / 100;
suse.Effect1 = attack.Effect1;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range)
{
if (CanAttack(attacker, attackedsob, spell))
{
PrepareSpell(spell, attacker.Owner);
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Calculate.Melee(attacker, attackedsob, ref attack);
//damage = (uint)(damage * spell.IncreaseDMG);
//damage = (uint)(damage / spell.DecreaseDMG);
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
}
}
}
}
//else
//{
// attacker.AttackPacket = null;
//}
attacker.Owner.SendScreen(suse, true);
}
break;
}
#endregion
#region DragonPunch
case 12240:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1)
{
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null) continue;
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Entity)
{
attacked = _obj as Entity;
if (attacked.ContainsFlag((ulong)Update.Flags.Fly)) return;
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range)
{
PrepareSpell(spell, attacker.Owner);
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack, client_Spell.LevelHu2);
damage = (damage * 35) / 100;
suse.Effect1 = attack.Effect1;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range)
{
if (CanAttack(attacker, attackedsob, spell))
{
PrepareSpell(spell, attacker.Owner);
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Calculate.Melee(attacker, attackedsob, ref attack);
//damage = (uint)(damage * spell.IncreaseDMG);
//damage = (uint)(damage / spell.DecreaseDMG);
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
}
}
}
}
//else
//{
// attacker.AttackPacket = null;
//}
attacker.Owner.SendScreen(suse, true);
}
break;
}
#endregion
| الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
| الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
| سورس بورتو كامل بي شخصية الجديده بعد التعديل شخصية ثور + باتش[نسخة ماتريكس] | Mr.X | سورسات كونكر | 68 | 2021-09-20 01:10 AM |
| مشكلة في شخصيت الوند ولكر | ElSaher | مشكلات السيرفيرات كونكر الشخصيه | 15 | 2020-06-27 04:46 PM |
| مشكلة فى شخصية الجديدة فى سورس رايزو | صاحب السعادة | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2020-01-28 05:21 PM |
| Server Master Dragon v9 | ElSaher | اعلانات السيرفيرات الشخصية | 15 | 2019-08-24 10:49 AM |
| مشكلة في شخصية البايرت | manshestar | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-08-06 05:03 AM |