Package l2p.gameserver.clientpackets

Source Code of l2p.gameserver.clientpackets.RequestOustFromPartyRoom

package l2p.gameserver.clientpackets;

import l2p.gameserver.instancemanager.PartyRoomManager;
import l2p.gameserver.model.L2ObjectsStorage;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.model.PartyRoom;

/**
* format (ch) d
*/
public class RequestOustFromPartyRoom extends L2GameClientPacket
{
  private int _id;

  @Override
  public void readImpl()
  {
    _id = readD();
  }

  @Override
  public void runImpl()
  {
    L2Player activeChar = getClient().getActiveChar();
    L2Player member = L2ObjectsStorage.getPlayer(_id);
    if(activeChar == null || member == null)
    {
      return;
    }
    PartyRoom room = PartyRoomManager.getInstance().getRoom(member.getPartyRoom());
    if(room != null)
    {
      room.removeMember(member, true);
    }
  }
}
TOP

Related Classes of l2p.gameserver.clientpackets.RequestOustFromPartyRoom

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.