public void dropToTheGround(L2Player lastAttacker, L2NpcInstance dropper)
{
if(dropper == null)
{
Location dropPos = Rnd.coordsRandomize(lastAttacker, 70);
for(int i = 0; i < 20 && !GeoEngine.canMoveWithCollision(lastAttacker.getX(), lastAttacker.getY(), lastAttacker.getZ(), dropPos.x, dropPos.y, dropPos.z, getReflection().getGeoIndex()); i++)
{
dropPos = Rnd.coordsRandomize(lastAttacker, 70);
}
dropMe(lastAttacker, dropPos);
if(Config.AUTODESTROY_ITEM_AFTER > 0 && !isCursed())
{
ItemsAutoDestroy.getInstance().addItem(this);
}
return;
}
// 20 попыток уронить дроп в точке смерти моба
Location dropPos = Rnd.coordsRandomize(dropper, 70);
if(lastAttacker != null)
{
for(int i = 0; i < 20 && !GeoEngine.canMoveWithCollision(dropper.getX(), dropper.getY(), dropper.getZ(), dropPos.x, dropPos.y, dropPos.z, getReflection().getGeoIndex()); i++)
{
dropPos = Rnd.coordsRandomize(dropper, 70);