[php] #region whirlwindkick case 10415: { if (time32.now < attacker.spellstamp.addmilliseconds(500)) { attacker.attackpacket = null; return; } if (kernel.getdistance(attacker.x, attacker.y, x, y) <= 400) { if (canusespell(spell, attacker.owner)) { preparespell(spell, attacker.owner); spelluse suse = new spelluse(true); suse.attacker = attacker.uid; suse.spellid = spell.id; suse.spelllevel = 0; suse.x = (ushort)kernel.random.next(3, 10); suse.y = 0; //suse.spelllevelhu = client_spell.levelhu2; if (kernel.getdistance(attacker.x, attacker.y, x, y) <= 500) { for (int c = 0; c < attacker.owner.screen.objects.length; c++) { //for a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. If (c >= attacker.owner.screen.objects.length) break; interfaces.imapobject _obj = attacker.owner.screen.objects[c]; 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) <= spell.range) { if (canattack(attacker, attacked, spell, attack.attacktype == attack.ranged)) { var damage = game.attacking.calculate.melee(attacker, attacked, ref attack); damage = (uint)(damage * 0.570); suse.effect1 = attack.effect1; receiveattack(attacker, attacked, attack, ref damage, spell); attacked.stunned = true; attacked.stunstamp = time32.now; suse.addtarget(attacked, damage, attack); } } } } attacker.attackpacket = null; } else { attacker.attackpacket = null; return; } attacker.owner.sendscreen(suse, true); attacker.spellstamp = time32.now; suse.targets = new safedictionary<uint, spelluse.damageclass>(); attacker.attackpacket = null; return; } attacker.attackpacket = null; } attacker.attackpacket = null; return; } #endregion #endregion