Package lineage2.gameserver.templates.player

Examples of lineage2.gameserver.templates.player.PlayerTemplate


   * @param client GameClient
   * @param newChar Player
   */
  private void initNewChar(GameClient client, Player newChar)
  {
    PlayerTemplate template = newChar.getTemplate();
    newChar.getSubClassList().restore();
    if (Config.STARTING_ADENA > 0)
    {
      newChar.addAdena(Config.STARTING_ADENA);
    }
    newChar.setLoc(template.getStartLocation());
    if (Config.CHAR_TITLE)
    {
      newChar.setTitle(Config.ADD_CHAR_TITLE);
    }
    else
    {
      newChar.setTitle("");
    }
    for (StartItem i : template.getStartItems())
    {
      ItemInstance item = ItemFunctions.createItem(i.getItemId());
      long count = i.getCount();
      if (item.isStackable())
      {
View Full Code Here


              }
            }
          }
        }
      }
      PlayerTemplate template = new PlayerTemplate(stats_set, race, sex, min_attr, max_attr, base_attr, arm_defence, jewl_defence, start_locations, start_items, lvl_up_data);
      getHolder().addPlayerTemplate(race, classtype, sex, template);
    }
  }
View Full Code Here

    writeC(0x0d);
    writeD(_chars.size());

    for (ClassId temp : _chars)
    {
      PlayerTemplate template = PlayerTemplateHolder.getInstance().getPlayerTemplate(temp.getRace(), temp, Sex.MALE);
      writeD(temp.getRace().ordinal());
      writeD(temp.getId());
      writeD(0x46);
      writeD(template.getBaseAttr().getSTR());
      writeD(0x0a);
      writeD(0x46);
      writeD(template.getBaseAttr().getDEX());
      writeD(0x0a);
      writeD(0x46);
      writeD(template.getBaseAttr().getCON());
      writeD(0x0a);
      writeD(0x46);
      writeD(template.getBaseAttr().getINT());
      writeD(0x0a);
      writeD(0x46);
      writeD(template.getBaseAttr().getWIT());
      writeD(0x0a);
      writeD(0x46);
      writeD(template.getBaseAttr().getMEN());
      writeD(0x0a);
    }
  }
View Full Code Here

      storeCharSubClasses();
      broadcastCharInfo();
    }
    if ((oldClassId == null) || !oldClassId.isOfRace(getClassId().getRace()) || !oldClassId.isOfType(getClassId().getType()))
    {
      PlayerTemplate t = PlayerTemplateHolder.getInstance().getPlayerTemplate(getRace(), classId, Sex.VALUES[getSex()]);
      if (t == null)
      {
        _log.error("Missing template for classId: " + id);
        return;
      }
View Full Code Here

   * @return Player
   */
  public static Player create(int classId, int sex, String accountName, final String name, final int hairStyle, final int hairColor, final int face)
  {
    ClassId class_id = ClassId.VALUES[classId];
    PlayerTemplate template = PlayerTemplateHolder.getInstance().getPlayerTemplate(class_id.getRace(), class_id, Sex.VALUES[sex]);
    Player player = new Player(IdFactory.getInstance().getNextId(), template, accountName);
    player.setName(name);
    player.setTitle("");
    player.setHairStyle(hairStyle);
    player.setHairColor(hairColor);
View Full Code Here

      rset2 = statement2.executeQuery("SELECT `class_id`, `default_class_id` FROM `character_subclasses` WHERE `char_obj_id`=" + objectId + " AND `type`=" + SubClassType.BASE_CLASS.ordinal() + " LIMIT 1");
      if (rset.next() && rset2.next())
      {
        final ClassId classId = ClassId.VALUES[rset2.getInt("class_id")];
        final ClassId defaultClassId = ClassId.VALUES[rset2.getInt("default_class_id")];
        final PlayerTemplate template = PlayerTemplateHolder.getInstance().getPlayerTemplate(defaultClassId.getRace(), classId, Sex.VALUES[rset.getInt("sex")]);
        player = new Player(objectId, template);
        player.loadVariables();
        player.loadInstanceReuses();
        player.loadPremiumItemList();
        player.bookmarks.setCapacity(rset.getInt("bookmarks"));
View Full Code Here

      {
        player.sendPacket(Msg.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
        return;
      }
    }
    final Location pos = Location.findPointToStay(x, y, z, 50, 100, player.getGeoIndex());
    if (price > 0)
    {
      player.reduceAdena(price, true);
    }
    player.teleToLocation(pos);
View Full Code Here

      player.sendPacket(SystemMessage2.removeItems(item, count));
    }
    final int x = Integer.parseInt(param[0]);
    final int y = Integer.parseInt(param[1]);
    final int z = Integer.parseInt(param[2]);
    final Location pos = Location.findPointToStay(x, y, z, 20, 70, player.getGeoIndex());
    player.teleToLocation(pos);
  }
View Full Code Here

      return;
    }
    final String var = player.getVar("DCBackCoords");
    if ((var == null) || var.isEmpty())
    {
      player.teleToLocation(new Location(43768, -48232, -800), 0);
      return;
    }
    player.teleToLocation(Location.parseLoc(var), 0);
    player.unsetVar("DCBackCoords");
  }
View Full Code Here

    }
    for (Player player : World.getAroundPlayers(actor, 200, 200))
    {
      if (player != null)
      {
        player.teleToLocation(new Location(207559, 86429, -1000));
      }
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.templates.player.PlayerTemplate

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.