@Override protected void runImpl() { L2PcInstance _activeChar = getClient().getActiveChar(); if (_activeChar == null) return; if (!_activeChar.isInPartyMatchRoom() && _activeChar.getParty() != null && _activeChar.getParty().getLeader() != _activeChar) { _activeChar.sendPacket(new SystemMessage(SystemMessageId.CANT_VIEW_PARTY_ROOMS)); _activeChar.sendPacket(ActionFailed.STATIC_PACKET); return; } if (_activeChar.isInPartyMatchRoom()) { // If Player is in Room show him room, not list PartyMatchRoomList _list = PartyMatchRoomList.getInstance(); if (_list == null) return; PartyMatchRoom _room = _list.getPlayerRoom(_activeChar); if (_room == null) return; _activeChar.sendPacket(new PartyMatchDetail(_activeChar, _room)); _activeChar.sendPacket(new ExPartyRoomMember(_activeChar, _room, 2)); _activeChar.setPartyRoom(_room.getId()); // _activeChar.setPartyMatching(1); _activeChar.broadcastUserInfo(); } else { // Add to waiting list PartyMatchWaitingList.getInstance().addPlayer(_activeChar); // Send Room list ListPartyWating matchList = new ListPartyWating(_activeChar, _auto, _loc, _lvl); _activeChar.sendPacket(matchList); } }
/** * Handle chat type 'partymatchroom' * * @see net.sf.l2j.gameserver.handler.IChatHandler#handleChat(int, * net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String) */ public void handleChat(int type, L2PcInstance activeChar, String target, String text) { if (activeChar.isInPartyMatchRoom()) { PartyMatchRoom _room = PartyMatchRoomList.getInstance().getPlayerRoom(activeChar); if (_room != null) { if (activeChar.isChatBanned() && Util.contains(Config.BAN_CHAT_CHANNELS, type)) { activeChar.sendPacket( SystemMessage.getSystemMessage(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED)); return; } CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text); for (L2PcInstance _member : _room.getPartyMembers()) { _member.sendPacket(cs); } } } }