#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