Package lineage2.gameserver.network.serverpackets

Examples of lineage2.gameserver.network.serverpackets.SystemMessage


    if (equipped)
    {
      activeChar.getInventory().equipItem(targetItem);
    }
    InventoryUpdate iu = new InventoryUpdate().addModifiedItem(targetItem);
    SystemMessage sm = new SystemMessage(SystemMessage.AUGMENTATION_HAS_BEEN_SUCCESSFULLY_REMOVED_FROM_YOUR_S1);
    sm.addItemName(targetItem.getItemId());
    activeChar.sendPacket(new ExVariationCancelResult(1), iu, sm);
    for (ShortCut sc : activeChar.getAllShortCuts())
    {
      if ((sc.getId() == targetItem.getObjectId()) && (sc.getType() == ShortCut.TYPE_ITEM))
      {
View Full Code Here


          target.sendPacket(SystemMsg.YOUR_SHIELD_DEFENSE_HAS_SUCCEEDED);
        }
      }
      if ((info.damage > 1) && !skill.hasEffects() && Rnd.chance(target.calcStat(Stats.PSKILL_EVASION, 0, attacker, skill)))
      {
        attacker.sendPacket(new SystemMessage(SystemMessage.C1S_ATTACK_WENT_ASTRAY).addName(attacker));
        target.sendPacket(new SystemMessage(SystemMessage.C1_HAS_EVADED_C2S_ATTACK).addName(target).addName(attacker));
        info.damage = 0;
      }
      if ((info.damage > 1) && skill.isDeathlink())
      {
        info.damage *= 1.8 * (1.0 - attacker.getCurrentHpRatio());
      }
      if (onCrit && !calcBlow(attacker, target, skill))
      {
        info.miss = true;
        info.damage = 0;
        attacker.sendPacket(new SystemMessage(SystemMessage.C1S_ATTACK_WENT_ASTRAY).addName(attacker));
      }
      if (blow)
      {
        if (Rnd.chance(info.lethal1))
        {
View Full Code Here

    {
      if (Rnd.chance(5))
      {
        info.damage = 0;
        target.sendPacket(SystemMsg.YOUR_EXCELLENT_SHIELD_DEFENSE_WAS_A_SUCCESS);
        attacker.sendPacket(new SystemMessage(SystemMessage.C1_RESISTED_C2S_MAGIC).addName(target).addName(attacker));
      }
      else
      {
        target.sendPacket(SystemMsg.YOUR_SHIELD_DEFENSE_HAS_SUCCEEDED);
        attacker.sendPacket(new SystemMessage(SystemMessage.YOUR_OPPONENT_HAS_RESISTANCE_TO_MAGIC_THE_DAMAGE_WAS_DECREASED));
      }
    }
    int levelDiff = target.getLevel() - attacker.getLevel();
    if ((info.damage > 1) && skill.isDeathlink())
    {
      info.damage *= 1.8 * (1.0 - attacker.getCurrentHpRatio());
    }
    if ((info.damage > 1) && skill.isBasedOnTargetDebuff())
    {
      info.damage *= 1 + (0.05 * target.getEffectList().getAllEffects().size());
    }
    info.damage += info.lethal_dmg;
    if (skill.getSkillType() == SkillType.MANADAM)
    {
      info.damage = Math.max(1, info.damage / 4.);
    }
    if (isPvP && (info.damage > 1))
    {
      info.damage *= attacker.calcStat(Stats.PVP_MAGIC_SKILL_DMG_BONUS, 1, null, null);
      info.damage /= target.calcStat(Stats.PVP_MAGIC_SKILL_DEFENCE_BONUS, 1, null, null);
    }
    double magic_rcpt = target.calcStat(Stats.MAGIC_RESIST, attacker, skill) - attacker.calcStat(Stats.MAGIC_POWER, target, skill);
    double failChance = 4. * Math.max(1., levelDiff) * (1. + (magic_rcpt / 100.));
    if (Rnd.chance(failChance))
    {
      if (levelDiff > 9)
      {
        info.damage = 0;
        SystemMessage msg = new SystemMessage(SystemMessage.C1_RESISTED_C2S_MAGIC).addName(target).addName(attacker);
        attacker.sendPacket(msg);
        target.sendPacket(msg);
      }
      else
      {
        info.damage /= 2;
        SystemMessage msg = new SystemMessage(SystemMessage.DAMAGE_IS_DECREASED_BECAUSE_C1_RESISTED_AGAINST_C2S_MAGIC).addName(target).addName(attacker);
        attacker.sendPacket(msg);
        target.sendPacket(msg);
      }
    }
    if ((info.damage > 1) && skill.isMagic() && calcMagicMiss(attacker,target))
    {
      attacker.sendPacket(new SystemMessage(SystemMessage.C1S_ATTACK_WENT_ASTRAY).addName(attacker));
      target.sendPacket(new SystemMessage(SystemMessage.C1_HAS_EVADED_C2S_ATTACK).addName(target).addName(attacker));
      info.damage = 0;
    }
    if (info.damage > 0)
    {
      attacker.displayGiveDamageMessage(target, (int) info.damage, info.crit, false, false, true);
View Full Code Here

    addZoneStats(actor);
    if (actor.isPlayer())
    {
      if (getEnteringMessageId() != 0)
      {
        actor.sendPacket(new SystemMessage(getEnteringMessageId()));
      }
      if (getTemplate().getEventId() != 0)
      {
        actor.sendPacket(new EventTrigger(getTemplate().getEventId(), true));
      }
View Full Code Here

    removeZoneStats(actor);
    if (actor.isPlayer())
    {
      if ((getLeavingMessageId() != 0) && actor.isPlayer())
      {
        actor.sendPacket(new SystemMessage(getLeavingMessageId()));
      }
      if ((getTemplate().getEventId() != 0) && actor.isPlayer())
      {
        actor.sendPacket(new EventTrigger(getTemplate().getEventId(), false));
      }
View Full Code Here

  /**
   * Method setNewOlympiadEnd.
   */
  public static synchronized void setNewOlympiadEnd()
  {
    Announcements.getInstance().announceToAll(new SystemMessage(SystemMessage.OLYMPIAD_PERIOD_S1_HAS_STARTED).addNumber(Olympiad._currentCycle));
    Calendar currentTime = Calendar.getInstance();
    currentTime.set(Calendar.DAY_OF_MONTH, 1);
    currentTime.add(Calendar.MONTH, 1);
    currentTime.set(Calendar.HOUR_OF_DAY, 00);
    currentTime.set(Calendar.MINUTE, 00);
View Full Code Here

      if (hp > 0)
      {
        cha.reduceCurrentHp(hp, 0, cha, null, false, false, true, false, false, false, true);
        if (message > 0)
        {
          cha.sendPacket(new SystemMessage(message).addNumber(hp));
        }
      }
      if (mp > 0)
      {
        cha.reduceCurrentMp(mp, null);
        if (message > 0)
        {
          cha.sendPacket(new SystemMessage(message).addNumber(mp));
        }
      }
      next();
    }
View Full Code Here

      if (player == null)
      {
        return;
      }
      int hoursInGame = player.getHoursInGame();
      player.sendPacket(new SystemMessage(SystemMessage.YOU_HAVE_BEEN_PLAYING_FOR_AN_EXTENDED_PERIOD_OF_TIME_PLEASE_CONSIDER_TAKING_A_BREAK).addNumber(hoursInGame));
      player.sendPacket(new SystemMessage(SystemMessage.YOU_OBTAINED_S1_RECOMMENDS).addNumber(player.addRecomLeft()));
    }
View Full Code Here

    player.updatePledgeClass();
    player.broadcastPacket(new SocialAction(player.getObjectId(), SocialAction.GIVE_HERO));
    if ((player.getClan() != null) && (player.getClan().getLevel() >= 5))
    {
      player.getClan().incReputation(5000, true, "Hero:activateHero:" + player);
      player.getClan().broadcastToOtherOnlineMembers(new SystemMessage(SystemMessage.CLAN_MEMBER_S1_WAS_NAMED_A_HERO_2S_POINTS_HAVE_BEEN_ADDED_TO_YOUR_CLAN_REPUTATION_SCORE).addString(player.getName()).addNumber(Math.round(5000 * Config.RATE_CLAN_REP_SCORE)), player);
    }
    player.broadcastUserInfo();
    updateHeroes(player.getObjectId());
  }
View Full Code Here

    {
      if (clan.getUnitMembersSize(_targetUnit) >= clan.getSubPledgeLimit(_targetUnit))
      {
        if (_targetUnit == Clan.SUBUNIT_MAIN_CLAN)
        {
          activeChar.sendPacket(new SystemMessage(SystemMessage.S1_IS_FULL_AND_CANNOT_ACCEPT_ADDITIONAL_CLAN_MEMBERS_AT_THIS_TIME).addString(clan.getName()));
        }
        else
        {
          activeChar.sendPacket(Msg.THE_ACADEMY_ROYAL_GUARD_ORDER_OF_KNIGHTS_IS_FULL_AND_CANNOT_ACCEPT_NEW_MEMBERS_AT_THIS_TIME);
        }
View Full Code Here

TOP

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

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.