if (information.WeaponSubtype.Count != 0)
switch (information.ID) { case 5010: case 7020: case 1290: case 1260: case 5030: case 5040: case 7000: case 7010: case 7030: case 7040: case 1250: case 5050: case 5020: case 10490: case 11140: case 1300: case 11990: case 12110: case 12240: case 12230: case 12220: case 12210: case 12570: case 12580: case 12590: case 12600: case 11230: case 13040: case 13050: // if (spell.Distance >= 3) // spell.Distance = 3; // if (spell.Range > 3) // spell.Range = 3; for (int i = 0; i < information.WeaponSubtype.Count; i++) { var subtype = information.WeaponSubtype[i]; if (!WeaponSpells.ContainsKey(subtype)) WeaponSpells.Add(subtype, new List<ushort>()); if (!WeaponSpells[subtype].Contains(information.ID)) WeaponSpells[subtype].Add(information.ID); } break; }
#region Up - Down Sweep & Strike int rate = 0; if (attacker.Owner.Spells.ContainsKey(10490)) rate = 100 - Database.SpellTable.GetSpell(10490, attacker.Owner).Percent; if (Kernel.Rate(rate)) { if (attack.SpellID >= 12580 && attack.SpellID <= 12600 && attacker.EpicMonk()) { var spell = Database.SpellTable.GetSpell(attack.SpellID, attacker.Owner); if (spell != null) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = attack.SpellID; suse.SpellLevel = spell.ID; suse.X = attacker.X; suse.Y = attacker.Y; Fan fan = new Fan(attacker.X, attacker.Y, attacked.X, attacked.Y, spell.Range, spell.Sector); 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) <= 7) { if (CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee)) { attack.Effect1 = Attack.AttackEffects1.None; uint damages = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); damages = (damages * 22) / 100; attack.Attacked = attacked.UID; attack.Damage = damages; suse.Effect1 = attack.Effect1; suse.AddTarget(_obj, damages, attack); ReceiveAttack(attacker, attacked, attack, ref damages, null); } } } } attacker.SendScreen(suse); attacker.AttackPacket = null; return; } } } else if (attacker.Owner.Spells.ContainsKey(10490) && attacker.Monk()) { var spell = Database.SpellTable.GetSpell(10490, attacker.Owner); if (Kernel.Rate(spell.MonsterPower - 55) && attacker.Owner.Spells.ContainsKey(12570) && attacker.EpicMonk()) { spell = Database.SpellTable.GetSpell(12570, attacker.Owner); if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse2 = new SpellUse(true); suse2.Attacker = attacker.UID; suse2.SpellID = spell.ID; suse2.SpellLevel = spell.Level; if (attacked != null) { suse2.X = attacked.X; suse2.Y = attacked.Y; } else { suse2.X = attackedsob.X; suse2.Y = attackedsob.Y; } suse2.SpellEffect = 1; foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster) { attacked = _obj as Entity; if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); damage = (damage * 22) / 100; attack.Damage = 0; ReceiveAttack(attacker, attacked, attack, ref damage, spell); suse2.AddTarget(attacked, damage, attack); } } } else if (_obj.MapObjType == MapObjectType.Entity) { attacked = _obj as Entity; if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); damage = (damage * 22) / 100; attack.Damage = 0; ReceiveAttack(attacker, attacked, attack, ref damage, spell); suse2.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)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); damage = (damage * 22) / 100; attack.Damage = 0; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse2.AddTarget(attackedsob, damage, attack); } } } } attacker.Owner.SendScreen(suse2, true); attacker.AttackPacket = null; return; } } else { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); TryTrip suse = new TryTrip(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) { if (attackedsob != null) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Calculate.Melee(attacker, attackedsob, ref attack); damage = (damage * 22) / 100; suse.Attacked = attackedsob.UID; attack.Damage = 0; suse.Damage = damage; ReceiveAttack(attacker, attackedsob, attack, damage, spell); attacker.Owner.SendScreen(suse, true); } } else { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Calculate.Melee(attacker, attacked, spell, ref attack); damage = (damage * 22) / 100; suse.Attacked = attacked.UID; suse.Damage = damage; attack.Damage = 0; ReceiveAttack(attacker, attacked, attack, ref damage, spell); attacker.Owner.SendScreen(suse, true); } } attacker.AttackPacket = null; return; } } } attacker.AttackPacket = null; return; } #endregion