/** Method runImpl. */
  @Override
  protected void runImpl() {
    Player player = getClient().getActiveChar();

    if (player == null) {
      return;
    }

    Party party = player.getParty();
    CommandChannel channel = party != null ? party.getCommandChannel() : null;

    if ((channel != null) && (channel.getChannelLeader() == player)) {
      if ((channel.getMatchingRoom() == null) && (party != null)) {
        CCMatchingRoom room =
            new CCMatchingRoom(
                player, 1, player.getLevel(), 50, party.getLootDistribution(), player.getName());
        channel.setMatchingRoom(room);
      }
    } else if ((channel != null) && !channel.getParties().contains(party)) {
      player.sendPacket(
          SystemMsg
              .THE_COMMAND_CHANNEL_AFFILIATED_PARTYS_PARTY_MEMBER_CANNOT_USE_THE_MATCHING_SCREEN);
    } else if ((party != null) && !party.isLeader(player)) {
      player.sendPacket(
          SystemMsg
              .THE_LIST_OF_PARTY_ROOMS_CAN_ONLY_BE_VIEWED_BY_A_PERSON_WHO_IS_NOT_PART_OF_A_PARTY);
    } else {
      MatchingRoomManager.getInstance().addToWaitingList(player);
      player.sendPacket(new ListPartyWaiting(_region, _allLevels == 1, _page, player));
    }
  }
 private void sayScreenMessage(Player player) {
   if (player.isInParty()) {
     for (Player players : player.getParty().getPartyMembers()) {
       if (players.isInRange(player, 1000)) {
         players.sendPacket(
             new ExShowScreenMessage(
                 Rnd.get(FUCKED_HARNAK),
                 5000,
                 ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER,
                 true,
                 ExShowScreenMessage.STRING_TYPE,
                 0,
                 true,
                 0));
       }
     }
   } else {
     player.sendPacket(
         new ExShowScreenMessage(
             Rnd.get(FUCKED_HARNAK),
             5000,
             ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER,
             true,
             ExShowScreenMessage.STRING_TYPE,
             0,
             true,
             0));
   }
 }
Exemplo n.º 3
0
 /** Method broadcastStatusUpdate. */
 @Override
 public void broadcastStatusUpdate() {
   for (Player player : World.getAroundPlayers(this)) {
     if (player != null) {
       player.sendPacket(new StaticObject(this, player));
     }
   }
 }
Exemplo n.º 4
0
    @Override
    public void onZoneEnter(Zone zone, Creature cha) {
      if (zone == null) return;

      if (cha == null) return;

      if (cha instanceof Player) {
        Player player = cha.getPlayer();
        if (ArcanManager.getStage() == _RED) {
          player.sendPacket(new EventTrigger(_BLUE, false));
          player.sendPacket(new EventTrigger(_RED, true));
        } else {
          player.sendPacket(new EventTrigger(_RED, false));
          player.sendPacket(new EventTrigger(_BLUE, true));
        }
      }
    }
 /** Method runImpl. */
 @Override
 protected void runImpl() {
   Player player = getClient().getActiveChar();
   if ((player == null) || !Config.EX_NEW_PETITION_SYSTEM) {
     return;
   }
   player.sendPacket(new ExResponseShowStepOne(player));
 }
Exemplo n.º 6
0
  /**
   * Method SendReqToStartQuest.
   *
   * @param player Player
   */
  public void SendReqToStartQuest(Player player) {
    if (player.getClassId().level() < 3) {
      return;
    }

    int newClass = _CA.get(player.getClassId().getId());
    player.sendPacket(new ExCallToChangeClass(newClass, false));
  }
