diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java index aef54b912a..895ac77bce 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java @@ -134,6 +134,12 @@ public final class LaVieEnRose extends AbstractNpcAI return false; } + if (player.isOnEvent()) // custom event message + { + player.sendMessage("You cannot use the Beauty Shop while registered in an event."); + return false; + } + // player.sendPacket(SystemMessageId.YOU_CANNOT_USE_THE_BEAUTY_SHOP_AS_THE_NPC_SERVER_IS_CURRENTLY_NOT_IN_FUNCTION); // player.sendPacket(SystemMessageId.YOU_CANNOT_USE_THE_BEAUTY_SHOP_WHILE_USING_THE_AUTOMATIC_REPLACEMENT); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java index 2b199d632a..155ebe6699 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java @@ -405,6 +405,11 @@ public final class SellBuffsManager implements IGameXmlReader player.sendMessage("You can't sell buffs with Ceremony of Chaos status!"); return false; } + else if (player.isOnEvent()) // custom event message + { + player.sendMessage("You can't sell buffs while registered in an event!"); + return false; + } else if (player.isCursedWeaponEquipped() || (player.getReputation() < 0)) { player.sendMessage("You can't sell buffs in Chaotic state!"); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 2d44a00f5a..54c79d5093 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -9285,6 +9285,11 @@ public final class L2PcInstance extends L2Playable _noDuelReason = SystemMessageId.C1_CANNOT_DUEL_BECAUSE_C1_IS_PARTICIPATING_IN_THE_OLYMPIAD_OR_THE_CEREMONY_OF_CHAOS; return false; } + if (isOnEvent()) // custom event message + { + _noDuelReason = SystemMessageId.C1_CANNOT_DUEL_BECAUSE_C1_IS_CURRENTLY_ENGAGED_IN_BATTLE; + return false; + } if (isCursedWeaponEquipped()) { _noDuelReason = SystemMessageId.C1_CANNOT_DUEL_BECAUSE_C1_IS_IN_A_CHAOTIC_OR_PURPLE_STATE; diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java index 58beb95c3b..0878b6c3cc 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java @@ -66,6 +66,11 @@ public class ConditionPlayerCanSwitchSubclass extends Condition player.sendPacket(SystemMessageId.YOU_CANNOT_CHANGE_YOUR_SUBCLASS_WHILE_REGISTERED_IN_THE_CEREMONY_OF_CHAOS); canSwitchSub = false; } + else if (player.isOnEvent()) + { + player.sendMessage("You cannot change your subclass while registered in an event."); + canSwitchSub = false; + } else if (player.isAllSkillsDisabled()) { canSwitchSub = false; diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java index b1fcd73bef..1eeab4cc93 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java @@ -74,6 +74,13 @@ public final class RequestFriendInvite implements IClientIncomingPacket return; } + // Cannot request friendship in any custom event. + if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot invite a friend while participating in an event."); + return; + } + // Target blocked active player. if (BlockList.isBlocked(friend, activeChar)) { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java index a541c0b116..f104c94161 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java @@ -92,6 +92,12 @@ public final class RequestJoinParty implements IClientIncomingPacket return; } + if (requestor.isOnEvent()) // custom event message + { + requestor.sendMessage("You cannot invite to a party while participating in an event."); + return; + } + SystemMessage sm; if (target.isInParty()) { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java index 947e75977d..b6f2892f96 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java @@ -97,6 +97,12 @@ public final class RequestPrivateStoreBuy implements IClientIncomingPacket return; } + if (player.isOnEvent()) // custom event message + { + player.sendMessage("You cannot open a private store while participating in an event."); + return; + } + if (!client.getFloodProtectors().getTransaction().tryPerformAction("privatestorebuy")) { player.sendMessage("You are buying items too fast."); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java index 85acf6c99e..536446bb1d 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java @@ -94,6 +94,12 @@ public final class RequestPrivateStoreSell implements IClientIncomingPacket return; } + if (player.isOnEvent()) // custom event message + { + player.sendMessage("You cannot open a private store while participating in an event."); + return; + } + if (!client.getFloodProtectors().getTransaction().tryPerformAction("privatestoresell")) { player.sendMessage("You are selling items too fast."); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java index 338341bd5e..c715881866 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java @@ -100,6 +100,11 @@ public class RequestAcquireAbilityList implements IClientIncomingPacket activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_OR_RESET_ABILITY_POINTS_WHILE_PARTICIPATING_IN_THE_OLYMPIAD_OR_CEREMONY_OF_CHAOS); return; } + else if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot use or reset Ability Points while participating in an event."); + return; + } final int[] pointsSpent = new int[TREE_SIZE]; Arrays.fill(pointsSpent, 0); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java index b2697ae326..0fbb6cf615 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java @@ -71,6 +71,11 @@ public class RequestChangeAbilityPoint implements IClientIncomingPacket activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_OR_RESET_ABILITY_POINTS_WHILE_PARTICIPATING_IN_THE_OLYMPIAD_OR_CEREMONY_OF_CHAOS); return; } + else if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot use or reset Ability Points while participating in an event."); + return; + } final long spRequired = AbilityPointsData.getInstance().getPrice(activeChar.getAbilityPoints()); if (spRequired > activeChar.getSp()) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java index 2550a84f2b..708bd16eaa 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java @@ -68,6 +68,11 @@ public class RequestResetAbilityPoint implements IClientIncomingPacket client.sendPacket(SystemMessageId.YOU_CANNOT_USE_OR_RESET_ABILITY_POINTS_WHILE_PARTICIPATING_IN_THE_OLYMPIAD_OR_CEREMONY_OF_CHAOS); return; } + else if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot use or reset Ability Points while participating in an event."); + return; + } else if (activeChar.getAbilityPoints() == 0) { activeChar.sendMessage("You don't have ability points to reset!"); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java index aef54b912a..895ac77bce 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java @@ -134,6 +134,12 @@ public final class LaVieEnRose extends AbstractNpcAI return false; } + if (player.isOnEvent()) // custom event message + { + player.sendMessage("You cannot use the Beauty Shop while registered in an event."); + return false; + } + // player.sendPacket(SystemMessageId.YOU_CANNOT_USE_THE_BEAUTY_SHOP_AS_THE_NPC_SERVER_IS_CURRENTLY_NOT_IN_FUNCTION); // player.sendPacket(SystemMessageId.YOU_CANNOT_USE_THE_BEAUTY_SHOP_WHILE_USING_THE_AUTOMATIC_REPLACEMENT); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java index 2b199d632a..155ebe6699 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java @@ -405,6 +405,11 @@ public final class SellBuffsManager implements IGameXmlReader player.sendMessage("You can't sell buffs with Ceremony of Chaos status!"); return false; } + else if (player.isOnEvent()) // custom event message + { + player.sendMessage("You can't sell buffs while registered in an event!"); + return false; + } else if (player.isCursedWeaponEquipped() || (player.getReputation() < 0)) { player.sendMessage("You can't sell buffs in Chaotic state!"); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 72aedab4f3..a523755493 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -9285,6 +9285,11 @@ public final class L2PcInstance extends L2Playable _noDuelReason = SystemMessageId.C1_CANNOT_DUEL_BECAUSE_C1_IS_PARTICIPATING_IN_THE_OLYMPIAD_OR_THE_CEREMONY_OF_CHAOS; return false; } + if (isOnEvent()) // custom event message + { + _noDuelReason = SystemMessageId.C1_CANNOT_DUEL_BECAUSE_C1_IS_CURRENTLY_ENGAGED_IN_BATTLE; + return false; + } if (isCursedWeaponEquipped()) { _noDuelReason = SystemMessageId.C1_CANNOT_DUEL_BECAUSE_C1_IS_IN_A_CHAOTIC_OR_PURPLE_STATE; diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java index 58beb95c3b..0878b6c3cc 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java @@ -66,6 +66,11 @@ public class ConditionPlayerCanSwitchSubclass extends Condition player.sendPacket(SystemMessageId.YOU_CANNOT_CHANGE_YOUR_SUBCLASS_WHILE_REGISTERED_IN_THE_CEREMONY_OF_CHAOS); canSwitchSub = false; } + else if (player.isOnEvent()) + { + player.sendMessage("You cannot change your subclass while registered in an event."); + canSwitchSub = false; + } else if (player.isAllSkillsDisabled()) { canSwitchSub = false; diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java index b1fcd73bef..1eeab4cc93 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java @@ -74,6 +74,13 @@ public final class RequestFriendInvite implements IClientIncomingPacket return; } + // Cannot request friendship in any custom event. + if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot invite a friend while participating in an event."); + return; + } + // Target blocked active player. if (BlockList.isBlocked(friend, activeChar)) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java index a541c0b116..f104c94161 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java @@ -92,6 +92,12 @@ public final class RequestJoinParty implements IClientIncomingPacket return; } + if (requestor.isOnEvent()) // custom event message + { + requestor.sendMessage("You cannot invite to a party while participating in an event."); + return; + } + SystemMessage sm; if (target.isInParty()) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java index 947e75977d..b6f2892f96 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java @@ -97,6 +97,12 @@ public final class RequestPrivateStoreBuy implements IClientIncomingPacket return; } + if (player.isOnEvent()) // custom event message + { + player.sendMessage("You cannot open a private store while participating in an event."); + return; + } + if (!client.getFloodProtectors().getTransaction().tryPerformAction("privatestorebuy")) { player.sendMessage("You are buying items too fast."); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java index 85acf6c99e..536446bb1d 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java @@ -94,6 +94,12 @@ public final class RequestPrivateStoreSell implements IClientIncomingPacket return; } + if (player.isOnEvent()) // custom event message + { + player.sendMessage("You cannot open a private store while participating in an event."); + return; + } + if (!client.getFloodProtectors().getTransaction().tryPerformAction("privatestoresell")) { player.sendMessage("You are selling items too fast."); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java index 338341bd5e..c715881866 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java @@ -100,6 +100,11 @@ public class RequestAcquireAbilityList implements IClientIncomingPacket activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_OR_RESET_ABILITY_POINTS_WHILE_PARTICIPATING_IN_THE_OLYMPIAD_OR_CEREMONY_OF_CHAOS); return; } + else if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot use or reset Ability Points while participating in an event."); + return; + } final int[] pointsSpent = new int[TREE_SIZE]; Arrays.fill(pointsSpent, 0); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java index b2697ae326..0fbb6cf615 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java @@ -71,6 +71,11 @@ public class RequestChangeAbilityPoint implements IClientIncomingPacket activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_OR_RESET_ABILITY_POINTS_WHILE_PARTICIPATING_IN_THE_OLYMPIAD_OR_CEREMONY_OF_CHAOS); return; } + else if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot use or reset Ability Points while participating in an event."); + return; + } final long spRequired = AbilityPointsData.getInstance().getPrice(activeChar.getAbilityPoints()); if (spRequired > activeChar.getSp()) diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java index 2550a84f2b..708bd16eaa 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java @@ -68,6 +68,11 @@ public class RequestResetAbilityPoint implements IClientIncomingPacket client.sendPacket(SystemMessageId.YOU_CANNOT_USE_OR_RESET_ABILITY_POINTS_WHILE_PARTICIPATING_IN_THE_OLYMPIAD_OR_CEREMONY_OF_CHAOS); return; } + else if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot use or reset Ability Points while participating in an event."); + return; + } else if (activeChar.getAbilityPoints() == 0) { activeChar.sendMessage("You don't have ability points to reset!"); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java index aef54b912a..895ac77bce 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java @@ -134,6 +134,12 @@ public final class LaVieEnRose extends AbstractNpcAI return false; } + if (player.isOnEvent()) // custom event message + { + player.sendMessage("You cannot use the Beauty Shop while registered in an event."); + return false; + } + // player.sendPacket(SystemMessageId.YOU_CANNOT_USE_THE_BEAUTY_SHOP_AS_THE_NPC_SERVER_IS_CURRENTLY_NOT_IN_FUNCTION); // player.sendPacket(SystemMessageId.YOU_CANNOT_USE_THE_BEAUTY_SHOP_WHILE_USING_THE_AUTOMATIC_REPLACEMENT); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java index 2b199d632a..155ebe6699 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java @@ -405,6 +405,11 @@ public final class SellBuffsManager implements IGameXmlReader player.sendMessage("You can't sell buffs with Ceremony of Chaos status!"); return false; } + else if (player.isOnEvent()) // custom event message + { + player.sendMessage("You can't sell buffs while registered in an event!"); + return false; + } else if (player.isCursedWeaponEquipped() || (player.getReputation() < 0)) { player.sendMessage("You can't sell buffs in Chaotic state!"); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 8f0f11ba2f..ea7e249b32 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -9296,6 +9296,11 @@ public final class L2PcInstance extends L2Playable _noDuelReason = SystemMessageId.C1_CANNOT_DUEL_BECAUSE_C1_IS_PARTICIPATING_IN_THE_OLYMPIAD_OR_THE_CEREMONY_OF_CHAOS; return false; } + if (isOnEvent()) // custom event message + { + _noDuelReason = SystemMessageId.C1_CANNOT_DUEL_BECAUSE_C1_IS_CURRENTLY_ENGAGED_IN_BATTLE; + return false; + } if (isCursedWeaponEquipped()) { _noDuelReason = SystemMessageId.C1_CANNOT_DUEL_BECAUSE_C1_IS_IN_A_CHAOTIC_OR_PURPLE_STATE; diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java index 58beb95c3b..0878b6c3cc 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java @@ -66,6 +66,11 @@ public class ConditionPlayerCanSwitchSubclass extends Condition player.sendPacket(SystemMessageId.YOU_CANNOT_CHANGE_YOUR_SUBCLASS_WHILE_REGISTERED_IN_THE_CEREMONY_OF_CHAOS); canSwitchSub = false; } + else if (player.isOnEvent()) + { + player.sendMessage("You cannot change your subclass while registered in an event."); + canSwitchSub = false; + } else if (player.isAllSkillsDisabled()) { canSwitchSub = false; diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java index b1fcd73bef..1eeab4cc93 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java @@ -74,6 +74,13 @@ public final class RequestFriendInvite implements IClientIncomingPacket return; } + // Cannot request friendship in any custom event. + if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot invite a friend while participating in an event."); + return; + } + // Target blocked active player. if (BlockList.isBlocked(friend, activeChar)) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java index a541c0b116..f104c94161 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java @@ -92,6 +92,12 @@ public final class RequestJoinParty implements IClientIncomingPacket return; } + if (requestor.isOnEvent()) // custom event message + { + requestor.sendMessage("You cannot invite to a party while participating in an event."); + return; + } + SystemMessage sm; if (target.isInParty()) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java index 947e75977d..b6f2892f96 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java @@ -97,6 +97,12 @@ public final class RequestPrivateStoreBuy implements IClientIncomingPacket return; } + if (player.isOnEvent()) // custom event message + { + player.sendMessage("You cannot open a private store while participating in an event."); + return; + } + if (!client.getFloodProtectors().getTransaction().tryPerformAction("privatestorebuy")) { player.sendMessage("You are buying items too fast."); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java index cb9ca00390..4bdeb34604 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java @@ -105,6 +105,12 @@ public final class RequestPrivateStoreSell implements IClientIncomingPacket return; } + if (player.isOnEvent()) // custom event message + { + player.sendMessage("You cannot open a private store while participating in an event."); + return; + } + if (!client.getFloodProtectors().getTransaction().tryPerformAction("privatestoresell")) { player.sendMessage("You are selling items too fast."); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java index 338341bd5e..c715881866 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java @@ -100,6 +100,11 @@ public class RequestAcquireAbilityList implements IClientIncomingPacket activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_OR_RESET_ABILITY_POINTS_WHILE_PARTICIPATING_IN_THE_OLYMPIAD_OR_CEREMONY_OF_CHAOS); return; } + else if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot use or reset Ability Points while participating in an event."); + return; + } final int[] pointsSpent = new int[TREE_SIZE]; Arrays.fill(pointsSpent, 0); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java index b2697ae326..0fbb6cf615 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java @@ -71,6 +71,11 @@ public class RequestChangeAbilityPoint implements IClientIncomingPacket activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_OR_RESET_ABILITY_POINTS_WHILE_PARTICIPATING_IN_THE_OLYMPIAD_OR_CEREMONY_OF_CHAOS); return; } + else if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot use or reset Ability Points while participating in an event."); + return; + } final long spRequired = AbilityPointsData.getInstance().getPrice(activeChar.getAbilityPoints()); if (spRequired > activeChar.getSp()) diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java index 2550a84f2b..708bd16eaa 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java @@ -68,6 +68,11 @@ public class RequestResetAbilityPoint implements IClientIncomingPacket client.sendPacket(SystemMessageId.YOU_CANNOT_USE_OR_RESET_ABILITY_POINTS_WHILE_PARTICIPATING_IN_THE_OLYMPIAD_OR_CEREMONY_OF_CHAOS); return; } + else if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot use or reset Ability Points while participating in an event."); + return; + } else if (activeChar.getAbilityPoints() == 0) { activeChar.sendMessage("You don't have ability points to reset!"); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java index 2b199d632a..155ebe6699 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/SellBuffsManager.java @@ -405,6 +405,11 @@ public final class SellBuffsManager implements IGameXmlReader player.sendMessage("You can't sell buffs with Ceremony of Chaos status!"); return false; } + else if (player.isOnEvent()) // custom event message + { + player.sendMessage("You can't sell buffs while registered in an event!"); + return false; + } else if (player.isCursedWeaponEquipped() || (player.getReputation() < 0)) { player.sendMessage("You can't sell buffs in Chaotic state!"); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index eb44a95708..6c8df576c1 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -9258,6 +9258,11 @@ public final class L2PcInstance extends L2Playable _noDuelReason = SystemMessageId.C1_CANNOT_DUEL_BECAUSE_C1_IS_PARTICIPATING_IN_THE_OLYMPIAD_OR_THE_CEREMONY_OF_CHAOS; return false; } + if (isOnEvent()) // custom event message + { + _noDuelReason = SystemMessageId.C1_CANNOT_DUEL_BECAUSE_C1_IS_CURRENTLY_ENGAGED_IN_BATTLE; + return false; + } if (isCursedWeaponEquipped()) { _noDuelReason = SystemMessageId.C1_CANNOT_DUEL_BECAUSE_C1_IS_IN_A_CHAOTIC_OR_PURPLE_STATE; diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java index 58beb95c3b..0878b6c3cc 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/conditions/ConditionPlayerCanSwitchSubclass.java @@ -66,6 +66,11 @@ public class ConditionPlayerCanSwitchSubclass extends Condition player.sendPacket(SystemMessageId.YOU_CANNOT_CHANGE_YOUR_SUBCLASS_WHILE_REGISTERED_IN_THE_CEREMONY_OF_CHAOS); canSwitchSub = false; } + else if (player.isOnEvent()) + { + player.sendMessage("You cannot change your subclass while registered in an event."); + canSwitchSub = false; + } else if (player.isAllSkillsDisabled()) { canSwitchSub = false; diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java index b1fcd73bef..1eeab4cc93 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestFriendInvite.java @@ -74,6 +74,13 @@ public final class RequestFriendInvite implements IClientIncomingPacket return; } + // Cannot request friendship in any custom event. + if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot invite a friend while participating in an event."); + return; + } + // Target blocked active player. if (BlockList.isBlocked(friend, activeChar)) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java index a541c0b116..f104c94161 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestJoinParty.java @@ -92,6 +92,12 @@ public final class RequestJoinParty implements IClientIncomingPacket return; } + if (requestor.isOnEvent()) // custom event message + { + requestor.sendMessage("You cannot invite to a party while participating in an event."); + return; + } + SystemMessage sm; if (target.isInParty()) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java index 947e75977d..b6f2892f96 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreBuy.java @@ -97,6 +97,12 @@ public final class RequestPrivateStoreBuy implements IClientIncomingPacket return; } + if (player.isOnEvent()) // custom event message + { + player.sendMessage("You cannot open a private store while participating in an event."); + return; + } + if (!client.getFloodProtectors().getTransaction().tryPerformAction("privatestorebuy")) { player.sendMessage("You are buying items too fast."); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java index cb9ca00390..4bdeb34604 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/RequestPrivateStoreSell.java @@ -105,6 +105,12 @@ public final class RequestPrivateStoreSell implements IClientIncomingPacket return; } + if (player.isOnEvent()) // custom event message + { + player.sendMessage("You cannot open a private store while participating in an event."); + return; + } + if (!client.getFloodProtectors().getTransaction().tryPerformAction("privatestoresell")) { player.sendMessage("You are selling items too fast."); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java index 338341bd5e..c715881866 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestAcquireAbilityList.java @@ -100,6 +100,11 @@ public class RequestAcquireAbilityList implements IClientIncomingPacket activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_OR_RESET_ABILITY_POINTS_WHILE_PARTICIPATING_IN_THE_OLYMPIAD_OR_CEREMONY_OF_CHAOS); return; } + else if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot use or reset Ability Points while participating in an event."); + return; + } final int[] pointsSpent = new int[TREE_SIZE]; Arrays.fill(pointsSpent, 0); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java index b2697ae326..0fbb6cf615 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestChangeAbilityPoint.java @@ -71,6 +71,11 @@ public class RequestChangeAbilityPoint implements IClientIncomingPacket activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_OR_RESET_ABILITY_POINTS_WHILE_PARTICIPATING_IN_THE_OLYMPIAD_OR_CEREMONY_OF_CHAOS); return; } + else if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot use or reset Ability Points while participating in an event."); + return; + } final long spRequired = AbilityPointsData.getInstance().getPrice(activeChar.getAbilityPoints()); if (spRequired > activeChar.getSp()) diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java index 2550a84f2b..708bd16eaa 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/ability/RequestResetAbilityPoint.java @@ -68,6 +68,11 @@ public class RequestResetAbilityPoint implements IClientIncomingPacket client.sendPacket(SystemMessageId.YOU_CANNOT_USE_OR_RESET_ABILITY_POINTS_WHILE_PARTICIPATING_IN_THE_OLYMPIAD_OR_CEREMONY_OF_CHAOS); return; } + else if (activeChar.isOnEvent()) // custom event message + { + activeChar.sendMessage("You cannot use or reset Ability Points while participating in an event."); + return; + } else if (activeChar.getAbilityPoints() == 0) { activeChar.sendMessage("You don't have ability points to reset!");