Package l2p.gameserver.model.entity.vehicle

Examples of l2p.gameserver.model.entity.vehicle.L2Vehicle


    Commands command = (Commands) comm;
    if(!activeChar.getPlayerAccess().Menu)
    {
      return false;
    }
    L2Vehicle boat = null;
    switch(command)
    {
      case admin_boat_reset:
        if(wordList.length == 2)
        {
          boat = L2VehicleManager.getInstance().getBoat(Integer.parseInt(wordList[1]));
        }
        else
        {
          for(L2Character cha : L2World.getAroundCharacters(activeChar))
          {
            if(cha != null && cha.isVehicle())
            {
              boat = (L2Vehicle) cha;
              break;
            }
          }
        }
        if(boat != null)
        {
          boat.despawn();
          boat.spawn();
        }
        break;
      case admin_boat_reload:
        for(L2Vehicle b : L2VehicleManager.getInstance().getBoats().values())
        {
          if(b != null)
          {
            b.despawn();
            b.deleteMe();
          }
        }
        L2VehicleManager.getInstance().getBoats().clear();
        L2VehicleManager.getInstance().loadShips();
        break;
      case admin_airship:
        boat = new L2AirShip(activeChar.getClan(), "airship", 0);
        boat.setHeading(activeChar.getHeading());
        boat.setXYZ(activeChar.getX(), activeChar.getY(), activeChar.getZ() + 333);
        L2VehicleManager.getInstance().addStaticItem(boat);
        boat.spawn();
        break;
      case admin_airship_enter:
        for(L2Character cha : L2World.getAroundCharacters(activeChar, 1000, 1000))
        {
          if(cha.isAirShip())
View Full Code Here


        player.sendPacket(new SystemMessage(SystemMessage.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addItemName(getItemConsumeId()[0]));
        return false;
      }
      if(player.isInVehicle())
      {
        L2Vehicle vehicle = player.getVehicle();
        // На воздушных кораблях можно использовать скилы-хэндлеры всем кроме капитана
        if(vehicle.isAirShip() && (!_isItemHandler || ((L2AirShip) vehicle).getDriver() == player))
        {
          return false;
        }
        // С морских кораблей можно ловить рыбу
        if(vehicle instanceof L2Ship && !(this instanceof Fishing || this instanceof ReelingPumping))
View Full Code Here

          {
            activeChar.sendPacket(new SystemMessage(SystemMessage.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addItemName(itemId));
            return;
          }
          // Нельзя одевать/снимать оружие/щит/сигил, управляя кораблем
          L2Vehicle vehicle = activeChar.getVehicle();
          if(vehicle != null && vehicle.isAirShip())
          {
            L2AirShip airship = (L2AirShip) vehicle;
            if(airship.getDriver() == activeChar)
            {
              activeChar.sendPacket(new SystemMessage(SystemMessage.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addItemName(itemId));
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.entity.vehicle.L2Vehicle

Copyright © 2018 www.massapicom. 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.