|
المشاركات 1,372 |
+التقييم 0.67 |
تاريخ التسجيل Apr 2019 |
الاقامة شرقيه/زقازيق |
نظام التشغيل |
رقم العضوية 30 |
#region Rectangle if (attack.SpellID == 13060) { var spell = Database.SpellTable.GetSpell(13060, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = attack.SpellID; suse.X = attacker.X; suse.Y = attacker.Y; var angle = Kernel.GetAngle(attacker.X, attacker.Y, attacked.X, attacked.Y); Map.UpdateCoordonatesForAngle(ref X, ref Y, angle); Fan sector = new Fan(attacker.X, attacker.Y, X, Y, spell.Range, spell.Sector); uint damage2 = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack); attack.Damage = 0; if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { ReceiveAttack(attacker, attacked, attack, ref damage2, spell); suse.AddTarget(attacked, damage2, attack); foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj.MapObjType == MapObjectType.Entity || _obj.MapObjType == MapObjectType.Monster) { if (_obj == null) continue; attacked = _obj as Entity; if (attacked == null) continue; if (sector.IsInFan(attacked.X, attacked.Y)) { if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) > 7) continue; attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack); damage = (uint)(damage * 0.2); attack.Damage = 0; ReceiveAttack(attacker, attacked, attack, ref damage, spell); suse.AddTarget(attacked, damage, attack); } } } } attacker.Owner.SendScreen(suse, true); return; } #endregion
#region Rectangle if (attack.SpellID == 13060) { var spell = Database.SpellTable.GetSpell(13060, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = attack.SpellID; suse.X = attacker.X; suse.Y = attacker.Y; var angle = Kernel.GetAngle(attacker.X, attacker.Y, attacked.X, attacked.Y); Map.UpdateCoordonatesForAngle(ref X, ref Y, angle); Fan sector = new Fan(attacker.X, attacker.Y, X, Y, spell.Range, spell.Sector); uint damage2 = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack); attack.Damage = 0; if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { ReceiveAttack(attacker, attacked, attack, ref damage2, spell); suse.AddTarget(attacked, damage2, attack); foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj.MapObjType == MapObjectType.Entity || _obj.MapObjType == MapObjectType.Monster) { if (_obj == null) continue; attacked = _obj as Entity; if (attacked == null) continue; if (sector.IsInFan(attacked.X, attacked.Y)) { if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) > 7) continue; attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack); damage = (uint)(damage * 0.2); attack.Damage = 0; ReceiveAttack(attacker, attacked, attack, ref damage, spell); suse.AddTarget(attacked, damage, attack); } } } } attacker.Owner.SendScreen(suse, true); return; } #endregion
#region rectangle if (attack.spellid == 13060) { var spell = database.spelltable.getspell(13060, attacker.owner); spelluse suse = new spelluse(true); suse.attacker = attacker.uid; suse.spellid = attack.spellid; suse.x = attacker.x; suse.y = attacker.y; var angle = kernel.getangle(attacker.x, attacker.y, attacked.x, attacked.y); map.updatecoordonatesforangle(ref x, ref y, angle); fan sector = new fan(attacker.x, attacker.y, x, y, spell.range, spell.sector); uint damage2 = game.attacking.calculate.melee(attacker, attacked, ref attack); attack.damage = 0; if (canattack(attacker, attacked, spell, attack.attacktype == attack.melee)) { receiveattack(attacker, attacked, attack, ref damage2, spell); suse.addtarget(attacked, damage2, attack); foreach (interfaces.imapobject _obj in attacker.owner.screen.objects) { if (_obj.mapobjtype == mapobjecttype.entity || _obj.mapobjtype == mapobjecttype.monster) { if (_obj == null) continue; attacked = _obj as entity; if (attacked == null) continue; if (sector.isinfan(attacked.x, attacked.y)) { if (kernel.getdistance(attacked.x, attacked.y, attacker.x, attacker.y) > 7) continue; attack.effect1 = attack.attackeffects1.none; uint damage = game.attacking.calculate.melee(attacker, attacked, ref attack); damage = (uint)(damage * 0.2); attack.damage = 0; receiveattack(attacker, attacked, attack, ref damage, spell); suse.addtarget(attacked, damage, attack); } } } } attacker.owner.sendscreen(suse, true); return; } #endregion