Sync with L2jServer HighFive May 4th 2015.
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
*/
|
||||
package handlers.effecthandlers;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
import com.l2jserver.gameserver.ai.CtrlEvent;
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
@ -105,7 +106,17 @@ public final class Fear extends AbstractEffect
|
||||
info.getEffected().setRunning();
|
||||
}
|
||||
|
||||
final Location destination = GeoData.getInstance().moveCheck(info.getEffected().getX(), info.getEffected().getY(), info.getEffected().getZ(), posX, posY, posZ, info.getEffected().getInstanceId());
|
||||
// If pathfinding enabled the creature will go to the defined destination (retail like).
|
||||
// Otherwise it will go to the nearest obstacle.
|
||||
final Location destination;
|
||||
if (Config.PATHFINDING > 0)
|
||||
{
|
||||
destination = new Location(posX, posY, posZ, info.getEffected().getInstanceId());
|
||||
}
|
||||
else
|
||||
{
|
||||
destination = GeoData.getInstance().moveCheck(info.getEffected().getX(), info.getEffected().getY(), info.getEffected().getZ(), posX, posY, posZ, info.getEffected().getInstanceId());
|
||||
}
|
||||
info.getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, destination);
|
||||
}
|
||||
}
|
||||
|
@ -48,12 +48,6 @@ public final class TransferHate extends AbstractEffect
|
||||
return Formulas.calcProbability(_chance, info.getEffector(), info.getEffected(), info.getSkill());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canStart(BuffInfo info)
|
||||
{
|
||||
return Util.checkIfInRange(info.getSkill().getEffectRange(), info.getEffector(), info.getEffected(), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInstant()
|
||||
{
|
||||
@ -63,6 +57,11 @@ public final class TransferHate extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(BuffInfo info)
|
||||
{
|
||||
if (!Util.checkIfInRange(info.getSkill().getEffectRange(), info.getEffector(), info.getEffected(), true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (L2Character obj : info.getEffector().getKnownList().getKnownCharactersInRadius(info.getSkill().getAffectRange()))
|
||||
{
|
||||
if ((obj == null) || !obj.isAttackable() || obj.isDead())
|
||||
|
@ -55,16 +55,9 @@ public final class Unsummon extends AbstractEffect
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canStart(BuffInfo info)
|
||||
{
|
||||
return info.getEffected().isSummon();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInstant()
|
||||
{
|
||||
|
@ -39,12 +39,6 @@ public final class VitalityPointUp extends AbstractEffect
|
||||
_value = params.getInt("value", 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canStart(BuffInfo info)
|
||||
{
|
||||
return (info.getEffected() != null) && info.getEffected().isPlayer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInstant()
|
||||
{
|
||||
@ -54,7 +48,10 @@ public final class VitalityPointUp extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(BuffInfo info)
|
||||
{
|
||||
info.getEffected().getActingPlayer().updateVitalityPoints(_value, false, false);
|
||||
info.getEffected().getActingPlayer().sendPacket(new UserInfo(info.getEffected().getActingPlayer()));
|
||||
if ((info.getEffected() != null) && info.getEffected().isPlayer())
|
||||
{
|
||||
info.getEffected().getActingPlayer().updateVitalityPoints(_value, false, false);
|
||||
info.getEffected().getActingPlayer().sendPacket(new UserInfo(info.getEffected().getActingPlayer()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user