Popup damage can increase the system message param length.

This commit is contained in:
MobiusDev 2018-03-27 00:19:33 +00:00
parent 4fc1cb4338
commit 30ce5ece22
14 changed files with 38 additions and 14 deletions

View File

@ -131,7 +131,11 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>
{
_params = Arrays.copyOf(_params, _paramIndex + 1);
_smId.setParamCount(_paramIndex + 1);
_log.info("Wrong parameter count '" + (_paramIndex + 1) + "' for SystemMessageId: " + _smId);
// Mobius: With additional on-screen damage param (popup), length is increased.
if (param.getType() != TYPE_POPUP_ID)
{
_log.info("Wrong parameter count '" + (_paramIndex + 1) + "' for SystemMessageId: " + _smId);
}
}
_params[_paramIndex++] = param;

View File

@ -131,7 +131,11 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>
{
_params = Arrays.copyOf(_params, _paramIndex + 1);
_smId.setParamCount(_paramIndex + 1);
_log.info("Wrong parameter count '" + (_paramIndex + 1) + "' for SystemMessageId: " + _smId);
// Mobius: With additional on-screen damage param (popup), length is increased.
if (param.getType() != TYPE_POPUP_ID)
{
_log.info("Wrong parameter count '" + (_paramIndex + 1) + "' for SystemMessageId: " + _smId);
}
}
_params[_paramIndex++] = param;

View File

@ -131,7 +131,11 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>
{
_params = Arrays.copyOf(_params, _paramIndex + 1);
_smId.setParamCount(_paramIndex + 1);
_log.info("Wrong parameter count '" + (_paramIndex + 1) + "' for SystemMessageId: " + _smId);
// Mobius: With additional on-screen damage param (popup), length is increased.
if (param.getType() != TYPE_POPUP_ID)
{
_log.info("Wrong parameter count '" + (_paramIndex + 1) + "' for SystemMessageId: " + _smId);
}
}
_params[_paramIndex++] = param;

View File

@ -132,7 +132,11 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>
{
_params = Arrays.copyOf(_params, _paramIndex + 1);
_smId.setParamCount(_paramIndex + 1);
_log.info("Wrong parameter count '" + (_paramIndex + 1) + "' for SystemMessageId: " + _smId);
// Mobius: With additional on-screen damage param (popup), length is increased.
if (param.getType() != TYPE_POPUP_ID)
{
_log.info("Wrong parameter count '" + (_paramIndex + 1) + "' for SystemMessageId: " + _smId);
}
}
_params[_paramIndex++] = param;

View File

@ -725,7 +725,7 @@ public abstract class L2Summon extends L2Playable
sm.addNpcName(this);
sm.addString(target.getName());
sm.addInt(damage);
// sm.addPopup(target.getObjectId(), getObjectId(), (damage * -1));
sm.addPopup(target.getObjectId(), getObjectId(), (damage * -1));
}
sendPacket(sm);

View File

@ -156,7 +156,7 @@ public class DoppelgangerInstance extends L2Npc
sm.addNpcName(this);
sm.addString(target.getName());
sm.addInt(damage);
// sm.addPopup(target.getObjectId(), getObjectId(), (damage * -1));
sm.addPopup(target.getObjectId(), getObjectId(), (damage * -1));
}
sendPacket(sm);

View File

@ -11504,7 +11504,7 @@ public final class L2PcInstance extends L2Playable
sm.addPcName(this);
sm.addString(target.getName());
sm.addInt(damage);
// sm.addPopup(target.getObjectId(), getObjectId(), -damage);
sm.addPopup(target.getObjectId(), getObjectId(), -damage);
}
sendPacket(sm);
}

View File

@ -275,7 +275,7 @@ public final class L2TrapInstance extends L2Npc
sm.addString(getName());
sm.addString(target.getName());
sm.addInt(damage);
// sm.addPopup(target.getObjectId(), getObjectId(), (damage * -1));
sm.addPopup(target.getObjectId(), getObjectId(), (damage * -1));
_owner.sendPacket(sm);
}
}

View File

@ -131,7 +131,11 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>
{
_params = Arrays.copyOf(_params, _paramIndex + 1);
_smId.setParamCount(_paramIndex + 1);
_log.info("Wrong parameter count '" + (_paramIndex + 1) + "' for SystemMessageId: " + _smId);
// Mobius: With additional on-screen damage param (popup), length is increased.
if (param.getType() != TYPE_POPUP_ID)
{
_log.info("Wrong parameter count '" + (_paramIndex + 1) + "' for SystemMessageId: " + _smId);
}
}
_params[_paramIndex++] = param;

View File

@ -725,7 +725,7 @@ public abstract class L2Summon extends L2Playable
sm.addNpcName(this);
sm.addString(target.getName());
sm.addInt(damage);
// sm.addPopup(target.getObjectId(), getObjectId(), (damage * -1));
sm.addPopup(target.getObjectId(), getObjectId(), (damage * -1));
}
sendPacket(sm);

View File

@ -156,7 +156,7 @@ public class DoppelgangerInstance extends L2Npc
sm.addNpcName(this);
sm.addString(target.getName());
sm.addInt(damage);
// sm.addPopup(target.getObjectId(), getObjectId(), (damage * -1));
sm.addPopup(target.getObjectId(), getObjectId(), (damage * -1));
}
sendPacket(sm);

View File

@ -11504,7 +11504,7 @@ public final class L2PcInstance extends L2Playable
sm.addPcName(this);
sm.addString(target.getName());
sm.addInt(damage);
// sm.addPopup(target.getObjectId(), getObjectId(), -damage);
sm.addPopup(target.getObjectId(), getObjectId(), -damage);
}
sendPacket(sm);
}

View File

@ -275,7 +275,7 @@ public final class L2TrapInstance extends L2Npc
sm.addString(getName());
sm.addString(target.getName());
sm.addInt(damage);
// sm.addPopup(target.getObjectId(), getObjectId(), (damage * -1));
sm.addPopup(target.getObjectId(), getObjectId(), (damage * -1));
_owner.sendPacket(sm);
}
}

View File

@ -132,7 +132,11 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>
{
_params = Arrays.copyOf(_params, _paramIndex + 1);
_smId.setParamCount(_paramIndex + 1);
_log.info("Wrong parameter count '" + (_paramIndex + 1) + "' for SystemMessageId: " + _smId);
// Mobius: With additional on-screen damage param (popup), length is increased.
if (param.getType() != TYPE_POPUP_ID)
{
_log.info("Wrong parameter count '" + (_paramIndex + 1) + "' for SystemMessageId: " + _smId);
}
}
_params[_paramIndex++] = param;