Exemplo n.º 7
0
 /** Method setUpPlayers. */
 private void setUpPlayers() {
   HandysBlockCheckerManager.getInstance().setArenaBeingUsed(_arena);
   _redPoints = _spawns.size() / 2;
   _bluePoints = _spawns.size() / 2;
   final ExCubeGameChangePoints initialPoints =
       new ExCubeGameChangePoints(300, _bluePoints, _redPoints);
   ExCubeGameExtendedChangePoints clientSetUp;
   for (Player player : _holder.getAllPlayers()) {
     if (player == null) {
       continue;
     }
     player.addListener(_listener);
     boolean isRed = _holder.getRedPlayers().contains(player);
     clientSetUp =
         new ExCubeGameExtendedChangePoints(300, _bluePoints, _redPoints, isRed, player, 0);
     player.sendPacket(clientSetUp);
     player.sendActionFailed();
     int tc = _holder.getPlayerTeam(player) * 2;
     int x = _arenaCoordinates[_arena][tc];
     int y = _arenaCoordinates[_arena][tc + 1];
     player.teleToLocation(x, y, _zCoord);
     if (isRed) {
       _redTeamPoints.put(player, 0);
       player.setTeam(TeamType.RED);
     } else {
       _blueTeamPoints.put(player, 0);
       player.setTeam(TeamType.BLUE);
     }
     player.getEffectList().stopAllEffects();
     for (Summon summon : player.getSummonList()) {
       summon.unSummon();
     }
     _freeze.getEffects(player, player, false, false);
     if (_holder.getPlayerTeam(player) == 0) {
       _transformationRed.getEffects(player, player, false, false);
     } else {
       _transformationBlue.getEffects(player, player, false, false);
     }
     player.setBlockCheckerArena((byte) _arena);
     player.sendPacket(initialPoints);
     player.sendPacket(_closeUserInterface);
     player.sendPacket(new ExBasicActionList(player));
     broadcastRelationChanged(player);
     player.broadcastCharInfo();
   }
 }
Exemplo n.º 8
0
 /**
  * Method addRewardItemWithMessage.
  *
  * @param id int
  * @param count long
  * @param player Player
  */
 private void addRewardItemWithMessage(int id, long count, Player player) {
   player
       .getInventory()
       .addItem(id, (long) (count * Config.ALT_RATE_COINS_REWARD_BLOCK_CHECKER));
   player.sendPacket(
       new SystemMessage(SystemMessage.YOU_HAVE_OBTAINED_S2_S1)
           .addItemName(id)
           .addNumber(count));
 }
Exemplo n.º 9
0
  /**
   * Method SendReqToAwaking.
   *
   * @param player Player
   */
  public void SendReqToAwaking(Player player) {
    if (player.getClassId().level() < 3) {
      return;
    }

    int newClass = _CA.get(player.getClassId().getId());
    player.sendPacket(new ExChangeToAwakenedClass(newClass));
    return;
  }
  /** Method runImpl. */
  @Override
  protected void runImpl() {
    Player player = getClient().getActiveChar();

    if ((player == null) || !Config.EX_JAPAN_MINIGAME) {
      return;
    }

    player.sendPacket(new ExBR_MiniGameLoadScores(player));
  }
Exemplo n.º 11
0
  /**
   * Method onBypassFeedback.
   *
   * @param npc NpcInstance
   * @param player Player
   * @param command String
   * @see lineage2.gameserver.handlers.IBypassHandler#onBypassFeedback(NpcInstance, Player, String)
   */
  @Override
  public void onBypassFeedback(NpcInstance npc, Player player, String command) {
    int val = Integer.parseInt(command.substring(16));
    NpcInstance npcInst = GameObjectsStorage.getByNpcId(val);

    if (npcInst != null) {
      player.sendPacket(new RadarControl(2, 2, npcInst.getLoc()));
      player.sendPacket(new RadarControl(0, 1, npcInst.getLoc()));
    }
  }
  /** Method runImpl. */
  @Override
  protected void runImpl() {
    Player player = getClient().getActiveChar();

    if (player == null) {
      return;
    }

    player.sendPacket(new ExListMpccWaiting(player, _listId, _locationId, _allLevels));
  }
  /** Method runImpl. */
  @Override
  protected void runImpl() {
    Player player = getClient().getActiveChar();

    if (player == null) {
      return;
    }

    player.sendPacket(new FriendList(player));
  }
