/**
   * @param player
   * @param target
   * @return AP reward
   */
  public static int calculatePvEGpGained(Player player, Creature target) {
    float gpPercentage =
        target.isRaidMonster()
            ? 100f
            : APRewardEnum.apReward(player.getAbyssRank().getRank().getId());
    boolean lvlDiff = player.getCommonData().getLevel() - target.getLevel() > 10;
    float gpNpcRate = GpNpcRating(((Npc) target).getObjectTemplate().getRating());

    return (int)
        (lvlDiff
            ? 1
            : RewardType.GP_NPC.calcReward(
                player, (int) Math.floor(15 * gpPercentage * gpNpcRate / 100)));
  }
  /**
   * @param player
   * @param target
   * @return AP reward
   */
  public static int calculatePvEApGained(Player player, Creature target) {
    float apPercentage =
        target instanceof SiegeNpc
            ? 100f
            : APRewardEnum.apReward(player.getAbyssRank().getRank().getId());
    boolean lvlDiff = player.getCommonData().getLevel() - target.getLevel() > 10;
    float apNpcRate = ApNpcRating(((Npc) target).getObjectTemplate().getRating());

    // TODO: findout why they give 1/4 AP base(normal NpcRate) (5 AP retail)
    if (target.getName().equals("flame hoverstone")) {
      apNpcRate = 0.5f;
    }

    if (target.getName().equals("controllera") || target.getName().equals("controllerb")) {
      apNpcRate = 0f;
    }

    return (int)
        (lvlDiff
            ? 1
            : RewardType.AP_NPC.calcReward(
                player, (int) Math.floor(15 * apPercentage * apNpcRate / 100)));
  }