Addition of config for allowing mounts during sieges.

This commit is contained in:
MobiusDev 2018-09-23 11:35:46 +00:00
parent 1e8e7722c2
commit 9f44337989
50 changed files with 270 additions and 10 deletions

View File

@ -226,4 +226,8 @@ AllowRideWyvernAlways = False
# Allow riding wyvern during Castle/Fort Siege
# Default: True
AllowRideWyvernDuringSiege = True
AllowRideWyvernDuringSiege = True
# Allow riding mounts (wyvern excluded) during Castle/Fort Siege
# Default: False
AllowRideMountsDuringSiege = False

View File

@ -385,6 +385,7 @@ public final class Config
public static int CLAN_LEVEL_11_REQUIREMENT;
public static boolean ALLOW_WYVERN_ALWAYS;
public static boolean ALLOW_WYVERN_DURING_SIEGE;
public static boolean ALLOW_MOUNTS_DURING_SIEGE;
// --------------------------------------------------
// General Settings
@ -1382,6 +1383,7 @@ public final class Config
CLAN_LEVEL_11_REQUIREMENT = Feature.getInt("ClanLevel11Requirement", 170);
ALLOW_WYVERN_ALWAYS = Feature.getBoolean("AllowRideWyvernAlways", false);
ALLOW_WYVERN_DURING_SIEGE = Feature.getBoolean("AllowRideWyvernDuringSiege", true);
ALLOW_MOUNTS_DURING_SIEGE = Feature.getBoolean("AllowRideMountsDuringSiege", false);
// Load Character config file (if exists)
final PropertiesParser Character = new PropertiesParser(CHARACTER_CONFIG_FILE);

View File

@ -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);
}

View File

@ -6007,6 +6007,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;

View File

@ -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();
}
}
}
}

View File

@ -226,4 +226,8 @@ AllowRideWyvernAlways = False
# Allow riding wyvern during Castle/Fort Siege
# Default: True
AllowRideWyvernDuringSiege = True
AllowRideWyvernDuringSiege = True
# Allow riding mounts (wyvern excluded) during Castle/Fort Siege
# Default: False
AllowRideMountsDuringSiege = False

View File

@ -391,6 +391,7 @@ public final class Config
public static int CLAN_LEVEL_11_REQUIREMENT;
public static boolean ALLOW_WYVERN_ALWAYS;
public static boolean ALLOW_WYVERN_DURING_SIEGE;
public static boolean ALLOW_MOUNTS_DURING_SIEGE;
// --------------------------------------------------
// General Settings
@ -1389,6 +1390,7 @@ public final class Config
CLAN_LEVEL_11_REQUIREMENT = Feature.getInt("ClanLevel11Requirement", 170);
ALLOW_WYVERN_ALWAYS = Feature.getBoolean("AllowRideWyvernAlways", false);
ALLOW_WYVERN_DURING_SIEGE = Feature.getBoolean("AllowRideWyvernDuringSiege", true);
ALLOW_MOUNTS_DURING_SIEGE = Feature.getBoolean("AllowRideMountsDuringSiege", false);
// Load Attandance config file (if exists)
final PropertiesParser Attandance = new PropertiesParser(ATTENDANCE_CONFIG_FILE);

View File

@ -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);
}

View File

@ -6013,6 +6013,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;

View File

@ -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();
}
}
}
}

View File

@ -226,4 +226,8 @@ AllowRideWyvernAlways = False
# Allow riding wyvern during Castle/Fort Siege
# Default: True
AllowRideWyvernDuringSiege = True
AllowRideWyvernDuringSiege = True
# Allow riding mounts (wyvern excluded) during Castle/Fort Siege
# Default: False
AllowRideMountsDuringSiege = False

View File

