More like this.
Index: dist/game/data/scripts/handlers/admincommandhandlers/AdminExpSp.java
===================================================================
--- dist/game/data/scripts/handlers/admincommandhandlers/AdminExpSp.java (revision 11955)
+++ dist/game/data/scripts/handlers/admincommandhandlers/AdminExpSp.java (working copy)
@@ -18,6 +18,7 @@
import java.util.StringTokenizer;
+import org.l2jmobius.Config;
import org.l2jmobius.gameserver.data.xml.ClassListData;
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -144,7 +145,14 @@
{
// Common character information
player.sendMessage("Admin is adding you " + expval + " xp and " + spval + " sp.");
- player.addExpAndSp(expval, spval);
+ if (player.hasPremiumStatus())
+ {
+ player.addExpAndSp((long) (expval / Config.PREMIUM_RATE_XP), (long) (spval / Config.PREMIUM_RATE_SP));
+ }
+ else
+ {
+ player.addExpAndSp(expval, spval);
+ }
// Admin information
BuilderUtil.sendSysMessage(activeChar, "Added " + expval + " xp and " + spval + " sp to " + player.getName() + ".");
}
Index: dist/game/data/scripts/handlers/admincommandhandlers/AdminLevel.java
===================================================================
--- dist/game/data/scripts/handlers/admincommandhandlers/AdminLevel.java (revision 11955)
+++ dist/game/data/scripts/handlers/admincommandhandlers/AdminLevel.java (working copy)
@@ -91,8 +91,16 @@
}
else if (pXp < tXp)
{
- targetPlayer.addExpAndSp(tXp - pXp, 0);
- BuilderUtil.sendSysMessage(activeChar, "Added " + (tXp - pXp) + " exp.");
+ final long requiredExp = tXp - pXp;
+ if (targetPlayer.hasPremiumStatus())
+ {
+ targetPlayer.addExpAndSp((long) (requiredExp / Config.PREMIUM_RATE_XP), 0);
+ }
+ else
+ {
+ targetPlayer.addExpAndSp(requiredExp, 0);
+ }
+ BuilderUtil.sendSysMessage(activeChar, "Added " + requiredExp + " exp.");
}
targetPlayer.setCurrentHpMp(targetPlayer.getMaxHp(), targetPlayer.getMaxMp());
targetPlayer.setCurrentCp(targetPlayer.getMaxCp());
Note to myself:
This is not needed with subscriber version.
Premium bonuses are calculated differently.