Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: net/sf/l2j/gameserver/network/clientpackets/RequestRestart.java
- +if(player.isInCTFEvent() && CTFEvent.isStarted() || player.isInTVTEvent() && TvTEvent.isStarted() || player.isInDMEvent() && DMEvent.isStarted())
- + {
- + player.sendMessage("You cannot logout while in CTF And TvT And DM Event!");
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- + sendPacket(RestartResponse.valueOf(false));
- + return;
- + }
- if ((player.isInArenaEvent() || player.isArenaProtection()) && ArenaTask.is_started())
- {
- player.sendMessage("You cannot logout while in Tournament Event!");
- player.sendPacket(ActionFailed.STATIC_PACKET);
- sendPacket(RestartResponse.valueOf(false));
- return;
- }
- Index: net/sf/l2j/gameserver/network/clientpackets/Logout.java
- +if(player.isInCTFEvent() && CTFEvent.isStarted() || player.isInTVTEvent() && TvTEvent.isStarted() || player.isInDMEvent() && DMEvent.isStarted())
- + {
- + player.sendMessage("You cannot Exit while in CTF And TvT And DM Event!");
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- + sendPacket(RestartResponse.valueOf(false));
- + return;
- + }
- if (player.getActiveEnchantItem() != null)
- {
- player.sendPacket(ActionFailed.STATIC_PACKET);
- return;
- }
- Index: net/sf/l2j/gameserver/model/actor/Player.java
- public boolean atEvent = false;
- public boolean atCTFEvent = false;
- public boolean atTVTEvent = false;
- +public boolean atDMEvent = false;
- +public boolean isInDMEvent()
- + {
- + return (atDMEvent || (DMEvent.isStarted() && DMEvent.isPlayerParticipant(getObjectId())));
- + }
- public boolean isInFunEvent()
- {
- return (atEvent || (TvTEvent.isStarted() && TvTEvent.isPlayerParticipant(getObjectId())) || (CTFEvent.isStarted() && CTFEvent.isPlayerParticipant(getObjectId())));
- }
- Index: net/sf/l2j/gameserver/network/clientpackets/UseItem.java
- import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
- +import net.sf.l2j.gameserver.model.entity.events.capturetheflag.CTFEvent;
- +import net.sf.l2j.gameserver.model.entity.events.deathmatch.DMEvent;
- +import net.sf.l2j.gameserver.model.entity.events.teamvsteam.TvTEvent;
- if (activeChar.isInsideZone(ZoneId.INVASION) && L2InvasionZone.isRestrictedItem(item.getItemId()))
- {
- activeChar.sendMessage(item.getName() + " cannot be used inside Tournament Invasion Zone.");
- return;
- }
- +if ((item.getItemId() == 736 || item.getItemId() == 7117 || item.getItemId() == 7118 || item.getItemId() == 7119 || item.getItemId() == 7120 || item.getItemId() == 7121 || item.getItemId() == 7122 || item.getItemId() == 7123 || item.getItemId() == 7124 || item.getItemId() == 7121 || item.getItemId() == 7125 || item.getItemId() == 7126 || item.getItemId() == 7127 || item.getItemId() == 7128 || item.getItemId() == 7129 || item.getItemId() == 7130 || item.getItemId() == 7131 || item.getItemId() == 7132 || item.getItemId() == 7133 || item.getItemId() == 7134 || item.getItemId() == 7135 || item.getItemId() == 7554 || item.getItemId() == 7555 || item.getItemId() == 7556 || item.getItemId() == 7557 || item.getItemId() == 7558 || item.getItemId() == 7559 || item.getItemId() == 1538 || item.getItemId() == 1830 || item.getItemId() == 1829 || item.getItemId() == 3958 || item.getItemId() == 5858 || item.getItemId() == 5859 || item.getItemId() == 9156) && ((activeChar.isInTVTEvent() && TvTEvent.isStarted()) || (activeChar.isInCTFEvent() && CTFEvent.isStarted()) || (activeChar.isInDMEvent() && DMEvent.isStarted())))
- + {
- + activeChar.sendMessage("You can not use this item in TVT+DM+CTF Event..");
- + return;
- + }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement