/** Sets HP, MP and CP and revives the Creature. */
public void doRevive()
{
if (!_isDead)
{
return;
}
if (!_isTeleporting)
{
setIsPendingRevive(false);
setDead(false);
if ((Config.RESPAWN_RESTORE_CP > 0) && (_status.getCurrentCp() < (_stat.getMaxCp() * Config.RESPAWN_RESTORE_CP)))
{
_status.setCurrentCp(_stat.getMaxCp() * Config.RESPAWN_RESTORE_CP);
}
if ((Config.RESPAWN_RESTORE_HP > 0) && (_status.getCurrentHp() < (_stat.getMaxHp() * Config.RESPAWN_RESTORE_HP)))
{
_status.setCurrentHp(_stat.getMaxHp() * Config.RESPAWN_RESTORE_HP);
}
if ((Config.RESPAWN_RESTORE_MP > 0) && (_status.getCurrentMp() < (_stat.getMaxMp() * Config.RESPAWN_RESTORE_MP)))
{
_status.setCurrentMp(_stat.getMaxMp() * Config.RESPAWN_RESTORE_MP);
}
// Start broadcast status
broadcastPacket(new Revive(this));
ZoneManager.getInstance().getRegion(this).onRevive(this);
// Remove deads visual effect
getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.TRANQUIL_SOUL.getSkill());
getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.H_DEATH_EFFECT_AVE);
}
else
{
setIsPendingRevive(true);
}
}