/**
   * @param player
   * @param target
   * @return
   */
  public static long calculateGroupExperienceReward(int maxLevelInRange, Creature target) {
    int targetLevel = target.getLevel();

    int baseXP = ((Npc) target).getObjectTemplate().getStatsTemplate().getMaxXp();
    int xpPercentage = XPRewardEnum.xpRewardFrom(targetLevel - maxLevelInRange);

    return (int) Math.floor(baseXP * xpPercentage / 100);
  }
  /**
   * @param player
   * @param target
   * @return XP reward from target
   */
  public static long calculateSoloExperienceReward(Player player, Creature target) {
    int playerLevel = player.getCommonData().getLevel();
    int targetLevel = target.getLevel();

    int baseXP = ((Npc) target).getObjectTemplate().getStatsTemplate().getMaxXp();
    int xpPercentage = XPRewardEnum.xpRewardFrom(targetLevel - playerLevel);

    return (int) Math.floor(baseXP * xpPercentage * player.getRates().getXpRate() / 100);
  }
 /**
  * @param player
  * @param target
  * @return
  */
 public static long calculateGroupExperienceReward(int maxLevelInRange, Creature target) {
   int targetLevel = target.getLevel();
   // int baseXP = ((Npc) target).getObjectTemplate().getStatsTemplate().getMaxXp();
   int baseXP =
       getBaseXp(
           ((Npc) target).getObjectTemplate().getStatsTemplate().getMaxXp(),
           ((Npc) target).getObjectTemplate().getStatsTemplate().getMaxHp());
   int xpPercentage = XPRewardEnum.xpRewardFrom(targetLevel - maxLevelInRange);
   long rewardXP = Math.round(baseXP * (xpPercentage / 100d));
   return rewardXP;
 }
  /**
   * @param maxLevelInRange
   * @param target
   * @return
   */
  public static int calculateGroupAPReward(int maxLevelInRange, Creature target) {
    int targetLevel = target.getLevel();
    NpcRank npcRank = ((Npc) target).getObjectTemplate().getRank();

    // TODO: fix to see monster Rank level, NORMAL lvl 1, 2 | ELITE lvl 1, 2 etc..
    int baseAP = 10 + calculateRankMultipler(npcRank) - 1;

    int apPercentage = XPRewardEnum.xpRewardFrom(targetLevel - maxLevelInRange);

    return (int) Math.floor(baseAP * apPercentage / 100);
  }
 /**
  * @param player
  * @param target
  * @return XP reward from target
  */
 public static long calculateSoloExperienceReward(Player player, Creature target) {
   int playerLevel = player.getCommonData().getLevel();
   int targetLevel = target.getLevel();
   // int baseXP = ((Npc) target).getObjectTemplate().getStatsTemplate().getMaxXp();
   int baseXP =
       getBaseXp(
           ((Npc) target).getObjectTemplate().getStatsTemplate().getMaxXp(),
           ((Npc) target).getObjectTemplate().getStatsTemplate().getMaxHp());
   int xpPercentage = XPRewardEnum.xpRewardFrom(targetLevel - playerLevel);
   long rewardXP = Math.round(baseXP * (xpPercentage / 100d));
   return rewardXP;
 }
  /**
   * @param player
   * @param target
   * @return DP reward
   */
  public static int calculateGroupDPReward(Player player, Creature target) {
    int playerLevel = player.getCommonData().getLevel();
    int targetLevel = target.getLevel();
    NpcRating npcRating = ((Npc) target).getObjectTemplate().getRating();

    // TODO: fix to see monster Rating level, NORMAL lvl 1, 2 | ELITE lvl 1, 2 etc..
    int baseDP = targetLevel * calculateRatingMultipler(npcRating);
    int xpPercentage = XPRewardEnum.xpRewardFrom(targetLevel - playerLevel);
    float rate = player.getRates().getDpNpcRate();

    return (int) Math.floor(baseDP * xpPercentage * rate / 100);
  }
  /**
   * ref:
   * http://www.aionsource.com/forum/mechanic-analysis/42597-character-stats-xp-dp-origin-gerbator-team-july-2009-a.html
   *
   * @param player
   * @param target
   * @return DP reward from target
   */
  public static int calculateSoloDPReward(Player player, Creature target) {
    int playerLevel = player.getCommonData().getLevel();
    int targetLevel = target.getLevel();
    NpcRank npcRank = ((Npc) target).getObjectTemplate().getRank();

    // TODO: fix to see monster Rank level, NORMAL lvl 1, 2 | ELITE lvl 1, 2 etc..
    // look at:
    // http://www.aionsource.com/forum/mechanic-analysis/42597-character-stats-xp-dp-origin-gerbator-team-july-2009-a.html
    int baseDP = targetLevel * calculateRankMultipler(npcRank);

    int xpPercentage = XPRewardEnum.xpRewardFrom(targetLevel - playerLevel);
    return (int) Math.floor(baseDP * xpPercentage * player.getRates().getXpRate() / 100);
  }
 /**
  * @param player
  * @param target
  * @return AP reward
  */
 public static int calculateSoloAPReward(Player player, Creature target) {
   int playerLevel = player.getCommonData().getLevel();
   int targetLevel = target.getLevel();
   int percentage = XPRewardEnum.xpRewardFrom(targetLevel - playerLevel);
   return (int) Math.floor(10 * percentage * player.getRates().getApNpcRate() / 100);
 }