@ -391,6 +391,7 @@ public final class Config
public static int CLAN_LEVEL_11_REQUIREMENT;
public static boolean ALLOW_WYVERN_ALWAYS;
public static boolean ALLOW_WYVERN_DURING_SIEGE;
public static boolean ALLOW_MOUNTS_DURING_SIEGE;
// --------------------------------------------------
// General Settings
@ -1397,6 +1398,7 @@ public final class Config
CLAN_LEVEL_11_REQUIREMENT = Feature.getInt("ClanLevel11Requirement", 170);
ALLOW_WYVERN_ALWAYS = Feature.getBoolean("AllowRideWyvernAlways", false);
ALLOW_WYVERN_DURING_SIEGE = Feature.getBoolean("AllowRideWyvernDuringSiege", true);
ALLOW_MOUNTS_DURING_SIEGE = Feature.getBoolean("AllowRideMountsDuringSiege", false);
// Load Attandance config file (if exists)
final PropertiesParser Attandance = new PropertiesParser(ATTENDANCE_CONFIG_FILE);

View File

@ -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);
}

View File

@ -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;

View File

@ -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();
}
}
}
}

View File

@ -226,4 +226,8 @@ AllowRideWyvernAlways = False
# Allow riding wyvern during Castle/Fort Siege
# Default: True
AllowRideWyvernDuringSiege = True
AllowRideWyvernDuringSiege = True
# Allow riding mounts (wyvern excluded) during Castle/Fort Siege
# Default: False
AllowRideMountsDuringSiege = False

View File

@ -385,6 +385,7 @@ public final class Config
public static int CLAN_LEVEL_11_REQUIREMENT;
public static boolean ALLOW_WYVERN_ALWAYS;
public static boolean ALLOW_WYVERN_DURING_SIEGE;
public static boolean ALLOW_MOUNTS_DURING_SIEGE;
// --------------------------------------------------
// General Settings
@ -1390,6 +1391,7 @@ public final class Config
CLAN_LEVEL_11_REQUIREMENT = Feature.getInt("ClanLevel11Requirement", 170);
ALLOW_WYVERN_ALWAYS = Feature.getBoolean("AllowRideWyvernAlways", false);
ALLOW_WYVERN_DURING_SIEGE = Feature.getBoolean("AllowRideWyvernDuringSiege", true);
ALLOW_MOUNTS_DURING_SIEGE = Feature.getBoolean("AllowRideMountsDuringSiege", false);
// Load Attandance config file (if exists)
final PropertiesParser Attandance = new PropertiesParser(ATTENDANCE_CONFIG_FILE);

View File

@ -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);
}

View File

@ -6013,6 +6013,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;

View File

@ -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();
}
}
}
}

View File

@ -226,4 +226,8 @@ AllowRideWyvernAlways = False
# Allow riding wyvern during Castle/Fort Siege
# Default: True
AllowRideWyvernDuringSiege = True
AllowRideWyvernDuringSiege = True
# Allow riding mounts (wyvern excluded) during Castle/Fort Siege
# Default: False
AllowRideMountsDuringSiege = False

View File

@ -385,6 +385,7 @@ public final class Config
public static int CLAN_LEVEL_11_REQUIREMENT;
public static boolean ALLOW_WYVERN_ALWAYS;
public static boolean ALLOW_WYVERN_DURING_SIEGE;
public static boolean ALLOW_MOUNTS_DURING_SIEGE;
// --------------------------------------------------
// General Settings
@ -1390,6 +1391,7 @@ public final class Config
CLAN_LEVEL_11_REQUIREMENT = Feature.getInt("ClanLevel11Requirement", 170);
ALLOW_WYVERN_ALWAYS = Feature.getBoolean("AllowRideWyvernAlways", false);
ALLOW_WYVERN_DURING_SIEGE = Feature.getBoolean("AllowRideWyvernDuringSiege", true);
ALLOW_MOUNTS_DURING_SIEGE = Feature.getBoolean("AllowRideMountsDuringSiege", false);
// Load Attandance config file (if exists)
final PropertiesParser Attandance = new PropertiesParser(ATTENDANCE_CONFIG_FILE);

