Examples of FishData


Examples of com.l2jfrozen.gameserver.model.FishData

      String line = null;

      _fishsEasy = new FastList<FishData>();
      _fishsNormal = new FastList<FishData>();
      _fishsHard = new FastList<FishData>();
      FishData fish;

      //format:
      // id;level;name;hp;hpregen;fish_type;fish_group;fish_guts;guts_check_time;wait_time;combat_time
      while((line = lnr.readLine()) != null)
      {
        //ignore comments
        if(line.trim().length() == 0 || line.startsWith("#"))
        {
          continue;
        }

        StringTokenizer st = new StringTokenizer(line, ";");

        int id = Integer.parseInt(st.nextToken());
        int lvl = Integer.parseInt(st.nextToken());
        String name = st.nextToken();
        int hp = Integer.parseInt(st.nextToken());
        int hpreg = Integer.parseInt(st.nextToken());
        int type = Integer.parseInt(st.nextToken());
        int group = Integer.parseInt(st.nextToken());
        int fish_guts = Integer.parseInt(st.nextToken());
        int guts_check_time = Integer.parseInt(st.nextToken());
        int wait_time = Integer.parseInt(st.nextToken());
        int combat_time = Integer.parseInt(st.nextToken());

        fish = new FishData(id, lvl, name, hp, hpreg, type, group, fish_guts, guts_check_time, wait_time, combat_time);
        switch(fish.getGroup())
        {
          case 0:
            _fishsEasy.add(fish);
            break;
          case 1:
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.FishData

      EndFishing(false);
      return;
    }
    int check = Rnd.get(fishs.size());
    // Use a copy constructor else the fish data may be over-written below
    _fish = new FishData(fishs.get(check));
    fishs.clear();
    fishs = null;
    sendPacket(new SystemMessage(SystemMessageId.CAST_LINE_AND_START_FISHING));
    ExFishingStart efs = null;
View Full Code Here

Examples of l2p.gameserver.model.FishData

          int group = resultSet.getInt("fish_group");
          int fish_guts = resultSet.getInt("fish_guts");
          int guts_check_time = resultSet.getInt("guts_check_time");
          int wait_time = resultSet.getInt("wait_time");
          int combat_time = resultSet.getInt("combat_time");
          FishData fish = new FishData(id, lvl, name, hp, hpreg, type, group, fish_guts, guts_check_time, wait_time, combat_time);
          switch(group)
          {
            case 0:
              _fishsEasy.add(fish);
              break;
View Full Code Here

Examples of l2p.gameserver.model.FishData

      }
      if(f.getType() != type)
      {
        continue;
      }
      result.add(new FishData(f.getId(), f.getLevel(), f.getName(), f.getHP(), f.getHpRegen(), f.getType(), f.getGroup(), f.getFishGuts(), f.getGutsCheckTime(), f.getWaitTime(), f.getCombatTime()));
    }
    if(result.size() == 0)
    {
      _log.warning("Cant Find Any Fish!? - Lvl: " + lvl + " Type: " + type);
    }
View Full Code Here

Examples of l2p.gameserver.model.FishData

      player.sendMessage("Error: Fishes are not definied for lvl " + lvl + " type " + type + " group " + group + ", report admin please.");
      player.endFishing(false);
      return;
    }
    int check = Rnd.get(fishs.size());
    FishData fish = fishs.get(check);
    if(!GameTimeController.getInstance().isNowNight() && lure.isNightLure())
    {
      fish.setType(-1);
    }
    player.setImobilised(true);
    player.setFishing(true);
    player.setFish(fish);
    player.setLure(lure);
    player.broadcastUserInfo(true);
    player.broadcastPacket(new ExFishingStart(player, fish.getType(), player.getFishLoc(), lure.isNightLure()));
    player.sendPacket(Msg.STARTS_FISHING);
    player.startLookingForFishTask();
  }
View Full Code Here

Examples of net.sf.l2j.gameserver.model.FishData

    {
      con = L2DatabaseFactory.getInstance().getConnection();
      _fishsEasy = new FastList<FishData>();
      _fishsNormal = new FastList<FishData>();
      _fishsHard = new FastList<FishData>();
      FishData fish;
      PreparedStatement statement = con.prepareStatement("SELECT id, level, name, hp, hpregen, fish_type, fish_group, fish_guts, guts_check_time, wait_time, combat_time FROM fish ORDER BY id");
      ResultSet Fishes = statement.executeQuery();

        while (Fishes.next())
        {
          int id = Fishes.getInt("id");
          int lvl = Fishes.getInt("level");
          String name = Fishes.getString("name");
          int hp = Fishes.getInt("hp");
          int hpreg = Fishes.getInt("hpregen");
          int type = Fishes.getInt("fish_type");
          int group = Fishes.getInt("fish_group");
          int fish_guts = Fishes.getInt("fish_guts");
          int guts_check_time = Fishes.getInt("guts_check_time");
          int wait_time = Fishes.getInt("wait_time");
          int combat_time = Fishes.getInt("combat_time");
          fish = new FishData(id, lvl, name, hp, hpreg, type, group, fish_guts, guts_check_time, wait_time, combat_time);
          switch (fish.getGroup()) {
            case 0:
              _fishsEasy.add(fish);
              break;
            case 1:
              _fishsNormal.add(fish);
View Full Code Here

Examples of net.sf.l2j.gameserver.model.FishData

      EndFishing(false);
      return;
    }
    int check = Rnd.get(fishs.size());
    // Use a copy constructor else the fish data may be over-written below
    _fish = new FishData(fishs.get(check));
    fishs.clear();
    fishs = null;
    sendPacket(new SystemMessage(SystemMessageId.CAST_LINE_AND_START_FISHING));
    ExFishingStart efs = null;
    if (!GameTimeController.getInstance().isNowNight() && _lure.isNightLure())
View Full Code Here
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.