if (!actor.isPlayer())
{
return;
}
Player player = (Player) actor;
Residence residence = (Residence) zone.getParams().get("residence");
if ((residence.getOwner() == null) || (residence.getOwner() != player.getClan()))
{
return;
}
if (residence.isFunctionActive(ResidenceFunction.RESTORE_HP))
{
double value = 1. + (residence.getFunction(ResidenceFunction.RESTORE_HP).getLevel() / 100.);
player.addStatFunc(new FuncMul(Stats.REGENERATE_HP_RATE, 0x30, residence, value));
}
if (residence.isFunctionActive(ResidenceFunction.RESTORE_MP))
{
double value = 1. + (residence.getFunction(ResidenceFunction.RESTORE_MP).getLevel() / 100.);
player.addStatFunc(new FuncMul(Stats.REGENERATE_MP_RATE, 0x30, residence, value));
}
}