View File

@ -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);
}

View File

@ -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;

View File

@ -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();
}
}
}
}

View File

@ -226,4 +226,8 @@ AllowRideWyvernAlways = False
# Allow riding wyvern during Castle/Fort Siege
# Default: True
AllowRideWyvernDuringSiege = True
AllowRideWyvernDuringSiege = True
# Allow riding mounts (wyvern excluded) during Castle/Fort Siege
# Default: False
AllowRideMountsDuringSiege = False

View File

@ -385,6 +385,7 @@ public final class Config
public static int CLAN_LEVEL_11_REQUIREMENT;
public static boolean ALLOW_WYVERN_ALWAYS;
public static boolean ALLOW_WYVERN_DURING_SIEGE;
public static boolean ALLOW_MOUNTS_DURING_SIEGE;
// --------------------------------------------------
// General Settings
@ -1390,6 +1391,7 @@ public final class Config
CLAN_LEVEL_11_REQUIREMENT = Feature.getInt("ClanLevel11Requirement", 170);
ALLOW_WYVERN_ALWAYS = Feature.getBoolean("AllowRideWyvernAlways", false);
ALLOW_WYVERN_DURING_SIEGE = Feature.getBoolean("AllowRideWyvernDuringSiege", true);
ALLOW_MOUNTS_DURING_SIEGE = Feature.getBoolean("AllowRideMountsDuringSiege", false);
// Load Attandance config file (if exists)
final PropertiesParser Attandance = new PropertiesParser(ATTENDANCE_CONFIG_FILE);

View File

@ -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);
}

View File

@ -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;

View File

@ -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();
}
}
}
}

View File

@ -226,4 +226,8 @@ AllowRideWyvernAlways = False
# Allow riding wyvern during Castle/Fort Siege
# Default: True
AllowRideWyvernDuringSiege = True
AllowRideWyvernDuringSiege = True
# Allow riding mounts (wyvern excluded) during Castle/Fort Siege
# Default: False
AllowRideMountsDuringSiege = False

View File

@ -391,6 +391,7 @@ public final class Config
public static int CLAN_LEVEL_11_REQUIREMENT;
public static boolean ALLOW_WYVERN_ALWAYS;
public static boolean ALLOW_WYVERN_DURING_SIEGE;
public static boolean ALLOW_MOUNTS_DURING_SIEGE;
// --------------------------------------------------
// General Settings
@ -1332,6 +1333,7 @@ public final class Config
CLAN_LEVEL_11_REQUIREMENT = Feature.getInt("ClanLevel11Requirement", 170);
ALLOW_WYVERN_ALWAYS = Feature.getBoolean("AllowRideWyvernAlways", false);
ALLOW_WYVERN_DURING_SIEGE = Feature.getBoolean("AllowRideWyvernDuringSiege", true);
ALLOW_MOUNTS_DURING_SIEGE = Feature.getBoolean("AllowRideMountsDuringSiege", false);
// Load Attandance config file (if exists)
final PropertiesParser Attandance = new PropertiesParser(ATTENDANCE_CONFIG_FILE);

View File

@ -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);
}

View File

@ -5978,6 +5978,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;

View File

@ -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();
}
}
}
}

View File

@ -226,4 +226,8 @@ AllowRideWyvernAlways = False
# Allow riding wyvern during Castle/Fort Siege
# Default: True
AllowRideWyvernDuringSiege = True
AllowRideWyvernDuringSiege = True
# Allow riding mounts (wyvern excluded) during Castle/Fort Siege
# Default: False
AllowRideMountsDuringSiege = False

View File

