U3Games

Games | Desarrollo & Soporte => L2 | Sección de Servidores => Lineage => L2 | Apartado de Soporte => Mensaje iniciado por: djjose en Oct 16, 2025, 02:17 PM

Título: Activar spoil 100%
Publicado por: djjose en Oct 16, 2025, 02:17 PM
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.
Título: Re:Activar spoil 100%
Publicado por: Swarlog en Oct 16, 2025, 09:04 PM
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.
Título: Re:Activar spoil 100%
Publicado por: djjose en Oct 17, 2025, 01:57 PM
Ya lo he probado y es justo lo que estaba buscando.

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

Gracias.