|
case 1260:
{
if (CanUseSpell(spell, attacker.Owner))
{
spell.UseStamina = 20;
PrepareSpell(spell, attacker.Owner);
Game.Attacking.InLineAlgorithm ila = new MrHassan.Game.Attacking.InLineAlgorithm(attacker.X,
X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = SpellID;
suse.SpellLevel = attacker.Owner.Spells[SpellID].Level;
suse.X = X;
suse.Y = Y;
//suse.SpellLevelHu = client_Spell.LevelHu2;
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 (ila.InLine(attacked.X, attacked.Y))
{
if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
continue;
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * 0.1);
suse.Effect1 = attack.Effect1;
attack.Damage = damage;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (ila.InLine(attackedsob.X, attackedsob.Y))
{
if (!CanAttack(attacker, attackedsob, spell))
continue;
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
attack.Damage = damage;
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
}
}
attacker.Owner.SendScreen(suse, true);
}
break;
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
حل مشكله عدم تحديث Stamina الي بتضرب بيها الاسكلات | Tefa | تطوير سيرفرات كونكر | 3 | 2023-07-27 12:31 AM |
اعدل علي الضربه اللي بتطلع، استريك ازاي الناس عندي بتضرب بوكس استريك بي 55 الف | سمير | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-11-08 05:36 PM |