Ejemplo n.º 1
0
  public void setPlayerInstance(L2PcInstance player) {
    if (player == null && _player != null) {
      // this is here to keep the data when the player logs off
      _name = _player.getName();
      _level = _player.getLevel();
      _classId = _player.getBaseClassId();
      _objectId = _player.getObjectId();
      _powerGrade = _player.getPowerGrade();
      _pledgeType = _player.getPledgeType();
      _title = _player.getTitle();
      _apprentice = _player.getApprentice();
      _sponsor = _player.getSponsor();
      _sex = _player.getAppearance().getSex();
      _raceOrdinal = _player.getRace().ordinal();
    }

    if (player != null) {
      _clan.addSkillEffects(player);
      if (_clan.getLevel() > 3 && player.isClanLeader()) {
        CastleSiegeManager.getInstance().addSiegeSkills(player);
      }
      if (player.isClanLeader()) {
        _clan.setLeader(this);
      }
    }

    _player = player;
  }
Ejemplo n.º 2
0
 public L2ClanMember(L2Clan clan, L2PcInstance player) {
   _clan = clan;
   _name = player.getName();
   _level = player.getLevel();
   _classId = player.getBaseClassId();
   _objectId = player.getObjectId();
   _pledgeType = player.getPledgeType();
   _powerGrade = player.getPowerGrade();
   _title = player.getTitle();
   _sponsor = 0;
   _apprentice = 0;
   _sex = player.getAppearance().getSex();
   _raceOrdinal = player.getRace().ordinal();
 }
Ejemplo n.º 3
0
 public L2ClanMember(L2PcInstance player) {
   if (player.getClan() == null) {
     throw new IllegalArgumentException("Can not create a ClanMember if player has a null clan.");
   }
   _clan = player.getClan();
   _player = player;
   _name = _player.getName();
   _level = _player.getLevel();
   _classId = _player.getBaseClassId();
   _objectId = _player.getObjectId();
   _powerGrade = _player.getPowerGrade();
   _pledgeType = _player.getPledgeType();
   _title = _player.getTitle();
   _apprentice = 0;
   _sponsor = 0;
   _sex = _player.getAppearance().getSex();
   _raceOrdinal = _player.getRace().ordinal();
 }