Noticias:

No tienes permiso para ver los enlaces. Para poder verlos Registrate o Conectate.

Menú Principal

Activar spoil 100%

Iniciado por djjose, Oct 16, 2025, 02:17 PM

Tema anterior - Siguiente tema

djjose

No encuentro donde se gestiona la parte donde el bicho se pone azul o no al entrar el spoil...

He mirado ciertas cosas pero no doy con la parte correcta.

Swarlog

No tienes permiso para ver los enlaces. Para poder verlos Registrate o Conectate.No encuentro donde se gestiona la parte donde el bicho se pone azul o no al entrar el spoil...

He mirado ciertas cosas pero no doy con la parte correcta.

GeneralDropItem modificar:
public Collection<ItemHolder> calculateDrops(DropListScope dropListScope, L2Character victim, L2Character killer)
	{
		
		int levelDifference = victim.getLevel() - killer.getLevel();
		final double levelGapChanceToDrop;
		if (getItemId() == Inventory.ADENA_ID)
		{
			levelGapChanceToDrop = Util.map(levelDifference, -Config.DROP_ADENA_MAX_LEVEL_DIFFERENCE, -Config.DROP_ADENA_MIN_LEVEL_DIFFERENCE, Config.DROP_ADENA_MIN_LEVEL_GAP_CHANCE, 100.0);
		}
		else
		{
			levelGapChanceToDrop = Util.map(0, -Config.DROP_ITEM_MAX_LEVEL_DIFFERENCE, -Config.DROP_ITEM_MIN_LEVEL_DIFFERENCE, Config.DROP_ITEM_MIN_LEVEL_GAP_CHANCE, 100.0);
		}
		
		// There is a chance of level gap that it wont drop this item
		if (levelGapChanceToDrop < (Rnd.nextDouble() * 100))
		{
			return null;
		}
		
		final double chance = getChance(victim, killer);
		boolean successes = chance > (Rnd.nextDouble() * 100);
		System.out.println("sucesses vale:" + successes);
		
		if (successes)
		{
			final Collection<ItemHolder> items = new ArrayList<>(1);
			final long baseDropCount = Rnd.get(getMin(victim, killer), getMax(victim, killer));
			final long finaldropCount = (long) (Config.L2JMOD_OLD_DROP_BEHAVIOR ? (baseDropCount * Math.max(1, chance / 100)) + (chance > 100 ? (chance % 100) > (Rnd.nextDouble() * 100) ? baseDropCount : 0 : 0) : baseDropCount);
			
				items.add(new ItemHolder(getItemId(), baseDropCount));
			
			return items;
		}
		
		return null;
		
	}

Y en L2NpcTemplate modificar la llamada al metodo puesto antes

Collection<ItemHolder> calculatedDrops = null;
		for (IDropItem dropItem : dropList)
		{
			if (dropListScope.equals(DropListScope.CORPSE))
			{
				final Collection<ItemHolder> drops = dropItem.calculateDrops(dropListScope, victim, killer);
				if ((drops == null) || drops.isEmpty())
				{

Saludos.

djjose

Ya lo he probado y es justo lo que estaba buscando.

Si que ha costado, y la que te he dado por Telegram  :))

Gracias.