Exemplo n.º 14
0
  /**
   * Method onPlayerEnter.
   *
   * @param player Player
   * @see lineage2.gameserver.listener.actor.player.OnPlayerEnterListener#onPlayerEnter(Player)
   */
  @Override
  public void onPlayerEnter(Player player) {
    if (player.getClassId().level() < 3) {
      return;
    }

    if (player.getLevel() < 85) {
      return;
    }

    if (player.isAwaking()) {
      return;
    }

    if (player.getActiveSubClass().isBase() || player.getActiveSubClass().isDual()) {
      player.sendPacket(new ExShowUsmVideo(ExShowUsmVideo.Q010));
      player.sendPacket(new ExCallToChangeClass(_CA.get(player.getClassId().getId()), true));
    }
  }
Exemplo n.º 15
0
  /**
   * Method useUserCommand.
   *
   * @param id int
   * @param activeChar Player
   * @return boolean
   * @see lineage2.gameserver.handlers.IUserCommandHandler#useUserCommand(int, Player)
   */
  @Override
  public boolean useUserCommand(int id, Player activeChar) {
    if (COMMAND_IDS[0] != id) {
      return false;
    }

    if (activeChar.getActiveReflection() != null) {
      activeChar.sendPacket(
          new SystemMessage2(SystemMsg.INSTANT_ZONE_CURRENTLY_IN_USE_S1)
              .addInstanceName(activeChar.getActiveReflection().getInstancedZoneId()));
    }

    int limit;
    boolean noLimit = true;
    boolean showMsg = false;

    for (int i : activeChar.getInstanceReuses().keySet()) {
      limit = InstantZoneHolder.getInstance().getMinutesToNextEntrance(i, activeChar);

      if (limit > 0) {
        noLimit = false;

        if (!showMsg) {
          activeChar.sendPacket(SystemMsg.INSTANCE_ZONE_TIME_LIMIT);
          showMsg = true;
        }

        activeChar.sendPacket(
            new SystemMessage2(SystemMsg.S1_WILL_BE_AVAILABLE_FOR_REUSE_AFTER_S2_HOURS_S3_MINUTES)
                .addInstanceName(i)
                .addInteger(limit / 60)
                .addInteger(limit % 60));
      }
    }

    if (noLimit) {
      activeChar.sendPacket(SystemMsg.THERE_IS_NO_INSTANCE_ZONE_UNDER_A_TIME_LIMIT);
    }

    return true;
  }
  /** Method runImpl. */
  @Override
  protected void runImpl() {
    Player activeChar = getClient().getActiveChar();

    if (activeChar == null) {
      return;
    }

    if (activeChar.getNoChannel() != 0) {
      if ((activeChar.getNoChannelRemained() > 0) || (activeChar.getNoChannel() < 0)) {
        activeChar.sendPacket(
            new SystemMessage(
                SystemMessage
                    .CHATTING_IS_CURRENTLY_PROHIBITED_IF_YOU_TRY_TO_CHAT_BEFORE_THE_PROHIBITION_IS_REMOVED_THE_PROHIBITION_TIME_WILL_BECOME_EVEN_LONGER));
        return;
      }

      activeChar.updateNoChannel(0);
    }

    Player targetPlayer = World.getPlayer(_reciever);

    if (targetPlayer == null) {
      activeChar.sendPacket(new SystemMessage(SystemMessage.THAT_PLAYER_IS_NOT_ONLINE));
      return;
    }

    if (targetPlayer.isBlockAll()) {
      activeChar.sendPacket(
          new SystemMessage(SystemMessage.THE_PERSON_IS_IN_A_MESSAGE_REFUSAL_MODE));
      return;
    }

    if (!activeChar.getFriendList().getList().containsKey(targetPlayer.getObjectId())) {
      return;
    }

    Log.LogChat("FRIENDTELL", activeChar.getName(), _reciever, _message);
    L2FriendSay frm = new L2FriendSay(activeChar.getName(), _reciever, _message);
    targetPlayer.sendPacket(frm);
  }
 /** Method runImpl. */
 @Override
 protected void runImpl() {
   Player player = getClient().getActiveChar();
   if (player == null) {
     return;
   }
   Castle castle = ResidenceHolder.getInstance().getResidence(Castle.class, _unitId);
   if ((castle == null) || (castle.getOwner() == null)) {
     return;
   }
   player.sendPacket(new CastleSiegeDefenderList(castle));
 }