@ -391,6 +391,7 @@ public final class Config
public static int CLAN_LEVEL_11_REQUIREMENT;
public static boolean ALLOW_WYVERN_ALWAYS;
public static boolean ALLOW_WYVERN_DURING_SIEGE;
public static boolean ALLOW_MOUNTS_DURING_SIEGE;
// --------------------------------------------------
// General Settings
@ -1336,6 +1337,7 @@ public final class Config
CLAN_LEVEL_11_REQUIREMENT = Feature.getInt("ClanLevel11Requirement", 170);
ALLOW_WYVERN_ALWAYS = Feature.getBoolean("AllowRideWyvernAlways", false);
ALLOW_WYVERN_DURING_SIEGE = Feature.getBoolean("AllowRideWyvernDuringSiege", true);
ALLOW_MOUNTS_DURING_SIEGE = Feature.getBoolean("AllowRideMountsDuringSiege", false);
// Load Attandance config file (if exists)
final PropertiesParser Attandance = new PropertiesParser(ATTENDANCE_CONFIG_FILE);

View File

@ -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);
}

View File

@ -5979,6 +5979,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;

View File

@ -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();
}
}
}
}

View File

@ -226,4 +226,8 @@ AllowRideWyvernAlways = False
# Allow riding wyvern during Castle/Fort Siege
# Default: True
AllowRideWyvernDuringSiege = True
AllowRideWyvernDuringSiege = True
# Allow riding mounts (wyvern excluded) during Castle/Fort Siege
# Default: False
AllowRideMountsDuringSiege = False

View File

@ -391,6 +391,7 @@ public final class Config
public static int CLAN_LEVEL_11_REQUIREMENT;
public static boolean ALLOW_WYVERN_ALWAYS;
public static boolean ALLOW_WYVERN_DURING_SIEGE;
public static boolean ALLOW_MOUNTS_DURING_SIEGE;
// --------------------------------------------------
// General Settings
@ -1336,6 +1337,7 @@ public final class Config
CLAN_LEVEL_11_REQUIREMENT = Feature.getInt("ClanLevel11Requirement", 170);
ALLOW_WYVERN_ALWAYS = Feature.getBoolean("AllowRideWyvernAlways", false);
ALLOW_WYVERN_DURING_SIEGE = Feature.getBoolean("AllowRideWyvernDuringSiege", true);
ALLOW_MOUNTS_DURING_SIEGE = Feature.getBoolean("AllowRideMountsDuringSiege", false);
// Load Attandance config file (if exists)
final PropertiesParser Attandance = new PropertiesParser(ATTENDANCE_CONFIG_FILE);

View File

@ -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);
}

View File

@ -5981,6 +5981,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;

View File

@ -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();
}
}
}
}

View File

@ -226,4 +226,8 @@ AllowRideWyvernAlways = False
# Allow riding wyvern during Castle/Fort Siege
# Default: True
AllowRideWyvernDuringSiege = True
AllowRideWyvernDuringSiege = True
# Allow riding mounts (wyvern excluded) during Castle/Fort Siege
# Default: False
AllowRideMountsDuringSiege = False

View File

@ -391,6 +391,7 @@ public final class Config
public static int CLAN_LEVEL_11_REQUIREMENT;
public static boolean ALLOW_WYVERN_ALWAYS;
public static boolean ALLOW_WYVERN_DURING_SIEGE;
public static boolean ALLOW_MOUNTS_DURING_SIEGE;
// --------------------------------------------------
// General Settings
@ -1336,6 +1337,7 @@ public final class Config
CLAN_LEVEL_11_REQUIREMENT = Feature.getInt("ClanLevel11Requirement", 170);
ALLOW_WYVERN_ALWAYS = Feature.getBoolean("AllowRideWyvernAlways", false);
ALLOW_WYVERN_DURING_SIEGE = Feature.getBoolean("AllowRideWyvernDuringSiege", true);
ALLOW_MOUNTS_DURING_SIEGE = Feature.getBoolean("AllowRideMountsDuringSiege", false);
// Load Attandance config file (if exists)
final PropertiesParser Attandance = new PropertiesParser(ATTENDANCE_CONFIG_FILE);

View File

@ -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);
}

View File

@ -5981,6 +5981,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;

View File

@ -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();
}
}
}
}