Свернуть ↑
Index: config/main/rates.properties
================================================== =================
--- config/main/rates.properties (revision 2074)
+++ config/main/rates.properties (working copy)
@@ -92,3 +92,91 @@
gameserver.rate.premium.ap.npc = 2
# For PVP
gameserver.rate.premium.ap.player = 2
+
+
+#---------------------------------------------------
+##########ALTERNATE SERVER EXP RATES
+#---------------------------------------------------
+# Overrides the static EXP rate
+# Enable alternate EXP evolution method
+# if this config is set to true you can
+# set an evolutive EXP rate for your players
+gameserver.character.alternate.exp=false
+
+# Base EXP rate
+gameserver.character.alternate.exp.min=1
+# Maximum EXP rate
+gameserver.character.alternate.exp.max=3
+
+# EXP lowest level cutoff
+# Level at which the EXP rate starts to increase
+gameserver.character.alternate.exp.lowcutoff=30
+# EXP highest level cutoff
+# Level at which the EXP rate reaches the maximum
+gameserver.character.alternate.exp.highcutoff=50
+#---------------------------------------------------
+##########ALTERNATE QUEST EXP RATES
+#---------------------------------------------------
+# Enable alternate Quest EXP evolution method
+# if this config is set to true you can
+# set an evolutive Quest EXP rate for your players
+gameserver.character.alternate.exp.quest=false
+
+# Base Quest EXP rate
+gameserver.character.alternate.exp.quest.min=1
+# Maximum Quest EXP rate
+gameserver.character.alternate.exp.quest.max=3
+
+# EXP Quest lowest level cutoff
+# Level at which the Quest EXP rate starts to increase
+gameserver.character.alternate.exp.quest.lowcutof f=30
+# EXP Quest highest level cutoff
+# Level at which the Quest EXP rate reaches the maximum
+gameserver.character.alternate.exp.quest.highcuto ff=50
+
+#---------------------------------------------------
+##########ALTERNATE QUEST KINAH RATES
+#---------------------------------------------------
+# Enable alternate Quest KINAH evolution method
+# if this config is set to true you can
+# set an evolutive Quest KINAH rate for your players
+gameserver.character.alternate.kinah.quest=false
+
+# Base Quest KINAH rate
+gameserver.character.alternate.kinah.quest.min=1
+# Maximum Quest KINAH rate
+gameserver.character.alternate.kinah.quest.max=3
+
+# KINAH Quest lowest level cutoff
+# Level at which the Quest KINAH rate starts to increase
+gameserver.character.alternate.kinah.quest.lowcut off=30
+# KINAH Quest highest level cutoff
+# Level at which the Quest KINAH rate reaches the maximum
+gameserver.character.alternate.kinah.quest.highcu toff=50
+
+#---------------------------------------------------
+##########ALTERNATE ABYSS POINT RATES
+#---------------------------------------------------
+# Enable alternate Quest EXP evolution method
+# if this config is set to true you can
+# set an evolutive Quest EXP rate for your players
+gameserver.character.alternate.abyss.point=false
+
+# Abyss Point PVE Min
+gameserver.character.alternate.abyss.npc.min=1
+# Abyss Point PVE Max
+gameserver.character.alternate.abyss.npc.max=3
+
+# Abyss Point PVP Min
+gameserver.character.alternate.abyss.player.min=1
+# Abyss Point PVP Max
+gameserver.character.alternate.abyss.player.max=3
+
+# Abyss Point lowest level cutoff
+# Level at which the Abyss Point rate starts to increase
+gameserver.character.alternate.abyss.lowcutoff=30
+# Abyss Point highest level cutoff
+# Level at which the Abyss Point rate reaches the maximum
+gameserver.character.alternate.abyss.highcutoff=5 0
+
+
Index: src/com/aionemu/gameserver/configs/main/RateConfig.java
================================================== =================
--- src/com/aionemu/gameserver/configs/main/RateConfig.java (revision 2074)
+++ src/com/aionemu/gameserver/configs/main/RateConfig.java (working copy)
@@ -116,4 +116,147 @@
@Property(key = "gameserver.rate.premium.ap.npc", defaultValue = "2")
public static float PREMIUM_AP_NPC_RATE;
+
+ /**
+ * Evolutive EXP mod config
+ */
+ @Property(key = "gameserver.character.alternate.exp", defaultValue = "false")
+ public static boolean ALT_EXP_ALLOWED;
+
+ /**
+ * Evolutive EXP mod config
+ */
+ @Property(key = "gameserver.character.alternate.exp.min", defaultValue = "1")
+ public static int ALT_EXP_MIN_RATE;
+
+ /**
+ * Evolutive EXP mod config
+ */
+ @Property(key = "gameserver.character.alternate.exp.max", defaultValue = "1")
+ public static int ALT_EXP_MAX_RATE;
+
+ /**
+ * Evolutive EXP mod config
+ */
+ @Property(key = "gameserver.character.alternate.exp.lowcutoff" , defaultValue = "1")
+ public static int ALT_EXP_MIN_LEVEL;
+
+ /**
+ * Evolutive EXP mod config
+ */
+ @Property(key = "gameserver.character.alternate.exp.highcutoff ", defaultValue = "1")
+ public static int ALT_EXP_MAX_LEVEL;
+
+
+
+
+ /**
+ * Evolutive Quest EXP mod config
+ */
+ @Property(key = "gameserver.character.alternate.exp.quest", defaultValue = "false")
+ public static boolean ALT_QUEST_EXP_ALLOWED;
+
+ /**
+ * Evolutive Quest EXP mod config
+ */
+ @Property(key = "gameserver.character.alternate.exp.quest.min" , defaultValue = "1")
+ public static int ALT_QUEST_EXP_MIN_RATE;
+
+ /**
+ * Evolutive Quest EXP mod config
+ */
+ @Property(key = "gameserver.character.alternate.exp.quest.max" , defaultValue = "1")
+ public static int ALT_QUEST_EXP_MAX_RATE;
+
+ /**
+ * Evolutive Quest EXP mod config
+ */
+ @Property(key = "gameserver.character.alternate.exp.quest.lowcutof f", defaultValue = "1")
+ public static int ALT_QUEST_EXP_MIN_LEVEL;
+
+ /**
+ * Evolutive Quest EXP mod config
+ */
+ @Property(key = "gameserver.character.alternate.exp.quest.highcuto ff", defaultValue = "1")
+ public static int ALT_QUEST_EXP_MAX_LEVEL;
+
+
+
+
+
+ /**
+ * Evolutive Quest KINAH mod config
+ */
+ @Property(key = "gameserver.character.alternate.kinah.quest", defaultValue = "false")
+ public static boolean ALT_QUEST_KINAH_ALLOWED;
+
+ /**
+ * Evolutive Quest KINAH mod config
+ */
+ @Property(key = "gameserver.character.alternate.kinah.quest.mi n", defaultValue = "1")
+ public static int ALT_QUEST_KINAH_MIN_RATE;
+
+ /**
+ * Evolutive Quest KINAH mod config
+ */
+ @Property(key = "gameserver.character.alternate.kinah.quest.ma x", defaultValue = "1")
+ public static int ALT_QUEST_KINAH_MAX_RATE;
+
+ /**
+ * Evolutive Quest EXP mod config
+ */
+ @Property(key = "gameserver.character.alternate.kinah.quest.lowcut off", defaultValue = "1")
+ public static int ALT_QUEST_KINAH_MIN_LEVEL;
+
+ /**
+ * Evolutive Quest EXP mod config
+ */
+ @Property(key = "gameserver.character.alternate.kinah.quest.highcu toff", defaultValue = "1")
+ public static int ALT_QUEST_KINAH_MAX_LEVEL;
+
+
+
+
+ /**
+ * Evolutive Abyss Point mod config
+ */
+ @Property(key = "gameserver.character.alternate.abyss.point", defaultValue = "false")
+ public static boolean ALT_ABYSS_POINT_ALLOWED;
+
+ /**
+ * Evolutive Abyss Point mod config
+ */
+ @Property(key = "gameserver.character.alternate.abyss.npc.min" , defaultValue = "1")
+ public static int ALT_ABYSS_NPC_MIN_RATE;
+
+ /**
+ * Evolutive Abyss Point mod config
+ */
+ @Property(key = "gameserver.character.alternate.abyss.npc.max" , defaultValue = "1")
+ public static int ALT_ABYSS_NPC_MAX_RATE;
+
+ /**
+ * Evolutive Abyss Point mod config
+ */
+ @Property(key = "gameserver.character.alternate.abyss.player.m in", defaultValue = "1")
+ public static int ALT_ABYSS_PLAYER_MIN_RATE;
+
+ /**
+ * Evolutive Abyss Point mod config
+ */
+ @Property(key = "gameserver.character.alternate.abyss.player.m ax", defaultValue = "1")
+ public static int ALT_ABYSS_PLAYER_MAX_RATE;
+ /**
+ * Evolutive Abyss Point mod config
+ */
+ @Property(key = "gameserver.character.alternate.abyss.lowcutof f", defaultValue = "1")
+ public static int ALT_ABYSS_POINT_MIN_LEVEL;
+
+ /**
+ * Evolutive Abyss Point mod config
+ */
+ @Property(key = "gameserver.character.alternate.abyss.highcuto ff", defaultValue = "1")
+ public static int ALT_ABYSS_POINT_MAX_LEVEL;
+
+
}
Index: src/com/aionemu/gameserver/controllers/MonsterController.java
================================================== =================
--- src/com/aionemu/gameserver/controllers/MonsterController.java (revision 2074)
+++ src/com/aionemu/gameserver/controllers/MonsterController.java (working copy)
@@ -24,6 +24,7 @@
import com.aionemu.gameserver.utils.PacketSendUtility;
import com.aionemu.gameserver.utils.stats.StatFunctions;
import com.aionemu.gameserver.world.WorldMapType;
+import com.aionemu.gameserver.configs.main.RateConfig;
/**
* @author ATracer
@@ -50,8 +51,24 @@
Player player = (Player) master;
if(player.getPlayerGroup() == null) //solo
{
- long xpReward = StatFunctions.calculateSoloExperienceReward(player , getOwner());
+ long xpReward = StatFunctions.calculateSoloExperienceReward(player , getOwner());
+ if(RateConfig.ALT_EXP_ALLOWED)
+ {
+ if(player.getLevel() <= RateConfig.ALT_EXP_MIN_LEVEL)
+ {
+ xpReward *= RateConfig.ALT_EXP_MIN_RATE;
+ player.getCommonData().addExp(xpReward);
+ }
+ else if(player.getLevel() >= RateConfig.ALT_EXP_MAX_LEVEL)
+ {
+ xpReward *= RateConfig.ALT_EXP_MAX_RATE;
+ player.getCommonData().addExp(xpReward);
+ }
+ }
+ else
+ {
player.getCommonData().addExp(xpReward);
+ }
//DPreward
int currentDp = player.getCommonData().getDp();
Index: src/com/aionemu/gameserver/services/AbyssService.java
================================================== =================
--- src/com/aionemu/gameserver/services/AbyssService.java (revision 2074)
+++ src/com/aionemu/gameserver/services/AbyssService.java (working copy)
@@ -17,6 +17,7 @@
package com.aionemu.gameserver.services;
import com.aionemu.gameserver.model.gameobjects.Creature;
+import com.aionemu.gameserver.configs.main.RateConfig;
import com.aionemu.gameserver.model.gameobjects.player.Pl ayer;
import com.aionemu.gameserver.network.aion.serverpackets. SM_ABYSS_RANK;
import com.aionemu.gameserver.network.aion.serverpackets. SM_ABYSS_RANK_UPDATE;
@@ -113,30 +114,19 @@
PacketSendUtility.sendPacket(winner, SM_SYSTEM_MESSAGE.EARNED_ABYSS_POINT(String.valueO f(pointsGained)));
PacketSendUtility.sendPacket(defeated, new SM_SYSTEM_MESSAGE(1340002, winner.getName()));
}
-
- /**
- *
- * @param victim
- * @param winner
- */
- public void doReward(Creature victim, Player winner)
+
+ private void doPveReward(Player winner, int apReward)
{
- int apReward = StatFunctions.calculateSoloAPReward(winner, victim);
-
int oldWinnerAbyssRank = winner.getAbyssRank().getRank().getId();
-
winner.getAbyssRank().addAp(apReward);
if(winner.isLegionMember())
legionService.addContributionPoints(winner.getLegi on(), apReward);
-
if(winner.getAbyssRank().getRank().getId() != oldWinnerAbyssRank)
PacketSendUtility.broadcastPacket(winner, new SM_ABYSS_RANK_UPDATE(winner));
-
PacketSendUtility.sendPacket(winner, new SM_ABYSS_RANK(winner.getAbyssRank()));
PacketSendUtility.sendPacket(winner, SM_SYSTEM_MESSAGE.EARNED_ABYSS_POINT(String.valueO f(apReward)));
}
-
- public void doReward(Player winner, int apReward)
+ private void doPvpReward(Player winner, int apReward)
{
winner.getAbyssRank().addAp(apReward);
if(winner.isLegionMember())
@@ -146,4 +136,54 @@
PacketSendUtility.sendPacket(winner, new SM_ABYSS_RANK(winner.getAbyssRank()));
PacketSendUtility.sendPacket(winner, SM_SYSTEM_MESSAGE.EARNED_ABYSS_POINT(String.valueO f(apReward)));
}
+ /**
+ *
+ * @param victim
+ * @param winner
+ */
+ public void doReward(Creature victim, Player winner)
+ {
+ int apReward = StatFunctions.calculateSoloAPReward(winner, victim);
+ if(RateConfig.ALT_ABYSS_POINT_ALLOWED)
+ {
+ int playerLevel = winner.getLevel();
+ if(playerLevel <= RateConfig.ALT_ABYSS_POINT_MIN_LEVEL)
+ {
+ apReward *= RateConfig.ALT_ABYSS_PLAYER_MIN_RATE;
+ doPveReward(winner, apReward);
+ }
+ else if(playerLevel >= RateConfig.ALT_ABYSS_POINT_MAX_LEVEL)
+ {
+ apReward *= RateConfig.ALT_ABYSS_PLAYER_MAX_RATE;
+ doPveReward(winner, apReward);
+ }
+ }
+ else
+ {
+ doPveReward(winner, apReward);
+ }
+ }
+
+ public void doReward(Player winner, int apReward)
+ {
+ if(RateConfig.ALT_ABYSS_POINT_ALLOWED)
+ {
+ int playerLevel = winner.getLevel();
+ if(playerLevel <= RateConfig.ALT_ABYSS_POINT_MIN_LEVEL)
+ {
+ apReward *= RateConfig.ALT_ABYSS_PLAYER_MIN_RATE;
+ doPvpReward(winner, apReward);
+ }
+ else if(playerLevel >= RateConfig.ALT_ABYSS_POINT_MAX_LEVEL)
+ {
+ apReward *= RateConfig.ALT_ABYSS_PLAYER_MAX_RATE;
+ winner.getAbyssRank().addAp(apReward);
+ doPvpReward(winner, apReward);
+ }
+ }
+ else
+ {
+ doPveReward(winner, apReward);
+ }
+ }
}
Index: src/com/aionemu/gameserver/services/GroupService.java
================================================== =================
--- src/com/aionemu/gameserver/services/GroupService.java (revision 2074)
+++ src/com/aionemu/gameserver/services/GroupService.java (working copy)
@@ -24,6 +24,7 @@
import org.apache.log4j.Logger;
+import com.aionemu.gameserver.configs.main.RateConfig;
import com.aionemu.gameserver.configs.main.GroupConfig;
import com.aionemu.gameserver.model.gameobjects.Creature;
import com.aionemu.gameserver.model.gameobjects.Monster;
@@ -279,14 +280,30 @@
for(Player member : players)
{
- long currentExp = member.getCommonData().getExp();
- long reward = (xpReward * member.getLevel())/partyLvlSum;
- reward *= member.getRates().getGroupXpRate();
- member.getCommonData().setExp(currentExp + reward);
+ long currentExp = member.getCommonData().getExp();
+ long reward = (xpReward * member.getLevel())/partyLvlSum;
+ if(RateConfig.ALT_EXP_ALLOWED)
+ {
+ if(member.getLevel() <= RateConfig.ALT_EXP_MIN_LEVEL)
+ {
+ reward *= RateConfig.ALT_EXP_MIN_RATE;
+ member.getCommonData().setExp(currentExp + reward);
+ }
+ else if(member.getLevel() >= RateConfig.ALT_EXP_MAX_LEVEL)
+ {
+ reward *= RateConfig.ALT_EXP_MAX_RATE;
+ member.getCommonData().setExp(currentExp + reward);
+ }
+ }
+ else
+ {
+ reward *= member.getRates().getGroupXpRate();
+ member.getCommonData().setExp(currentExp + reward);
+ }
PacketSendUtility.sendPacket(member, SM_SYSTEM_MESSAGE.EXP(Long.toString(reward)));
- // DPreward
+ // DPreward
int currentDp = member.getCommonData().getDp();
int dpReward = StatFunctions.calculateGroupDPReward(member, owner);
member.getCommonData().setDp(dpReward + currentDp);
Index: src/com/aionemu/gameserver/services/QuestService.java
================================================== =================
--- src/com/aionemu/gameserver/services/QuestService.java (revision 2074)
+++ src/com/aionemu/gameserver/services/QuestService.java (working copy)
@@ -22,6 +22,7 @@
import com.aionemu.commons.utils.Rnd;
import com.aionemu.gameserver.configs.main.GroupConfig;
+import com.aionemu.gameserver.configs.main.RateConfig;
import com.aionemu.gameserver.dataholders.QuestsData;
import com.aionemu.gameserver.model.PlayerClass;
import com.aionemu.gameserver.model.drop.DropItem;
@@ -134,12 +135,57 @@
{
if(rewards.getGold() != null)
{
- inventory.increaseKinah((player.getRates().getQues tKinahRate() * rewards.getGold()));
+ int kinahReward = (player.getRates().getQuestKinahRate() * rewards.getGold());
+ if(RateConfig.ALT_QUEST_KINAH_ALLOWED)
+ {
+ int playerLevel = player.getLevel();
+ if(playerLevel <= RateConfig.ALT_QUEST_KINAH_MIN_LEVEL)
+ {
+ kinahReward *= RateConfig.ALT_QUEST_KINAH_MIN_RATE;
+ inventory.increaseKinah(kinahReward);
+ }
+ else if(playerLevel >= RateConfig.ALT_QUEST_KINAH_MAX_LEVEL)
+ {
+ kinahReward *= RateConfig.ALT_QUEST_KINAH_MAX_RATE;
+ inventory.increaseKinah(kinahReward);
+ }
+ }
+ else
+ {
+ inventory.increaseKinah(kinahReward);
+ }
}
if(rewards.getExp() != null)
{
- int rewardExp = (player.getRates().getQuestXpRate() * rewards.getExp());
- player.getCommonData().addExp(rewardExp);
+ if(RateConfig.ALT_QUEST_EXP_ALLOWED)
+ {
+ int rewardExp = (rewards.getExp() * player.getRates().getQuestXpRate());
+ int playerLevel = player.getLevel();
+ if(playerLevel <= RateConfig.ALT_QUEST_EXP_MIN_LEVEL)
+ {
+ rewardExp *= RateConfig.ALT_QUEST_EXP_MIN_RATE;
+ player.getCommonData().addExp(rewardExp);
+ }
+ else if(playerLevel >= RateConfig.ALT_QUEST_EXP_MAX_LEVEL)
+ {
+ rewardExp *= RateConfig.ALT_QUEST_EXP_MAX_RATE;
+ player.getCommonData().addExp(rewardExp);
+ }
+ else
+ {
+ int rateDif = RateConfig.ALT_QUEST_EXP_MAX_RATE - RateConfig.ALT_QUEST_EXP_MIN_RATE;
+ int levelDif = RateConfig.ALT_QUEST_EXP_MAX_LEVEL - RateConfig.ALT_QUEST_EXP_MIN_LEVEL;
+ int curRateModifier = (int)Math.round(rateDif/levelDif);
+ int curRate = RateConfig.ALT_QUEST_EXP_MIN_RATE + ((playerLevel - RateConfig.ALT_QUEST_EXP_MIN_LEVEL)*curRateModifie r);
+ rewardExp *= curRate;
+ player.getCommonData().addExp(rewardExp);
+ }
+ }
+ else
+ {
+ int rewardExp = (player.getRates().getQuestXpRate() * rewards.getExp());
+ player.getCommonData().addExp(rewardExp);
+ }
}
if(rewards.getTitle() != null)