Addition of config for allowing mounts during sieges.
This commit is contained in:
@@ -454,6 +454,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
|
||||
public void transform(Transform transformation, boolean addSkills)
|
||||
{
|
||||
if (!Config.ALLOW_MOUNTS_DURING_SIEGE && transformation.isRiding() && isInsideZone(ZoneId.SIEGE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_transform = Optional.of(transformation);
|
||||
transformation.onTransform(this, addSkills);
|
||||
}
|
||||
|
@@ -6015,6 +6015,11 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public boolean mount(L2Summon pet)
|
||||
{
|
||||
if (!Config.ALLOW_MOUNTS_DURING_SIEGE && isInsideZone(ZoneId.SIEGE))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!disarmWeapons() || !disarmShield() || isTransformed())
|
||||
{
|
||||
return false;
|
||||
|
@@ -161,6 +161,16 @@ public class L2SiegeZone extends L2ZoneType
|
||||
plyer.sendPacket(SystemMessageId.THIS_AREA_CANNOT_BE_ENTERED_WHILE_MOUNTED_ATOP_OF_A_WYVERN_YOU_WILL_BE_DISMOUNTED_FROM_YOUR_WYVERN_IF_YOU_DO_NOT_LEAVE);
|
||||
plyer.enteredNoLanding(DISMOUNT_DELAY);
|
||||
}
|
||||
|
||||
if (!Config.ALLOW_MOUNTS_DURING_SIEGE && plyer.isMounted())
|
||||
{
|
||||
plyer.dismount();
|
||||
}
|
||||
|
||||
if (!Config.ALLOW_MOUNTS_DURING_SIEGE && plyer.isTransformed() && plyer.getTransformation().get().isRiding())
|
||||
{
|
||||
plyer.untransform();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user