Exemplo n.º 18
0
 /**
  * Method checkCondition.
  *
  * @return boolean
  */
 @Override
 public boolean checkCondition() {
   Player player = _effected.getPlayer();
   if (player == null) {
     return false;
   }
   if (player.isMounted()) {
     player.sendPacket(
         new SystemMessage(SystemMessage.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS)
             .addSkillName(_skill.getId(), _skill.getLevel()));
     return false;
   }
   return super.checkCondition();
 }
Exemplo n.º 19
0
  @Override
  public void showChatWindow(Player player, int val, Object... replace) {
    NpcHtmlMessage htmlMessage = new NpcHtmlMessage(getObjectId());
    htmlMessage.setFile("default/33785.htm");
    if (player.getVar("Altar1") != null) {
      htmlMessage.setFile("default/33785-2.htm");
    }
    if (player.getVar("Altar2") != null) {
      htmlMessage.setFile("default/33785-3.htm");
    }
    if (player.getVar("Altar3") != null) {
      htmlMessage.setFile("default/33785-e.htm");
    }

    player.sendPacket(htmlMessage);
  }
Exemplo n.º 20
0
  /** Method runImpl. */
  @Override
  protected void runImpl() {
    Player activeChar = getClient().getActiveChar();

    if (activeChar == null) {
      return;
    }

    if ((_page < 0) || (_page > ShortCut.PAGE_MAX)) {
      activeChar.sendActionFailed();
      return;
    }

    ShortCut shortCut = new ShortCut(_slot, _page, _type, _id, _lvl, _characterType);
    activeChar.sendPacket(new ShortCutRegister(activeChar, shortCut));
    activeChar.registerShortCut(shortCut);
  }
  /** Method runImpl. */
  @Override
  protected void runImpl() {
    Player activeChar = getClient().getActiveChar();

    if (activeChar == null) {
      return;
    }

    Clan clan = activeChar.getClan();

    if (clan != null) {
      UnitMember cm = clan.getAnyMember(_target);

      if (cm != null) {
        activeChar.sendPacket(new PledgeReceivePowerInfo(cm));
      }
    }
  }
Exemplo n.º 22
0
 /** Method setPlayersBack. */
 private void setPlayersBack() {
   final ExCubeGameEnd end = new ExCubeGameEnd(_isRedWinner);
   for (Player player : _holder.getAllPlayers()) {
     if (player == null) {
       continue;
     }
     player.getEffectList().stopAllEffects();
     player.setTeam(TeamType.NONE);
     player.setBlockCheckerArena(DEFAULT_ARENA);
     PcInventory inv = player.getInventory();
     inv.destroyItemByItemId(13787, inv.getCountOf(13787));
     inv.destroyItemByItemId(13788, inv.getCountOf(13788));
     broadcastRelationChanged(player);
     player.teleToLocation(-57478, -60367, -2370);
     player.sendPacket(end);
     player.broadcastCharInfo();
   }
 }
Exemplo n.º 23
0
 /**
  * Method onActionTime.
  *
  * @return boolean
  */
 @Override
 public boolean onActionTime() {
   Player player = _effected.getPlayer();
   if (player.isAlikeDead() || (player == null)) {
     return false;
   }
   double manaDam = calc();
   if (manaDam > _effected.getCurrentMp()) {
     if (getSkill().isToggle()) {
       player.sendPacket(
           Msg.NOT_ENOUGH_MP,
           new SystemMessage(SystemMessage.THE_EFFECT_OF_S1_HAS_BEEN_REMOVED)
               .addSkillName(getSkill().getId(), getSkill().getDisplayLevel()));
       return false;
     }
   }
   _effected.reduceCurrentMp(manaDam, null);
   return true;
 }
