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