Package lineage2.gameserver.network.serverpackets

Examples of lineage2.gameserver.network.serverpackets.ExVitalityEffectInfo


  {
    List<L2GameServerPacket> list = new ArrayList<>();
    Player owner = getPlayer();
    if (owner == forPlayer)
    {
      list.add(new CharInfo(this));
    }
    else
    {
      Party party = forPlayer.getParty();
      if ((getReflection() == ReflectionManager.GIRAN_HARBOR) && ((owner == null) || (party == null) || (party != owner.getParty())))
      {
        return list;
      }
      list.add(new CharInfo(this));
      list.add(RelationChanged.update(forPlayer, this, forPlayer));
    }
    if (isInCombat())
    {
      list.add(new AutoAttackStart(getObjectId()));
View Full Code Here


        getInstance().getListenerEngine().onDay();
      }
      for (Player player : GameObjectsStorage.getAllPlayersForIterate())
      {
        player.checkDayNightMessages();
        player.sendPacket(new ClientSetTime());
      }
    }
View Full Code Here

  void changeAura(NpcInstance actor, int npcId)
  {
    if (npcId != actor.getDisplayId())
    {
      actor.setDisplayId(npcId);
      DeleteObject d = new DeleteObject(actor);
      L2GameServerPacket su = new StatusUpdate(actor).addAttribute(StatusUpdateField.CUR_HP, StatusUpdateField.MAX_HP);
      for (Player player : World.getAroundPlayers(actor))
      {
        player.sendPacket(d, new NpcInfo(actor, player));
        if (player.getTarget() == actor)
View Full Code Here

  public void onShutdown()
  {}
 
  public void broadcastPacket(int value, boolean b)
  {
    L2GameServerPacket trigger = new EventTrigger(value, b);
    for (Player player : GameObjectsStorage.getAllPlayersForIterate())
      player.sendPacket(trigger);

  }
View Full Code Here

  }
 
  public void broadcastSend(Castle castle)
  {
    L2GameServerPacket trigger = new ExCastleState(castle);
    for (Player player : GameObjectsStorage.getAllPlayersForIterate())
      player.sendPacket(trigger);

  }
View Full Code Here

      if (castle != null)
      { 
        if(_side.ordinal()==1 || _side.ordinal()==0)
        {
        ((Player) cha).sendPacket(new ExCastleState(castle));
        broadcastPacket(_side.ordinal(),true);
        broadcastSend(castle);
        Announcements.getInstance().announceToAll(new ExCastleState(castle));
        //broadcastPacket(_side.ordinal(),false);
        }
        else
        {
        ((Player) cha).sendPacket(new ExCastleState(castle));
        broadcastPacket(_side.ordinal(),true);
        broadcastSend(castle);
        Announcements.getInstance().announceToAll(new ExCastleState(castle));
        //broadcastPacket(_side.ordinal(),false);
        }
       
        //return;
      }
View Full Code Here

  @Override
  public void onPlayerEnter(Player player)
  {
    super.onPlayerEnter(player);
    player.sendPacket(new ExSendUIEvent(player, 0, 1, (int) (System.currentTimeMillis() - _savedTime) / 1000, 0, NpcString.NONE));
  }
View Full Code Here

  @Override
  public void onPlayerExit(Player player)
  {
    super.onPlayerExit(player);
    player.sendPacket(new ExSendUIEvent(player, 1, 1, 0, 0));
  }
View Full Code Here

          {
            spawnRoom(7);
            setReenterTime(System.currentTimeMillis());
            for(Player p : getPlayers())
            {
              p.sendPacket(new ExSendUIEvent(p, 1, 1, 0, 0));
              p.sendPacket(new SystemMessage(SystemMessage.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addNumber(5));
            }
            startCollapseTimer(5 * 60 * 1000L);
            timeSpent = (int) (System.currentTimeMillis() - _savedTime) / 1000;
          }
View Full Code Here

    activeChar.sendItemList(false);
    activeChar.sendPacket(new ShortCutInit(activeChar));
        activeChar.sendPacket(new ShortCutInit(activeChar), new SkillList(activeChar), new SkillCoolTime(activeChar));
    activeChar.sendPacket(new SkillCoolTime(activeChar));
    //activeChar.sendPacket(new ExCastleState(_castle));
        activeChar.sendPacket(new ExVitalityEffectInfo(activeChar));
    for(Castle castle : ResidenceHolder.getInstance().getResidenceList(Castle.class))
    {
      activeChar.sendPacket(new ExCastleState(castle));
    }
    activeChar.sendPacket(SystemMsg.WELCOME_TO_THE_WORLD_OF_LINEAGE_II);
    Announcements.getInstance().showAnnouncements(activeChar);
    if (first)
    {
      activeChar.getListeners().onEnter();
    }
    if (first && (activeChar.getCreateTime() > 0))
    {
      Calendar create = Calendar.getInstance();
      create.setTimeInMillis(activeChar.getCreateTime());
      Calendar now = Calendar.getInstance();
      int day = create.get(Calendar.DAY_OF_MONTH);
      if ((create.get(Calendar.MONTH) == Calendar.FEBRUARY) && (day == 29))
      {
        day = 28;
      }
      int myBirthdayReceiveYear = activeChar.getVarInt(Player.MY_BIRTHDAY_RECEIVE_YEAR, 0);
      if ((create.get(Calendar.MONTH) == now.get(Calendar.MONTH)) && (create.get(Calendar.DAY_OF_MONTH) == day))
      {
        if (((myBirthdayReceiveYear == 0) && (create.get(Calendar.YEAR) != now.get(Calendar.YEAR))) || ((myBirthdayReceiveYear > 0) && (myBirthdayReceiveYear != now.get(Calendar.YEAR))))
        {
          Mail mail = new Mail();
          mail.setSenderId(1);
          mail.setSenderName(StringHolder.getInstance().getNotNull(activeChar, "birthday.npc"));
          mail.setReceiverId(activeChar.getObjectId());
          mail.setReceiverName(activeChar.getName());
          mail.setTopic(StringHolder.getInstance().getNotNull(activeChar, "birthday.title"));
          mail.setBody(StringHolder.getInstance().getNotNull(activeChar, "birthday.text"));
          ItemInstance item = ItemFunctions.createItem(21169);
          item.setLocation(ItemInstance.ItemLocation.MAIL);
          item.setCount(1L);
          item.save();
          mail.addAttachment(item);
          mail.setUnread(true);
          mail.setType(Mail.SenderType.BIRTHDAY);
          mail.setExpireTime((720 * 3600) + (int) (System.currentTimeMillis() / 1000L));
          mail.save();
          activeChar.setVar(Player.MY_BIRTHDAY_RECEIVE_YEAR, String.valueOf(now.get(Calendar.YEAR)), -1);
        }
      }
    }
    if (activeChar.getClan() != null)
    {
      notifyClanMembers(activeChar);
      activeChar.sendPacket(activeChar.getClan().listAll());
      activeChar.sendPacket(new PledgeShowInfoUpdate(activeChar.getClan()), new PledgeSkillList(activeChar.getClan()));
    }
    if (first && Config.ALLOW_WEDDING)
    {
      CoupleManager.getInstance().engage(activeChar);
      CoupleManager.getInstance().notifyPartner(activeChar);
    }
    if (first)
    {
      activeChar.getFriendList().notifyFriends(true);
      loadTutorial(activeChar);
      activeChar.restoreDisableSkills();
      activeChar.mentoringLoginConditions();
    }
    sendPacket(new L2FriendList(activeChar), new ExStorageMaxCount(activeChar), new QuestList(activeChar), new ExBasicActionList(activeChar), new EtcStatusUpdate(activeChar));
    activeChar.checkHpMessages(activeChar.getMaxHp(), activeChar.getCurrentHp());
    activeChar.checkDayNightMessages();
    if (Config.PETITIONING_ALLOWED)
    {
      PetitionManager.getInstance().checkPetitionMessages(activeChar);
    }
    if (!first)
    {
      if (activeChar.isCastingNow())
      {
        Creature castingTarget = activeChar.getCastingTarget();
        Skill castingSkill = activeChar.getCastingSkill();
        long animationEndTime = activeChar.getAnimationEndTime();
        if ((castingSkill != null) && (castingTarget != null) && castingTarget.isCreature() && (activeChar.getAnimationEndTime() > 0))
        {
          sendPacket(new MagicSkillUse(activeChar, castingTarget, castingSkill.getId(), castingSkill.getLevel(), (int) (animationEndTime - System.currentTimeMillis()), 0));
        }
      }
      if (activeChar.isInBoat())
      {
        activeChar.sendPacket(activeChar.getBoat().getOnPacket(activeChar, activeChar.getInBoatPosition()));
      }
      if (activeChar.isMoving || activeChar.isFollow)
      {
        sendPacket(activeChar.movePacket());
      }
      if (activeChar.getMountNpcId() != 0)
      {
        sendPacket(new Ride(activeChar));
      }
      if (activeChar.isFishing())
      {
        activeChar.stopFishing();
      }
    }
    activeChar.entering = false;
    activeChar.sendUserInfo();
    if (activeChar.isSitting())
    {
      activeChar.sendPacket(new ChangeWaitType(activeChar, ChangeWaitType.WT_SITTING));
    }
    if (activeChar.getPrivateStoreType() != Player.STORE_PRIVATE_NONE)
    {
      if (activeChar.getPrivateStoreType() == Player.STORE_PRIVATE_BUY)
      {
        sendPacket(new PrivateStoreMsgBuy(activeChar));
      }
      else if ((activeChar.getPrivateStoreType() == Player.STORE_PRIVATE_SELL) || (activeChar.getPrivateStoreType() == Player.STORE_PRIVATE_SELL_PACKAGE))
      {
        sendPacket(new PrivateStoreMsgSell(activeChar));
      }
      else if (activeChar.getPrivateStoreType() == Player.STORE_PRIVATE_MANUFACTURE)
      {
        sendPacket(new RecipeShopMsg(activeChar));
      }
    }
    if (activeChar.isDead())
    {
      sendPacket(new Die(activeChar));
    }
    activeChar.unsetVar("offline");
    activeChar.sendActionFailed();
    if (first && activeChar.isGM() && Config.SAVE_GM_EFFECTS && activeChar.getPlayerAccess().CanUseGMCommand)
    {
      if (activeChar.getVarB("gm_silence"))
      {
        activeChar.setMessageRefusal(true);
        activeChar.sendPacket(SystemMsg.MESSAGE_REFUSAL_MODE);
      }
      if (activeChar.getVarB("gm_invul"))
      {
        activeChar.setIsInvul(true);
        activeChar.startAbnormalEffect(AbnormalEffect.S_INVINCIBLE);
        activeChar.sendMessage(activeChar.getName() + " is now immortal.");
      }
      try
      {
        int var_gmspeed = Integer.parseInt(activeChar.getVar("gm_gmspeed"));
        if ((var_gmspeed >= 1) && (var_gmspeed <= 4))
        {
          activeChar.doCast(SkillTable.getInstance().getInfo(7029, var_gmspeed), activeChar, true);
        }
      }
      catch (Exception E)
      {
      }
    }
    PlayerMessageStack.getInstance().CheckMessages(activeChar);
    sendPacket(ClientSetTime.STATIC, new ExSetCompassZoneCode(activeChar));
    Pair<Integer, OnAnswerListener> entry = activeChar.getAskListener(false);
    if ((entry != null) && (entry.getValue() instanceof ReviveAnswerListener))
    {
      sendPacket(new ConfirmDlg(SystemMsg.C1_IS_MAKING_AN_ATTEMPT_TO_RESURRECT_YOU_IF_YOU_CHOOSE_THIS_PATH_S2_EXPERIENCE_WILL_BE_RETURNED_FOR_YOU, 0).addString("Other player").addString("some"));
    }
    if (activeChar.isCursedWeaponEquipped())
    {
      CursedWeaponsManager.getInstance().showUsageTime(activeChar, activeChar.getCursedWeaponEquippedId());
    }
    if (!first)
    {
      if (activeChar.isInObserverMode())
      {
        if (activeChar.getObserverMode() == Player.OBSERVER_LEAVING)
        {
          activeChar.returnFromObserverMode();
        }
        else if (activeChar.getOlympiadObserveGame() != null)
        {
          activeChar.leaveOlympiadObserverMode(true);
        }
        else
        {
          activeChar.leaveObserverMode();
        }
      }
      else if (activeChar.isVisible())
      {
        World.showObjectsToPlayer(activeChar);
      }
      for (Summon summon : activeChar.getSummonList())
      {
        sendPacket(new PetInfo(summon));
      }
      if (activeChar.isInParty())
      {
        sendPacket(new PartySmallWindowAll(activeChar.getParty(), activeChar));
        for (Player member : activeChar.getParty().getPartyMembers())
        {
          if (member != activeChar)
          {
            sendPacket(new PartySpelled(member, true));
            for (Summon memberPet : member.getSummonList())
            {
              sendPacket(new PartySpelled(memberPet, true));
            }
            sendPacket(RelationChanged.update(activeChar, member, activeChar));
          }
        }
        if (activeChar.getParty().isInCommandChannel())
        {
          sendPacket(ExMPCCOpen.STATIC);
        }
      }
      for (int shotId : activeChar.getAutoSoulShot())
      {
        sendPacket(new ExAutoSoulShot(shotId, true));
      }
      for (Effect e : activeChar.getEffectList().getAllFirstEffects())
      {
        if (e.getSkill().isToggle())
        {
          sendPacket(new MagicSkillLaunched(activeChar.getObjectId(), e.getSkill().getId(), e.getSkill().getLevel(), activeChar));
        }
      }
      activeChar.broadcastCharInfo();
    }
    else
    {
      activeChar.sendUserInfo();
    }
    activeChar.updateEffectIcons();
    activeChar.setCurrentHpMp(activeChar.getActiveSubClass().getlogOnHp(),activeChar.getActiveSubClass().getlogOnMp());
    activeChar.setCurrentCp(activeChar.getActiveSubClass().getlogOnCp());
    activeChar.updateStats();   
    if (Config.ALT_PCBANG_POINTS_ENABLED)
    {
      activeChar.sendPacket(new ExPCCafePointInfo(activeChar, 0, 1, 2, 12));
    }
    if (!activeChar.getPremiumItemList().isEmpty())
    {
      activeChar.sendPacket(Config.GOODS_INVENTORY_ENABLED ? ExGoodsInventoryChangedNotify.STATIC : ExNotifyPremiumItem.STATIC);
    }
    if (activeChar.getVarB("HeroPeriod") && Config.SERVICES_HERO_SELL_ENABLED)
    {
      activeChar.setHero(activeChar);
    }
    activeChar.sendVoteSystemInfo();
    activeChar.sendPacket(new ExReceiveShowPostFriend(activeChar));
    activeChar.sendPacket(new ExSubjobInfo(activeChar.getPlayer(), false));
    activeChar.sendPacket(new ExVitalityEffectInfo(activeChar));
    activeChar.sendPacket(new ExTutorialList());
    activeChar.sendPacket(new ExWaitWaitingSubStituteInfo(true));
    for (Effect effect : activeChar.getEffectList().getAllEffects())
    {
      if (effect.isInUse())
View Full Code Here

TOP

Related Classes of lineage2.gameserver.network.serverpackets.ExVitalityEffectInfo

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.