Exemplo n.º 24
0
  /**
   * Method useAdminCommand.
   *
   * @param command String
   * @param wordList String[]
   * @param fullString String
   * @param activeChar Player
   * @return boolean
   * @see lineage2.gameserver.handlers.IAdminCommandHandler#useAdminCommand(String, String[],
   *     String, Player)
   */
  @Override
  public boolean useAdminCommand(
      String command, String[] wordList, String fullString, Player activeChar) {
    if (!activeChar.getPlayerAccess().CanKick) {
      return false;
    }

    switch (command) {
      case "admin_disconnect":
      case "admin_kick":
        final Player player;

        if (wordList.length == 1) {
          GameObject target = activeChar.getTarget();

          if (target == null) {
            activeChar.sendMessage("Select character or specify player name.");
            break;
          }

          if (!target.isPlayer()) {
            activeChar.sendPacket(new SystemMessage(SystemMessage.INVALID_TARGET));
            break;
          }

          player = (Player) target;
        } else {
          player = World.getPlayer(wordList[1]);

          if (player == null) {
            activeChar.sendMessage("Character " + wordList[1] + " not found in game.");
            break;
          }
        }

        if (player.getObjectId() == activeChar.getObjectId()) {
          activeChar.sendMessage("You can't logout your character.");
          break;
        }

        activeChar.sendMessage("Character " + player.getName() + " disconnected from server.");

        if (player.isInOfflineMode()) {
          player.setOfflineMode(false);
          player.kick();
          return true;
        }

        player.sendMessage("You where kicked by a GM.");
        player.sendPacket(
            new SystemMessage(
                SystemMessage.YOU_HAVE_BEEN_DISCONNECTED_FROM_THE_SERVER_PLEASE_LOGIN_AGAIN));
        ThreadPoolManager.getInstance()
            .schedule(
                new RunnableImpl() {
                  @Override
                  public void runImpl() {
                    player.kick();
                  }
                },
                500);
        break;
    }

    return true;
  }
Exemplo n.º 25
0
 /**
  * Method announce.
  *
  * @param sm SystemMessage
  */
 private void announce(SystemMessage sm) {
   for (Player player : GameObjectsStorage.getAllPlayersForIterate()) {
     player.sendPacket(sm);
   }
 }
Exemplo n.º 26
0
 /**
  * Method showUsageTime.
  *
  * @param player Player
  * @param cw CursedWeapon
  */
 public void showUsageTime(Player player, CursedWeapon cw) {
   SystemMessage sm = new SystemMessage(SystemMessage.S2_MINUTE_OF_USAGE_TIME_ARE_LEFT_FOR_S1);
   sm.addString(cw.getName());
   sm.addNumber(new Long(cw.getTimeLeft() / 60000).intValue());
   player.sendPacket(sm);
 }
