Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

Critical Sound

Iniciado por Swarlog, Ago 19, 2022, 12:35 AM

Tema anterior - Siguiente tema

Swarlog

Para que cuando un mago/guerrero haga un critico se escuche un sonido.

CitarSERVIDOR

================================================== ===================
Index: net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
================================================== ===================

public final void sendDamageMessage(L2Character target, int damage, boolean mcrit, boolean pcrit, boolean miss)
{
+ L2PcInstance player = (L2PcInstance)activeChar;
// Check if hit is missed
if (miss)
{
sendPacket(new SystemMessage(SystemMessageId.MISSED_TARGET));
return;
}

// check if hit is critical
if (pcrit)
+ {
sendPacket(new SystemMessage(SystemMessageId.CRITICAL_HIT));
+ PlaySound CRITICAL_HIT_SOUND = new PlaySound(1, "CRITICAL_HIT_SOUND", 0, 0, 0, 0, 0);
+ player.sendPacket(CRITICAL_HIT_SOUND);
+ player.broadcastPacket(CRITICAL_HIT_SOUND); //Can hear and those around you
+ }

if (mcrit)
+ {
sendPacket(new SystemMessage(SystemMessageId.CRITICAL_HIT_MAGIC)) ;
+ PlaySound MAGICAL_HIT_SOUND = new PlaySound(1, "MAGICAL_HIT_SOUND", 0, 0, 0, 0, 0);
+ player.sendPacket(MAGICAL_HIT_SOUND);
+ player.broadcastPacket(MAGICAL_HIT_SOUND); //Can hear and those around you
+ }

SystemMessage sm = new SystemMessage(SystemMessageId.YOU_DID_S1_DMG);
sm.addNumber(damage);
sendPacket(sm);
}

CitarCLIENTE

[EtcSound]
CriticalSound=SkillSound.Critical_Hit_02
CriticalSound_Vol=250.0
CriticalSound_Radius=50.0