-Fix bug when character w\o weapon can't attack.

-Update HpCpHeal effect & fix system msg typo.

Contributed by NviX.
This commit is contained in:
MobiusDev
2015-07-11 21:02:06 +00:00
parent 5a5dad9c9d
commit 4966433091
2 changed files with 39 additions and 26 deletions

View File

@ -130,7 +130,7 @@ public final class HpCpHeal extends AbstractEffect
{
target.sendPacket(SystemMessageId.REJUVENATING_HP);
}
else
else if (healAmount != 0)
{
if (activeChar.isPlayer() && (activeChar != target))
{
@ -152,21 +152,21 @@ public final class HpCpHeal extends AbstractEffect
if (amount != 0)
{
target.setCurrentCp(amount + target.getCurrentCp());
}
if (activeChar.isPlayer() && (activeChar != target))
{
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S2_CP_HAS_BEEN_RESTORED_BY_C1);
sm.addString(activeChar.getName());
sm.addInt((int) amount);
target.sendPacket(sm);
}
else
{
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CP_HAS_BEEN_RESTORED);
sm.addInt((int) healAmount);
target.sendPacket(sm);
if (activeChar.isPlayer() && (activeChar != target))
{
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S2_CP_HAS_BEEN_RESTORED_BY_C1);
sm.addString(activeChar.getName());
sm.addInt((int) amount);
target.sendPacket(sm);
}
else
{
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CP_HAS_BEEN_RESTORED);
sm.addInt((int) amount);
target.sendPacket(sm);
}
}
}
}
}
}