Exemplo n.º 27
0
 /**
  * Method useVoicedCommand.
  *
  * @param command String
  * @param player Player
  * @param args String
  * @return boolean * @see
  *     lineage2.gameserver.handler.voicecommands.IVoicedCommandHandler#useVoicedCommand(String,
  *     Player, String)
  */
 @Override
 public boolean useVoicedCommand(String command, Player player, String args) {
   Creature target = null;
   double hpRegen = Formulas.calcHpRegen(player);
   double cpRegen = Formulas.calcCpRegen(player);
   double mpRegen = Formulas.calcMpRegen(player);
   double hpDrain = player.calcStat(Stats.ABSORB_DAMAGE_PERCENT, 0., target, null);
   double mpDrain = player.calcStat(Stats.ABSORB_DAMAGEMP_PERCENT, 0., target, null);
   double hpGain = player.calcStat(Stats.HEAL_EFFECTIVNESS, 100., target, null);
   double mpGain = player.calcStat(Stats.MANAHEAL_EFFECTIVNESS, 100., target, null);
   double critPerc = 2 * player.calcStat(Stats.CRITICAL_DAMAGE, target, null);
   double critStatic = player.calcStat(Stats.CRITICAL_DAMAGE_STATIC, target, null);
   double mCritDmg = player.calcStat(Stats.MCRITICAL_DAMAGE, target, null);
   double blowRate = player.calcStat(Stats.FATALBLOW_RATE, target, null);
   ItemInstance shld = player.getSecondaryWeaponInstance();
   boolean shield = (shld != null) && (shld.getItemType() == WeaponType.NONE);
   double shieldDef =
       shield
           ? player.calcStat(
               Stats.SHIELD_DEFENCE, player.getTemplate().getBaseShldDef(), target, null)
           : 0.;
   double shieldRate = shield ? player.calcStat(Stats.SHIELD_RATE, target, null) : 0.;
   double xpRate = player.getRateExp();
   double spRate = player.getRateSp();
   double dropRate = player.getRateItems();
   double adenaRate = player.getRateAdena();
   double spoilRate = player.getRateSpoil();
   double fireResist = player.calcStat(Element.FIRE.getDefence(), 0., target, null);
   double windResist = player.calcStat(Element.WIND.getDefence(), 0., target, null);
   double waterResist = player.calcStat(Element.WATER.getDefence(), 0., target, null);
   double earthResist = player.calcStat(Element.EARTH.getDefence(), 0., target, null);
   double holyResist = player.calcStat(Element.HOLY.getDefence(), 0., target, null);
   double unholyResist = player.calcStat(Element.UNHOLY.getDefence(), 0., target, null);
   double bleedPower = player.calcStat(Stats.BLEED_POWER, target, null);
   double bleedResist = player.calcStat(Stats.BLEED_RESIST, target, null);
   double poisonPower = player.calcStat(Stats.POISON_POWER, target, null);
   double poisonResist = player.calcStat(Stats.POISON_RESIST, target, null);
   double stunPower = player.calcStat(Stats.STUN_POWER, target, null);
   double stunResist = player.calcStat(Stats.STUN_RESIST, target, null);
   double rootPower = player.calcStat(Stats.ROOT_POWER, target, null);
   double rootResist = player.calcStat(Stats.ROOT_RESIST, target, null);
   double sleepPower = player.calcStat(Stats.SLEEP_POWER, target, null);
   double sleepResist = player.calcStat(Stats.SLEEP_RESIST, target, null);
   double paralyzePower = player.calcStat(Stats.PARALYZE_POWER, target, null);
   double paralyzeResist = player.calcStat(Stats.PARALYZE_RESIST, target, null);
   double mentalPower = player.calcStat(Stats.MENTAL_POWER, target, null);
   double mentalResist = player.calcStat(Stats.MENTAL_RESIST, target, null);
   double debuffPower = player.calcStat(Stats.DEBUFF_POWER, target, null);
   double debuffResist = player.calcStat(Stats.DEBUFF_RESIST, target, null);
   double cancelPower = player.calcStat(Stats.CANCEL_POWER, target, null);
   double cancelResist = player.calcStat(Stats.CANCEL_RESIST, target, null);
   double swordResist = 100. - player.calcStat(Stats.SWORD_WPN_VULNERABILITY, target, null);
   double dualResist = 100. - player.calcStat(Stats.DUAL_WPN_VULNERABILITY, target, null);
   double bluntResist = 100. - player.calcStat(Stats.BLUNT_WPN_VULNERABILITY, target, null);
   double daggerResist = 100. - player.calcStat(Stats.DAGGER_WPN_VULNERABILITY, target, null);
   double bowResist = 100. - player.calcStat(Stats.BOW_WPN_VULNERABILITY, target, null);
   double crossbowResist = 100. - player.calcStat(Stats.CROSSBOW_WPN_VULNERABILITY, target, null);
   double poleResist = 100. - player.calcStat(Stats.POLE_WPN_VULNERABILITY, target, null);
   double fistResist = 100. - player.calcStat(Stats.FIST_WPN_VULNERABILITY, target, null);
   double critChanceResist = 100. - player.calcStat(Stats.CRIT_CHANCE_RECEPTIVE, target, null);
   double critDamResistStatic = player.calcStat(Stats.CRIT_DAMAGE_RECEPTIVE, target, null);
   double critDamResist =
       100.
           - (100
               * (player.calcStat(Stats.CRIT_DAMAGE_RECEPTIVE, 1., target, null)
                   - critDamResistStatic));
   String dialog = HtmCache.getInstance().getNotNull("command/whoami.htm", player);
   NumberFormat df = NumberFormat.getInstance(Locale.ENGLISH);
   df.setMaximumFractionDigits(1);
   df.setMinimumFractionDigits(1);
   StrBuilder sb = new StrBuilder(dialog);
   sb.replaceFirst("%hpRegen%", df.format(hpRegen));
   sb.replaceFirst("%cpRegen%", df.format(cpRegen));
   sb.replaceFirst("%mpRegen%", df.format(mpRegen));
   sb.replaceFirst("%hpDrain%", df.format(hpDrain));
   sb.replaceFirst("%mpDrain%", df.format(mpDrain));
   sb.replaceFirst("%hpGain%", df.format(hpGain));
   sb.replaceFirst("%mpGain%", df.format(mpGain));
   sb.replaceFirst("%critPerc%", df.format(critPerc));
   sb.replaceFirst("%critStatic%", df.format(critStatic));
   sb.replaceFirst("%mCritDmg%", df.format(mCritDmg));
   sb.replaceFirst("%blowRate%", df.format(blowRate));
   sb.replaceFirst("%shieldDef%", df.format(shieldDef));
   sb.replaceFirst("%shieldRate%", df.format(shieldRate));
   sb.replaceFirst("%xpRate%", df.format(xpRate));
   sb.replaceFirst("%spRate%", df.format(spRate));
   sb.replaceFirst("%dropRate%", df.format(dropRate));
   sb.replaceFirst("%adenaRate%", df.format(adenaRate));
   sb.replaceFirst("%spoilRate%", df.format(spoilRate));
   sb.replaceFirst("%fireResist%", df.format(fireResist));
   sb.replaceFirst("%windResist%", df.format(windResist));
   sb.replaceFirst("%waterResist%", df.format(waterResist));
   sb.replaceFirst("%earthResist%", df.format(earthResist));
   sb.replaceFirst("%holyResist%", df.format(holyResist));
   sb.replaceFirst("%darkResist%", df.format(unholyResist));
   sb.replaceFirst("%bleedPower%", df.format(bleedPower));
   sb.replaceFirst("%bleedResist%", df.format(bleedResist));
   sb.replaceFirst("%poisonPower%", df.format(poisonPower));
   sb.replaceFirst("%poisonResist%", df.format(poisonResist));
   sb.replaceFirst("%stunPower%", df.format(stunPower));
   sb.replaceFirst("%stunResist%", df.format(stunResist));
   sb.replaceFirst("%rootPower%", df.format(rootPower));
   sb.replaceFirst("%rootResist%", df.format(rootResist));
   sb.replaceFirst("%sleepPower%", df.format(sleepPower));
   sb.replaceFirst("%sleepResist%", df.format(sleepResist));
   sb.replaceFirst("%paralyzePower%", df.format(paralyzePower));
   sb.replaceFirst("%paralyzeResist%", df.format(paralyzeResist));
   sb.replaceFirst("%mentalPower%", df.format(mentalPower));
   sb.replaceFirst("%mentalResist%", df.format(mentalResist));
   sb.replaceFirst("%debuffPower%", df.format(debuffPower));
   sb.replaceFirst("%debuffResist%", df.format(debuffResist));
   sb.replaceFirst("%cancelPower%", df.format(cancelPower));
   sb.replaceFirst("%cancelResist%", df.format(cancelResist));
   sb.replaceFirst("%swordResist%", df.format(swordResist));
   sb.replaceFirst("%dualResist%", df.format(dualResist));
   sb.replaceFirst("%bluntResist%", df.format(bluntResist));
   sb.replaceFirst("%daggerResist%", df.format(daggerResist));
   sb.replaceFirst("%bowResist%", df.format(bowResist));
   sb.replaceFirst("%crossbowResist%", df.format(crossbowResist));
   sb.replaceFirst("%fistResist%", df.format(fistResist));
   sb.replaceFirst("%poleResist%", df.format(poleResist));
   sb.replaceFirst("%critChanceResist%", df.format(critChanceResist));
   sb.replaceFirst("%critDamResist%", df.format(critDamResist));
   NpcHtmlMessage msg = new NpcHtmlMessage(0);
   msg.setHtml(Strings.bbParse(sb.toString()));
   player.sendPacket(msg);
   return true;
 }
Exemplo n.º 28
0
 /**
  * Method broadcastRelationChanged.
  *
  * @param plr Player
  */
 void broadcastRelationChanged(Player plr) {
   for (Player p : _holder.getAllPlayers()) {
     p.sendPacket(RelationChanged.update(plr, p, plr));
   }
 }