Package l2p.gameserver.modules.community.buffer

Examples of l2p.gameserver.modules.community.buffer.OneScheme


              player.sendMessage("Схема с таким именем уже существует.");
              return;
            }
          }
        }
        player.schemes.add(new OneScheme(name));
        player.setVar("Buf_" + name, "");
      }
      catch(Exception e)
      {
        player.sendMessage("Введите имя схемы.");
      }
      Community.getInstance().show(objectId, showBuffer(objectId, null));
    }
    else if(command.startsWith("_bbsbaffer_select_scheme"))
    {
      StringTokenizer st = new StringTokenizer(command, " ");
      st.nextToken();
      Community.getInstance().show(objectId, showBuffer(objectId, st.nextToken()));
    }
    else if(command.startsWith("_bbsbaffer_edit_scheme"))
    {
      StringTokenizer st = new StringTokenizer(command, " ");
      st.nextToken();
      String name = st.nextToken();
      int page = Integer.parseInt(st.nextToken());
      boolean add = Boolean.parseBoolean(st.nextToken());
      boolean del = Boolean.parseBoolean(st.nextToken());
      boolean run = Boolean.parseBoolean(st.nextToken());
      Community.getInstance().show(objectId, editScheme(objectId, page, player.getOneSchemeByName(name), add, del, run));
    }
    else if(command.startsWith("_bbsbaffer_del_scheme"))
    {
      StringTokenizer st = new StringTokenizer(command, " ");
      st.nextToken();
      String name = st.nextToken();
      for(OneScheme oneScheme : player.schemes)
      {
        if(oneScheme.getName().equals(name))
        {
          player.schemes.remove(oneScheme);
          player.unsetVar("Buf_" + name);
          break;
        }
      }
      Community.getInstance().show(objectId, showBuffer(objectId, null));
    }
    else if(command.startsWith("_bbsbaffer_buff_scheme"))
    {
      StringTokenizer st = new StringTokenizer(command, " ");
      st.nextToken();
      String name = st.nextToken();
      String type = st.nextToken();
      if(player.getOneSchemeByName(name).buffs.isEmpty())
      {
        return;
      }
      for(Buff buff : player.getOneSchemeByName(name).buffs)
      {
        if(buff != null)
        {
          if(type.equals("Player"))
          {
            if(mOption.price(player, Integer.parseInt(priceOneBuffScheme[0]), Integer.parseInt(priceOneBuffScheme[1])))
            {
              buff(buff.getId(), buff.getLevel(), objectId, false);
            }
          }
          else if(type.equals("Pet") && player.getPet() != null)
          {
            if(mOption.price(player, Integer.parseInt(priceOneBuffScheme[0]), Integer.parseInt(priceOneBuffScheme[1])))
            {
              buff(buff.getId(), buff.getLevel(), objectId, true);
            }
          }
        }
      }
    }
    else if(command.startsWith("_bbsbaffer_adddelrun_buff_scheme"))
    {
      StringTokenizer st = new StringTokenizer(command, " ");
      st.nextToken();
      String name = st.nextToken();
      int id = Integer.parseInt(st.nextToken());
      int page = Integer.parseInt(st.nextToken());
      boolean add = Boolean.parseBoolean(st.nextToken());
      boolean del = Boolean.parseBoolean(st.nextToken());
      boolean run = Boolean.parseBoolean(st.nextToken());
      OneScheme oneScheme = name.equalsIgnoreCase("Normal") ? null : player.getOneSchemeByName(name);
      if(oneScheme != null)
      {
        if(add)
        {
          if(oneScheme.buffs.size() < buffer_max_buffs)
View Full Code Here


      while(rs.next())
      {
        String name = rs.getString("name");
        if(name.contains("Buf_"))
        {
          OneScheme oneScheme = new OneScheme(name.substring(4));
          String value = rs.getString("value");
          if(!value.equals(""))
          {
            String[] buffs = value.split(",");
            for(int i = 0; i < buffs.length; i += 2)
View Full Code Here

TOP

Related Classes of l2p.gameserver.modules.community.buffer.OneScheme

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.