Package l2p.gameserver.serverpackets

Examples of l2p.gameserver.serverpackets.PledgeShowInfoUpdate


        }
        if(level == 5)
        {
          player.sendPacket(Msg.NOW_THAT_YOUR_CLAN_LEVEL_IS_ABOVE_LEVEL_5_IT_CAN_ACCUMULATE_CLAN_REPUTATION_POINTS);
        }
        PledgeShowInfoUpdate pu = new PledgeShowInfoUpdate(clan);
        PledgeStatusChanged ps = new PledgeStatusChanged(clan);
        for(L2Player member : clan.getOnlineMembers(0))
        {
          member.updatePledgeClass();
          member.sendPacket(Msg.CLANS_SKILL_LEVEL_HAS_INCREASED, pu, ps);
View Full Code Here


        {
          String pledgeName = st.nextToken();
          L2Clan clan = ClanTable.getInstance().createClan(target, pledgeName);
          if(clan != null)
          {
            target.sendPacket(new PledgeShowInfoUpdate(clan));
            target.sendUserInfo(true);
            target.sendPacket(Msg.CLAN_HAS_BEEN_CREATED);
            return true;
          }
        }
        catch(Exception e)
        {
        }
      }
      else if(action.equals("dismiss"))
      {
        if(target.getClan() == null)
        {
          activeChar.sendPacket(Msg.INVALID_TARGET);
          return false;
        }
        SiegeManager.removeSiegeSkills(target);
        for(L2Player clanMember : target.getClan().getOnlineMembers(0))
        {
          clanMember.setClan(null);
          clanMember.setTitle(null);
          clanMember.sendPacket(Msg.CLAN_HAS_DISPERSED);
          clanMember.broadcastUserInfo(true);
        }
        ThreadConnection con = null;
        FiltredPreparedStatement statement = null;
        try
        {
          con = L2DatabaseFactory.getInstance().getConnection();
          statement = con.prepareStatement("UPDATE characters SET clanid = 0 WHERE clanid=?");
          statement.setInt(1, target.getClanId());
          statement.execute();
          DatabaseUtils.closeStatement(statement);
          statement = con.prepareStatement("DELETE FROM clan_data WHERE clan_id=?");
          statement.setInt(1, target.getClanId());
          statement.execute();
          DatabaseUtils.closeStatement(statement);
          statement = null;
          target.sendPacket(Msg.CLAN_HAS_DISPERSED);
          target.broadcastUserInfo(true);
        }
        catch(Exception e)
        {
        }
        finally
        {
          DatabaseUtils.closeDatabaseCS(con, statement);
        }
        return true;
      }
      else if(action.equals("setlevel"))
      {
        if(target.getClan() == null)
        {
          activeChar.sendPacket(Msg.INVALID_TARGET);
          return false;
        }
        try
        {
          byte level = Byte.parseByte(st.nextToken());
          L2Clan clan = target.getClan();
          activeChar.sendMessage("You set level " + level + " for clan " + clan.getName());
          clan.setLevel(level);
          clan.updateClanInDB();
          if(level < CastleSiegeManager.getSiegeClanMinLevel())
          {
            SiegeManager.removeSiegeSkills(target);
          }
          else
          {
            SiegeManager.addSiegeSkills(target);
          }
          if(level == 5)
          {
            target.sendPacket(Msg.NOW_THAT_YOUR_CLAN_LEVEL_IS_ABOVE_LEVEL_5_IT_CAN_ACCUMULATE_CLAN_REPUTATION_POINTS);
          }
          PledgeShowInfoUpdate pu = new PledgeShowInfoUpdate(clan);
          PledgeStatusChanged ps = new PledgeStatusChanged(clan);
          for(L2Player member : clan.getOnlineMembers(0))
          {
            member.updatePledgeClass();
            member.sendPacket(Msg.CLANS_SKILL_LEVEL_HAS_INCREASED, pu, ps);
View Full Code Here

      }
      if(playerItemCount >= itemCount)
      {
        player.getInventory().destroyItemByItemId(itemId, itemCount, true);
        player.getClan().incReputation(reputation, false, "ClanTrader " + itemId + " from " + player.getName());
        player.getClan().broadcastToOnlineMembers(new PledgeShowInfoUpdate(player.getClan()));
        player.sendPacket(new SystemMessage(SystemMessage.YOUR_CLAN_HAS_ADDED_1S_POINTS_TO_ITS_CLAN_REPUTATION_SCORE).addNumber(reputation));
        html.setFile("data/html/default/" + getNpcId() + "-ExchangeSuccess.htm");
      }
      else
      {
View Full Code Here

          {
            L2Clan clan = ClanTable.getInstance().getClan(clanId);
            if(clan != null)
            {
              clan.incReputation(100, true, "SevenSignsFestival");
              clan.broadcastToOnlineMembers(new PledgeShowInfoUpdate(clan));
              SystemMessage sm = new SystemMessage(SystemMessage.CLAN_MEMBER_S1_WAS_AN_ACTIVE_MEMBER_OF_THE_HIGHEST_RANKED_PARTY_IN_THE_FESTIVAL_OF_DARKNESS_S2_POINTS_HAVE_BEEN_ADDED_TO_YOUR_CLAN_REPUTATION_SCORE);
              sm.addString(rset.getString("char_name"));
              sm.addNumber(100);
              clan.broadcastToOnlineMembers(sm);
            }
View Full Code Here

      packets.clear();
    }
    if(activeChar.getClan() != null)
    {
      notifyClanMembers(activeChar);
      sendPacket(new PledgeShowMemberListAll(activeChar.getClan(), activeChar), new PledgeShowInfoUpdate(activeChar.getClan()), new PledgeSkillList(activeChar.getClan()));
      if(activeChar.getClan().isAttacker())
      {
        activeChar.setSiegeState(1);
      }
      else if(activeChar.getClan().isDefender())
View Full Code Here

      {
        if(updateList)
        {
          member.getPlayer().sendPacket(Msg.PledgeShowMemberListDeleteAll, new PledgeShowMemberListAll(this, member.getPlayer()));
        }
        member.getPlayer().sendPacket(new PledgeShowInfoUpdate(this));
        if(needUserInfo)
        {
          member.getPlayer().broadcastUserInfo(true);
        }
        if(relation)
View Full Code Here

      }
    }
    if(_reputation != rep)
    {
      _reputation = rep;
      broadcastToOnlineMembers(new PledgeShowInfoUpdate(this));
    }
    updateClanInDB();
  }
View Full Code Here

        {
          activeChar.setLvlJoinedAcademy(activeChar.getLevel());
        }
        clan.getClanMember(activeChar.getName()).setPowerGrade(clan.getAffiliationRank(activeChar.getPledgeType()));
        clan.broadcastToOtherOnlineMembers(new PledgeShowMemberListAdd(clan.getClanMember(activeChar.getName())), activeChar);
        clan.broadcastToOnlineMembers(new SystemMessage(SystemMessage.S1_HAS_JOINED_THE_CLAN).addString(activeChar.getName()), new PledgeShowInfoUpdate(clan));
        // this activates the clan tab on the new member
        activeChar.sendPacket(Msg.ENTERED_THE_CLAN, new PledgeShowMemberListAll(clan, activeChar));
        activeChar.setLeaveClanTime(0);
        activeChar.updatePledgeClass();
        clan.addAndShowSkillsToPlayer(activeChar);
View Full Code Here

      // clan name is already taken
      player.sendPacket(Msg.THIS_NAME_ALREADY_EXISTS);
      return;
    }
    // should be update packet only
    player.sendPacket(new PledgeShowInfoUpdate(clan), new PledgeShowMemberListAll(clan, player), Msg.CLAN_HAS_BEEN_CREATED);
    player.updatePledgeClass();
    player.broadcastUserInfo(true);
  }
View Full Code Here

      if(clan.getLevel() == 5)
      {
        player.sendPacket(Msg.NOW_THAT_YOUR_CLAN_LEVEL_IS_ABOVE_LEVEL_5_IT_CAN_ACCUMULATE_CLAN_REPUTATION_POINTS);
      }
      // notify all the members about it
      PledgeShowInfoUpdate pu = new PledgeShowInfoUpdate(clan);
      PledgeStatusChanged ps = new PledgeStatusChanged(clan);
      for(L2ClanMember mbr : clan.getMembers())
      {
        if(mbr.isOnline())
        {
View Full Code Here

TOP

Related Classes of l2p.gameserver.serverpackets.PledgeShowInfoUpdate

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.