From 158eb77fa69e9f8f38ca863c15f2122dc7637f12 Mon Sep 17 00:00:00 2001
From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Fri, 13 Jan 2023 22:02:20 +0000
Subject: [PATCH] Addition of optional GiveXp level and percentage parameters.
---
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
.../handlers/effecthandlers/GiveXp.java | 18 ++++++++++++++-
.../handlers/effecthandlers/GiveXp.java | 18 ++++++++++++++-
.../game/data/stats/items/47900-47999.xml | 9 ++++++++
.../game/data/stats/skills/18700-18799.xml | 12 ++++++++++
.../dist/game/data/xsd/skills.xsd | 1 +
.../handlers/effecthandlers/GiveXp.java | 18 ++++++++++++++-
.../game/data/stats/items/47900-47999.xml | 9 ++++++++
.../game/data/stats/skills/18700-18799.xml | 12 ++++++++++
.../dist/game/data/xsd/skills.xsd | 1 +
.../handlers/effecthandlers/GiveXp.java | 18 ++++++++++++++-
.../game/data/stats/items/47900-47999.xml | 9 ++++++++
.../game/data/stats/skills/18700-18799.xml | 12 ++++++++++
.../dist/game/data/xsd/skills.xsd | 1 +
.../handlers/effecthandlers/GiveXp.java | 18 ++++++++++++++-
.../game/data/stats/items/47900-47999.xml | 9 ++++++++
.../game/data/stats/skills/18700-18799.xml | 12 ++++++++++
.../dist/game/data/xsd/skills.xsd | 1 +
.../handlers/effecthandlers/GiveXp.java | 18 ++++++++++++++-
.../game/data/stats/items/47900-47999.xml | 9 ++++++++
.../game/data/stats/skills/18700-18799.xml | 12 ++++++++++
.../dist/game/data/xsd/skills.xsd | 1 +
.../handlers/effecthandlers/GiveXp.java | 18 ++++++++++++++-
.../game/data/stats/items/47900-47999.xml | 9 ++++++++
.../game/data/stats/skills/18700-18799.xml | 12 ++++++++++
.../dist/game/data/xsd/skills.xsd | 1 +
.../handlers/effecthandlers/GiveXp.java | 18 ++++++++++++++-
.../game/data/stats/items/47900-47999.xml | 9 ++++++++
.../game/data/stats/skills/18700-18799.xml | 12 ++++++++++
.../dist/game/data/xsd/skills.xsd | 1 +
.../handlers/effecthandlers/GiveXp.java | 18 ++++++++++++++-
.../game/data/stats/items/47900-47999.xml | 9 ++++++++
.../game/data/stats/skills/18700-18799.xml | 12 ++++++++++
.../dist/game/data/xsd/skills.xsd | 1 +
.../handlers/effecthandlers/GiveXp.java | 18 ++++++++++++++-
.../game/data/stats/items/47900-47999.xml | 9 ++++++++
.../game/data/stats/skills/18700-18799.xml | 12 ++++++++++
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
.../handlers/effecthandlers/GiveXp.java | 18 ++++++++++++++-
.../game/data/stats/items/47900-47999.xml | 9 ++++++++
.../game/data/stats/skills/18700-18799.xml | 12 ++++++++++
.../dist/game/data/xsd/skills.xsd | 1 +
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
.../handlers/effecthandlers/GiveXp.java | 22 ++++++++++++++++---
55 files changed, 691 insertions(+), 56 deletions(-)
diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index df5410b3fa..ba8b2842f7 100644
--- a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -29,10 +30,14 @@ import org.l2jmobius.gameserver.model.skill.Skill;
public class GiveXp extends AbstractEffect
{
private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
_xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index df5410b3fa..ba8b2842f7 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -29,10 +30,14 @@ import org.l2jmobius.gameserver.model.skill.Skill;
public class GiveXp extends AbstractEffect
{
private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
_xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/items/47900-47999.xml b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/items/47900-47999.xml
index 7110e86835..dea103830a 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/items/47900-47999.xml
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/items/47900-47999.xml
@@ -195,9 +195,18 @@
+
+
+
+
+
+
+
+
+
-
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/18700-18799.xml b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/18700-18799.xml
index 17b8e99383..e9efc07e5a 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/18700-18799.xml
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/stats/skills/18700-18799.xml
@@ -2104,7 +2104,19 @@
icon.bm_nebit_exp_book
A1
4
+ 1
+ 47919
3000
+ true
+ SELF
+ SINGLE
+
+
+ 1000000000
+ 99
+ 20
+
+
diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/xsd/skills.xsd b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/xsd/skills.xsd
index 953960df91..62fcba2f03 100644
--- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/xsd/skills.xsd
+++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/xsd/skills.xsd
@@ -723,6 +723,7 @@
+
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index df5410b3fa..ba8b2842f7 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -29,10 +30,14 @@ import org.l2jmobius.gameserver.model.skill.Skill;
public class GiveXp extends AbstractEffect
{
private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
_xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/items/47900-47999.xml b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/items/47900-47999.xml
index aa299153f8..4b0d4db504 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/items/47900-47999.xml
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/items/47900-47999.xml
@@ -195,9 +195,18 @@
+
+
+
+
+
+
+
+
+
-
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/18700-18799.xml b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/18700-18799.xml
index 10ee24aecc..b561fd0fc8 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/18700-18799.xml
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/stats/skills/18700-18799.xml
@@ -2113,7 +2113,19 @@
icon.bm_nebit_exp_book
A1
4
+ 1
+ 47919
3000
+ true
+ SELF
+ SINGLE
+
+
+ 1000000000
+ 99
+ 20
+
+
diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/xsd/skills.xsd b/L2J_Mobius_05.0_Salvation/dist/game/data/xsd/skills.xsd
index 15c559ec0f..dea8d71a5f 100644
--- a/L2J_Mobius_05.0_Salvation/dist/game/data/xsd/skills.xsd
+++ b/L2J_Mobius_05.0_Salvation/dist/game/data/xsd/skills.xsd
@@ -722,6 +722,7 @@
+
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index df5410b3fa..ba8b2842f7 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -29,10 +30,14 @@ import org.l2jmobius.gameserver.model.skill.Skill;
public class GiveXp extends AbstractEffect
{
private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
_xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/items/47900-47999.xml b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/items/47900-47999.xml
index 886322e6a8..26d1ef962b 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/items/47900-47999.xml
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/items/47900-47999.xml
@@ -195,9 +195,18 @@
+
+
+
+
+
+
+
+
+
-
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/18700-18799.xml b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/18700-18799.xml
index 1a18f74b81..914f47ea4c 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/18700-18799.xml
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/stats/skills/18700-18799.xml
@@ -2151,7 +2151,19 @@
icon.bm_nebit_exp_book
A1
4
+ 1
+ 47919
3000
+ true
+ SELF
+ SINGLE
+
+
+ 1000000000
+ 99
+ 20
+
+
diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/xsd/skills.xsd b/L2J_Mobius_05.5_EtinasFate/dist/game/data/xsd/skills.xsd
index 3afbc52dda..e920b205d1 100644
--- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/xsd/skills.xsd
+++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/xsd/skills.xsd
@@ -627,6 +627,7 @@
+
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index df5410b3fa..ba8b2842f7 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -29,10 +30,14 @@ import org.l2jmobius.gameserver.model.skill.Skill;
public class GiveXp extends AbstractEffect
{
private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
_xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/items/47900-47999.xml b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/items/47900-47999.xml
index b4142549a5..8bab67033a 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/items/47900-47999.xml
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/items/47900-47999.xml
@@ -195,9 +195,18 @@
+
+
+
+
+
+
+
+
+
-
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/18700-18799.xml b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/18700-18799.xml
index 57e8d28e81..b47da96169 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/18700-18799.xml
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/stats/skills/18700-18799.xml
@@ -2166,7 +2166,19 @@
icon.bm_nebit_exp_book
A1
4
+ 1
+ 47919
3000
+ true
+ SELF
+ SINGLE
+
+
+ 1000000000
+ 99
+ 20
+
+
diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/xsd/skills.xsd b/L2J_Mobius_06.0_Fafurion/dist/game/data/xsd/skills.xsd
index e9a0dcb6e3..b64ffa07e3 100644
--- a/L2J_Mobius_06.0_Fafurion/dist/game/data/xsd/skills.xsd
+++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/xsd/skills.xsd
@@ -627,6 +627,7 @@
+
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index df5410b3fa..ba8b2842f7 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -29,10 +30,14 @@ import org.l2jmobius.gameserver.model.skill.Skill;
public class GiveXp extends AbstractEffect
{
private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
_xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/items/47900-47999.xml b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/items/47900-47999.xml
index b4142549a5..8bab67033a 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/items/47900-47999.xml
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/items/47900-47999.xml
@@ -195,9 +195,18 @@
+
+
+
+
+
+
+
+
+
-
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/18700-18799.xml b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/18700-18799.xml
index f3e7242a5b..4fe8f14ffb 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/18700-18799.xml
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/stats/skills/18700-18799.xml
@@ -2166,7 +2166,19 @@
icon.bm_nebit_exp_book
A1
4
+ 1
+ 47919
3000
+ true
+ SELF
+ SINGLE
+
+
+ 1000000000
+ 99
+ 20
+
+
diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/xsd/skills.xsd b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/xsd/skills.xsd
index f2a4da5da5..f225d3c495 100644
--- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/xsd/skills.xsd
+++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/xsd/skills.xsd
@@ -627,6 +627,7 @@
+
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index df5410b3fa..ba8b2842f7 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -29,10 +30,14 @@ import org.l2jmobius.gameserver.model.skill.Skill;
public class GiveXp extends AbstractEffect
{
private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
_xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/47900-47999.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/47900-47999.xml
index 16875ab9c4..3e4a744c0d 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/47900-47999.xml
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/items/47900-47999.xml
@@ -189,9 +189,18 @@
+
+
+
+
+
+
+
+
+
-
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/18700-18799.xml b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/18700-18799.xml
index 9eac16a26d..bfdcb49437 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/18700-18799.xml
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/stats/skills/18700-18799.xml
@@ -2346,7 +2346,19 @@
icon.bm_nebit_exp_book
A1
4
+ 1
+ 47919
3000
+ true
+ SELF
+ SINGLE
+
+
+ 1000000000
+ 99
+ 20
+
+
diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/xsd/skills.xsd b/L2J_Mobius_08.2_Homunculus/dist/game/data/xsd/skills.xsd
index de243cfb1a..111b0b2b24 100644
--- a/L2J_Mobius_08.2_Homunculus/dist/game/data/xsd/skills.xsd
+++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/xsd/skills.xsd
@@ -624,6 +624,7 @@
+
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index df5410b3fa..ba8b2842f7 100644
--- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -29,10 +30,14 @@ import org.l2jmobius.gameserver.model.skill.Skill;
public class GiveXp extends AbstractEffect
{
private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
_xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/47900-47999.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/47900-47999.xml
index c5b53df0b6..5afed54693 100644
--- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/47900-47999.xml
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/items/47900-47999.xml
@@ -189,9 +189,18 @@
+
+
+
+
+
+
+
+
+
-
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/18700-18799.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/18700-18799.xml
index 2e09d0417a..ae1217623f 100644
--- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/18700-18799.xml
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/stats/skills/18700-18799.xml
@@ -2346,7 +2346,19 @@
icon.bm_nebit_exp_book
A1
4
+ 1
+ 47919
3000
+ true
+ SELF
+ SINGLE
+
+
+ 1000000000
+ 99
+ 20
+
+
diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/xsd/skills.xsd b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/xsd/skills.xsd
index 706151f49f..f7a556bdb4 100644
--- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/xsd/skills.xsd
+++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/xsd/skills.xsd
@@ -624,6 +624,7 @@
+
diff --git a/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index df5410b3fa..ba8b2842f7 100644
--- a/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -29,10 +30,14 @@ import org.l2jmobius.gameserver.model.skill.Skill;
public class GiveXp extends AbstractEffect
{
private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
_xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_10.2_MasterClass/dist/game/data/stats/items/47900-47999.xml b/L2J_Mobius_10.2_MasterClass/dist/game/data/stats/items/47900-47999.xml
index 5ed1537a46..290adb6f0b 100644
--- a/L2J_Mobius_10.2_MasterClass/dist/game/data/stats/items/47900-47999.xml
+++ b/L2J_Mobius_10.2_MasterClass/dist/game/data/stats/items/47900-47999.xml
@@ -186,9 +186,18 @@
+
+
+
+
+
+
+
+
+
-
diff --git a/L2J_Mobius_10.2_MasterClass/dist/game/data/stats/skills/18700-18799.xml b/L2J_Mobius_10.2_MasterClass/dist/game/data/stats/skills/18700-18799.xml
index be9b2624a7..7eba0ed3f6 100644
--- a/L2J_Mobius_10.2_MasterClass/dist/game/data/stats/skills/18700-18799.xml
+++ b/L2J_Mobius_10.2_MasterClass/dist/game/data/stats/skills/18700-18799.xml
@@ -2345,7 +2345,19 @@
icon.bm_nebit_exp_book
A1
4
+ 1
+ 47919
3000
+ true
+ SELF
+ SINGLE
+
+
+ 1000000000
+ 99
+ 20
+
+
diff --git a/L2J_Mobius_10.2_MasterClass/dist/game/data/xsd/skills.xsd b/L2J_Mobius_10.2_MasterClass/dist/game/data/xsd/skills.xsd
index 3fef9b94d0..d6466975f9 100644
--- a/L2J_Mobius_10.2_MasterClass/dist/game/data/xsd/skills.xsd
+++ b/L2J_Mobius_10.2_MasterClass/dist/game/data/xsd/skills.xsd
@@ -624,6 +624,7 @@
+
diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index df5410b3fa..ba8b2842f7 100644
--- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -29,10 +30,14 @@ import org.l2jmobius.gameserver.model.skill.Skill;
public class GiveXp extends AbstractEffect
{
private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
_xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/47900-47999.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/47900-47999.xml
index 38a162dd44..63b97ffa97 100644
--- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/47900-47999.xml
+++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/items/47900-47999.xml
@@ -186,9 +186,18 @@
+
+
+
+
+
+
+
+
+
-
diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/18700-18799.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/18700-18799.xml
index 6de097de5e..4e616ee90a 100644
--- a/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/18700-18799.xml
+++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/stats/skills/18700-18799.xml
@@ -2345,7 +2345,19 @@
icon.bm_nebit_exp_book
A1
4
+ 1
+ 47919
3000
+ true
+ SELF
+ SINGLE
+
+
+ 100000
+ 99
+ 20
+
+
diff --git a/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.9.5_Saviors/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_Classic_2.9.5_Saviors/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_Classic_2.9.5_Saviors/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_Classic_2.9.5_Saviors/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index df5410b3fa..ba8b2842f7 100644
--- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -29,10 +30,14 @@ import org.l2jmobius.gameserver.model.skill.Skill;
public class GiveXp extends AbstractEffect
{
private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
_xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/items/47900-47999.xml b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/items/47900-47999.xml
index 7ca475ce1a..9e59a12bf7 100644
--- a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/items/47900-47999.xml
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/items/47900-47999.xml
@@ -195,9 +195,18 @@
+
+
+
+
+
+
+
+
+
-
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/18700-18799.xml b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/18700-18799.xml
index 17b8e99383..e9efc07e5a 100644
--- a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/18700-18799.xml
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/18700-18799.xml
@@ -2104,7 +2104,19 @@
icon.bm_nebit_exp_book
A1
4
+ 1
+ 47919
3000
+ true
+ SELF
+ SINGLE
+
+
+ 1000000000
+ 99
+ 20
+
+
diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/xsd/skills.xsd b/L2J_Mobius_Classic_Interlude/dist/game/data/xsd/skills.xsd
index c6f0c09e32..377bbbf6b4 100644
--- a/L2J_Mobius_Classic_Interlude/dist/game/data/xsd/skills.xsd
+++ b/L2J_Mobius_Classic_Interlude/dist/game/data/xsd/skills.xsd
@@ -723,6 +723,7 @@
+
diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file
diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
index a4356e4c00..ba8b2842f7 100644
--- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
+++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
@@ -18,6 +18,7 @@ package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.Skill;
@@ -28,11 +29,15 @@ import org.l2jmobius.gameserver.model.skill.Skill;
*/
public class GiveXp extends AbstractEffect
{
- private final int _xp;
+ private final long _xp;
+ private final int _level;
+ private final double _percentage;
public GiveXp(StatSet params)
{
- _xp = params.getInt("xp", 0);
+ _xp = params.getLong("xp", 0);
+ _level = params.getInt("level", 0);
+ _percentage = params.getDouble("percentage", 0);
}
@Override
@@ -49,6 +54,17 @@ public class GiveXp extends AbstractEffect
return;
}
- effector.getActingPlayer().addExpAndSp(_xp, 0);
+ final Player player = effector.getActingPlayer();
+ final double amount;
+ if (player.getLevel() < _level)
+ {
+ amount = (_xp / 100.0) * _percentage;
+ }
+ else
+ {
+ amount = _xp;
+ }
+
+ player.addExpAndSp(amount, 0);
}
}
\ No newline at end of file