Player checks for event registrations.
This commit is contained in:
parent
a8e48d6179
commit
d14391903b
@ -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);
|
||||
|
||||
|
@ -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!");
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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())
|
||||
{
|
||||
|
@ -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.");
|
||||
|
@ -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.");
|
||||
|
@ -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);
|
||||
|
@ -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())
|
||||
|
@ -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!");
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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!");
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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())
|
||||
{
|
||||
|
@ -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.");
|
||||
|
@ -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.");
|
||||
|
@ -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);
|
||||
|
@ -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())
|
||||
|
@ -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!");
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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!");
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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())
|
||||
{
|
||||
|
@ -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.");
|
||||
|
@ -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.");
|
||||
|
@ -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);
|
||||
|
@ -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())
|
||||
|
@ -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!");
|
||||
|
@ -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!");
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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())
|
||||
{
|
||||
|
@ -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.");
|
||||
|
@ -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.");
|
||||
|
@ -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);
|
||||
|
@ -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())
|
||||
|
@ -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!");
|
||||
|
Loading…
Reference in New Issue
Block a user