From 4a1a3ba9095fdf421d134b66ec72cf950388390e Mon Sep 17 00:00:00 2001
From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Sun, 29 Jul 2018 10:32:55 +0000
Subject: [PATCH] Refactored MaxVitalityItemsUsed to MinimumVitalityPoints.
---
.../gameserver/engines/DocumentBase.java | 6 +--
...va => ConditionMinimumVitalityPoints.java} | 6 +--
.../gameserver/engines/DocumentBase.java | 6 +--
...va => ConditionMinimumVitalityPoints.java} | 6 +--
.../gameserver/engines/DocumentBase.java | 6 +--
...va => ConditionMinimumVitalityPoints.java} | 6 +--
.../gameserver/engines/DocumentBase.java | 6 +--
...va => ConditionMinimumVitalityPoints.java} | 6 +--
.../gameserver/engines/DocumentBase.java | 6 +--
.../ConditionMaxVitalityItemsUsed.java | 46 -------------------
.../ConditionMinimumVitalityPoints.java | 46 +++++++++++++++++++
.../gameserver/engines/DocumentBase.java | 6 +--
.../ConditionMaxVitalityItemsUsed.java | 46 -------------------
.../ConditionMinimumVitalityPoints.java | 46 +++++++++++++++++++
.../gameserver/engines/DocumentBase.java | 6 +--
.../ConditionMaxVitalityItemsUsed.java | 46 -------------------
.../ConditionMinimumVitalityPoints.java | 46 +++++++++++++++++++
17 files changed, 171 insertions(+), 171 deletions(-)
rename L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/conditions/{ConditionMaxVitalityItemsUsed.java => ConditionMinimumVitalityPoints.java} (86%)
rename L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/conditions/{ConditionMaxVitalityItemsUsed.java => ConditionMinimumVitalityPoints.java} (86%)
rename L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/conditions/{ConditionMaxVitalityItemsUsed.java => ConditionMinimumVitalityPoints.java} (86%)
rename L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/conditions/{ConditionMaxVitalityItemsUsed.java => ConditionMinimumVitalityPoints.java} (86%)
delete mode 100644 L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
create mode 100644 L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
delete mode 100644 L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
create mode 100644 L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
delete mode 100644 L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
create mode 100644 L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/engines/DocumentBase.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/engines/DocumentBase.java
index de4873c37b..eddbcda479 100644
--- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/engines/DocumentBase.java
+++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/engines/DocumentBase.java
@@ -50,6 +50,7 @@ import com.l2jmobius.gameserver.model.conditions.ConditionLogicAnd;
import com.l2jmobius.gameserver.model.conditions.ConditionLogicNot;
import com.l2jmobius.gameserver.model.conditions.ConditionLogicOr;
import com.l2jmobius.gameserver.model.conditions.ConditionMinDistance;
+import com.l2jmobius.gameserver.model.conditions.ConditionMinimumVitalityPoints;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerActiveEffectId;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerActiveSkillId;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerAgathionId;
@@ -133,7 +134,6 @@ import com.l2jmobius.gameserver.model.conditions.ConditionTargetWeight;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingItemType;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingSkill;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingSlotType;
-import com.l2jmobius.gameserver.model.conditions.ConditionMaxVitalityItemsUsed;
import com.l2jmobius.gameserver.model.conditions.ConditionWithSkill;
import com.l2jmobius.gameserver.model.items.L2Item;
import com.l2jmobius.gameserver.model.items.type.ArmorType;
@@ -1091,10 +1091,10 @@ public abstract class DocumentBase
cond = joinAnd(cond, new ConditionTargetCheckCrtEffect(Boolean.parseBoolean(a.getNodeValue())));
break;
}
- case "maxvitalityitemsused":
+ case "minimumvitalitypoints":
{
final int count = Integer.decode(getValue(a.getNodeValue(), null));
- cond = joinAnd(cond, new ConditionMaxVitalityItemsUsed(count));
+ cond = joinAnd(cond, new ConditionMinimumVitalityPoints(count));
break;
}
}
diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
similarity index 86%
rename from L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
rename to L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
index 28728b992a..e33b61b892 100644
--- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
+++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
@@ -24,11 +24,11 @@ import com.l2jmobius.gameserver.model.skills.Skill;
/**
* @author Mobius
*/
-public class ConditionMaxVitalityItemsUsed extends Condition
+public class ConditionMinimumVitalityPoints extends Condition
{
private final int _count;
- public ConditionMaxVitalityItemsUsed(int count)
+ public ConditionMinimumVitalityPoints(int count)
{
_count = count;
}
@@ -39,7 +39,7 @@ public class ConditionMaxVitalityItemsUsed extends Condition
final L2PcInstance player = effector.getActingPlayer();
if (player != null)
{
- return player.getVitalityItemsUsed() < _count;
+ return player.getVitalityPoints() >= _count;
}
return false;
}
diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/engines/DocumentBase.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/engines/DocumentBase.java
index de4873c37b..eddbcda479 100644
--- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/engines/DocumentBase.java
+++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/engines/DocumentBase.java
@@ -50,6 +50,7 @@ import com.l2jmobius.gameserver.model.conditions.ConditionLogicAnd;
import com.l2jmobius.gameserver.model.conditions.ConditionLogicNot;
import com.l2jmobius.gameserver.model.conditions.ConditionLogicOr;
import com.l2jmobius.gameserver.model.conditions.ConditionMinDistance;
+import com.l2jmobius.gameserver.model.conditions.ConditionMinimumVitalityPoints;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerActiveEffectId;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerActiveSkillId;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerAgathionId;
@@ -133,7 +134,6 @@ import com.l2jmobius.gameserver.model.conditions.ConditionTargetWeight;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingItemType;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingSkill;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingSlotType;
-import com.l2jmobius.gameserver.model.conditions.ConditionMaxVitalityItemsUsed;
import com.l2jmobius.gameserver.model.conditions.ConditionWithSkill;
import com.l2jmobius.gameserver.model.items.L2Item;
import com.l2jmobius.gameserver.model.items.type.ArmorType;
@@ -1091,10 +1091,10 @@ public abstract class DocumentBase
cond = joinAnd(cond, new ConditionTargetCheckCrtEffect(Boolean.parseBoolean(a.getNodeValue())));
break;
}
- case "maxvitalityitemsused":
+ case "minimumvitalitypoints":
{
final int count = Integer.decode(getValue(a.getNodeValue(), null));
- cond = joinAnd(cond, new ConditionMaxVitalityItemsUsed(count));
+ cond = joinAnd(cond, new ConditionMinimumVitalityPoints(count));
break;
}
}
diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
similarity index 86%
rename from L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
rename to L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
index 28728b992a..e33b61b892 100644
--- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
+++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
@@ -24,11 +24,11 @@ import com.l2jmobius.gameserver.model.skills.Skill;
/**
* @author Mobius
*/
-public class ConditionMaxVitalityItemsUsed extends Condition
+public class ConditionMinimumVitalityPoints extends Condition
{
private final int _count;
- public ConditionMaxVitalityItemsUsed(int count)
+ public ConditionMinimumVitalityPoints(int count)
{
_count = count;
}
@@ -39,7 +39,7 @@ public class ConditionMaxVitalityItemsUsed extends Condition
final L2PcInstance player = effector.getActingPlayer();
if (player != null)
{
- return player.getVitalityItemsUsed() < _count;
+ return player.getVitalityPoints() >= _count;
}
return false;
}
diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/engines/DocumentBase.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/engines/DocumentBase.java
index de4873c37b..eddbcda479 100644
--- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/engines/DocumentBase.java
+++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/engines/DocumentBase.java
@@ -50,6 +50,7 @@ import com.l2jmobius.gameserver.model.conditions.ConditionLogicAnd;
import com.l2jmobius.gameserver.model.conditions.ConditionLogicNot;
import com.l2jmobius.gameserver.model.conditions.ConditionLogicOr;
import com.l2jmobius.gameserver.model.conditions.ConditionMinDistance;
+import com.l2jmobius.gameserver.model.conditions.ConditionMinimumVitalityPoints;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerActiveEffectId;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerActiveSkillId;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerAgathionId;
@@ -133,7 +134,6 @@ import com.l2jmobius.gameserver.model.conditions.ConditionTargetWeight;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingItemType;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingSkill;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingSlotType;
-import com.l2jmobius.gameserver.model.conditions.ConditionMaxVitalityItemsUsed;
import com.l2jmobius.gameserver.model.conditions.ConditionWithSkill;
import com.l2jmobius.gameserver.model.items.L2Item;
import com.l2jmobius.gameserver.model.items.type.ArmorType;
@@ -1091,10 +1091,10 @@ public abstract class DocumentBase
cond = joinAnd(cond, new ConditionTargetCheckCrtEffect(Boolean.parseBoolean(a.getNodeValue())));
break;
}
- case "maxvitalityitemsused":
+ case "minimumvitalitypoints":
{
final int count = Integer.decode(getValue(a.getNodeValue(), null));
- cond = joinAnd(cond, new ConditionMaxVitalityItemsUsed(count));
+ cond = joinAnd(cond, new ConditionMinimumVitalityPoints(count));
break;
}
}
diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
similarity index 86%
rename from L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
rename to L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
index 28728b992a..e33b61b892 100644
--- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
+++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
@@ -24,11 +24,11 @@ import com.l2jmobius.gameserver.model.skills.Skill;
/**
* @author Mobius
*/
-public class ConditionMaxVitalityItemsUsed extends Condition
+public class ConditionMinimumVitalityPoints extends Condition
{
private final int _count;
- public ConditionMaxVitalityItemsUsed(int count)
+ public ConditionMinimumVitalityPoints(int count)
{
_count = count;
}
@@ -39,7 +39,7 @@ public class ConditionMaxVitalityItemsUsed extends Condition
final L2PcInstance player = effector.getActingPlayer();
if (player != null)
{
- return player.getVitalityItemsUsed() < _count;
+ return player.getVitalityPoints() >= _count;
}
return false;
}
diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/engines/DocumentBase.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/engines/DocumentBase.java
index 3de87981f8..21bef5f95b 100644
--- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/engines/DocumentBase.java
+++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/engines/DocumentBase.java
@@ -50,6 +50,7 @@ import com.l2jmobius.gameserver.model.conditions.ConditionLogicAnd;
import com.l2jmobius.gameserver.model.conditions.ConditionLogicNot;
import com.l2jmobius.gameserver.model.conditions.ConditionLogicOr;
import com.l2jmobius.gameserver.model.conditions.ConditionMinDistance;
+import com.l2jmobius.gameserver.model.conditions.ConditionMinimumVitalityPoints;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerActiveEffectId;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerActiveSkillId;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerAgathionId;
@@ -132,7 +133,6 @@ import com.l2jmobius.gameserver.model.conditions.ConditionTargetWeight;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingItemType;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingSkill;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingSlotType;
-import com.l2jmobius.gameserver.model.conditions.ConditionMaxVitalityItemsUsed;
import com.l2jmobius.gameserver.model.conditions.ConditionWithSkill;
import com.l2jmobius.gameserver.model.items.L2Item;
import com.l2jmobius.gameserver.model.items.type.ArmorType;
@@ -1084,10 +1084,10 @@ public abstract class DocumentBase
cond = joinAnd(cond, new ConditionTargetCheckCrtEffect(Boolean.parseBoolean(a.getNodeValue())));
break;
}
- case "maxvitalityitemsused":
+ case "minimumvitalitypoints":
{
final int count = Integer.decode(getValue(a.getNodeValue(), null));
- cond = joinAnd(cond, new ConditionMaxVitalityItemsUsed(count));
+ cond = joinAnd(cond, new ConditionMinimumVitalityPoints(count));
break;
}
}
diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
similarity index 86%
rename from L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
rename to L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
index 28728b992a..e33b61b892 100644
--- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
+++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
@@ -24,11 +24,11 @@ import com.l2jmobius.gameserver.model.skills.Skill;
/**
* @author Mobius
*/
-public class ConditionMaxVitalityItemsUsed extends Condition
+public class ConditionMinimumVitalityPoints extends Condition
{
private final int _count;
- public ConditionMaxVitalityItemsUsed(int count)
+ public ConditionMinimumVitalityPoints(int count)
{
_count = count;
}
@@ -39,7 +39,7 @@ public class ConditionMaxVitalityItemsUsed extends Condition
final L2PcInstance player = effector.getActingPlayer();
if (player != null)
{
- return player.getVitalityItemsUsed() < _count;
+ return player.getVitalityPoints() >= _count;
}
return false;
}
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/engines/DocumentBase.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/engines/DocumentBase.java
index de4873c37b..eddbcda479 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/engines/DocumentBase.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/engines/DocumentBase.java
@@ -50,6 +50,7 @@ import com.l2jmobius.gameserver.model.conditions.ConditionLogicAnd;
import com.l2jmobius.gameserver.model.conditions.ConditionLogicNot;
import com.l2jmobius.gameserver.model.conditions.ConditionLogicOr;
import com.l2jmobius.gameserver.model.conditions.ConditionMinDistance;
+import com.l2jmobius.gameserver.model.conditions.ConditionMinimumVitalityPoints;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerActiveEffectId;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerActiveSkillId;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerAgathionId;
@@ -133,7 +134,6 @@ import com.l2jmobius.gameserver.model.conditions.ConditionTargetWeight;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingItemType;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingSkill;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingSlotType;
-import com.l2jmobius.gameserver.model.conditions.ConditionMaxVitalityItemsUsed;
import com.l2jmobius.gameserver.model.conditions.ConditionWithSkill;
import com.l2jmobius.gameserver.model.items.L2Item;
import com.l2jmobius.gameserver.model.items.type.ArmorType;
@@ -1091,10 +1091,10 @@ public abstract class DocumentBase
cond = joinAnd(cond, new ConditionTargetCheckCrtEffect(Boolean.parseBoolean(a.getNodeValue())));
break;
}
- case "maxvitalityitemsused":
+ case "minimumvitalitypoints":
{
final int count = Integer.decode(getValue(a.getNodeValue(), null));
- cond = joinAnd(cond, new ConditionMaxVitalityItemsUsed(count));
+ cond = joinAnd(cond, new ConditionMinimumVitalityPoints(count));
break;
}
}
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
deleted file mode 100644
index 28728b992a..0000000000
--- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.model.conditions;
-
-import com.l2jmobius.gameserver.model.actor.L2Character;
-import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.items.L2Item;
-import com.l2jmobius.gameserver.model.skills.Skill;
-
-/**
- * @author Mobius
- */
-public class ConditionMaxVitalityItemsUsed extends Condition
-{
- private final int _count;
-
- public ConditionMaxVitalityItemsUsed(int count)
- {
- _count = count;
- }
-
- @Override
- public boolean testImpl(L2Character effector, L2Character effected, Skill skill, L2Item item)
- {
- final L2PcInstance player = effector.getActingPlayer();
- if (player != null)
- {
- return player.getVitalityItemsUsed() < _count;
- }
- return false;
- }
-}
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
new file mode 100644
index 0000000000..e33b61b892
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
@@ -0,0 +1,46 @@
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.model.conditions;
+
+import com.l2jmobius.gameserver.model.actor.L2Character;
+import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.model.items.L2Item;
+import com.l2jmobius.gameserver.model.skills.Skill;
+
+/**
+ * @author Mobius
+ */
+public class ConditionMinimumVitalityPoints extends Condition
+{
+ private final int _count;
+
+ public ConditionMinimumVitalityPoints(int count)
+ {
+ _count = count;
+ }
+
+ @Override
+ public boolean testImpl(L2Character effector, L2Character effected, Skill skill, L2Item item)
+ {
+ final L2PcInstance player = effector.getActingPlayer();
+ if (player != null)
+ {
+ return player.getVitalityPoints() >= _count;
+ }
+ return false;
+ }
+}
diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/engines/DocumentBase.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/engines/DocumentBase.java
index de4873c37b..eddbcda479 100644
--- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/engines/DocumentBase.java
+++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/engines/DocumentBase.java
@@ -50,6 +50,7 @@ import com.l2jmobius.gameserver.model.conditions.ConditionLogicAnd;
import com.l2jmobius.gameserver.model.conditions.ConditionLogicNot;
import com.l2jmobius.gameserver.model.conditions.ConditionLogicOr;
import com.l2jmobius.gameserver.model.conditions.ConditionMinDistance;
+import com.l2jmobius.gameserver.model.conditions.ConditionMinimumVitalityPoints;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerActiveEffectId;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerActiveSkillId;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerAgathionId;
@@ -133,7 +134,6 @@ import com.l2jmobius.gameserver.model.conditions.ConditionTargetWeight;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingItemType;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingSkill;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingSlotType;
-import com.l2jmobius.gameserver.model.conditions.ConditionMaxVitalityItemsUsed;
import com.l2jmobius.gameserver.model.conditions.ConditionWithSkill;
import com.l2jmobius.gameserver.model.items.L2Item;
import com.l2jmobius.gameserver.model.items.type.ArmorType;
@@ -1091,10 +1091,10 @@ public abstract class DocumentBase
cond = joinAnd(cond, new ConditionTargetCheckCrtEffect(Boolean.parseBoolean(a.getNodeValue())));
break;
}
- case "maxvitalityitemsused":
+ case "minimumvitalitypoints":
{
final int count = Integer.decode(getValue(a.getNodeValue(), null));
- cond = joinAnd(cond, new ConditionMaxVitalityItemsUsed(count));
+ cond = joinAnd(cond, new ConditionMinimumVitalityPoints(count));
break;
}
}
diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
deleted file mode 100644
index 28728b992a..0000000000
--- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.model.conditions;
-
-import com.l2jmobius.gameserver.model.actor.L2Character;
-import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.items.L2Item;
-import com.l2jmobius.gameserver.model.skills.Skill;
-
-/**
- * @author Mobius
- */
-public class ConditionMaxVitalityItemsUsed extends Condition
-{
- private final int _count;
-
- public ConditionMaxVitalityItemsUsed(int count)
- {
- _count = count;
- }
-
- @Override
- public boolean testImpl(L2Character effector, L2Character effected, Skill skill, L2Item item)
- {
- final L2PcInstance player = effector.getActingPlayer();
- if (player != null)
- {
- return player.getVitalityItemsUsed() < _count;
- }
- return false;
- }
-}
diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
new file mode 100644
index 0000000000..e33b61b892
--- /dev/null
+++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
@@ -0,0 +1,46 @@
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.model.conditions;
+
+import com.l2jmobius.gameserver.model.actor.L2Character;
+import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.model.items.L2Item;
+import com.l2jmobius.gameserver.model.skills.Skill;
+
+/**
+ * @author Mobius
+ */
+public class ConditionMinimumVitalityPoints extends Condition
+{
+ private final int _count;
+
+ public ConditionMinimumVitalityPoints(int count)
+ {
+ _count = count;
+ }
+
+ @Override
+ public boolean testImpl(L2Character effector, L2Character effected, Skill skill, L2Item item)
+ {
+ final L2PcInstance player = effector.getActingPlayer();
+ if (player != null)
+ {
+ return player.getVitalityPoints() >= _count;
+ }
+ return false;
+ }
+}
diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/engines/DocumentBase.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/engines/DocumentBase.java
index de4873c37b..eddbcda479 100644
--- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/engines/DocumentBase.java
+++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/engines/DocumentBase.java
@@ -50,6 +50,7 @@ import com.l2jmobius.gameserver.model.conditions.ConditionLogicAnd;
import com.l2jmobius.gameserver.model.conditions.ConditionLogicNot;
import com.l2jmobius.gameserver.model.conditions.ConditionLogicOr;
import com.l2jmobius.gameserver.model.conditions.ConditionMinDistance;
+import com.l2jmobius.gameserver.model.conditions.ConditionMinimumVitalityPoints;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerActiveEffectId;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerActiveSkillId;
import com.l2jmobius.gameserver.model.conditions.ConditionPlayerAgathionId;
@@ -133,7 +134,6 @@ import com.l2jmobius.gameserver.model.conditions.ConditionTargetWeight;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingItemType;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingSkill;
import com.l2jmobius.gameserver.model.conditions.ConditionUsingSlotType;
-import com.l2jmobius.gameserver.model.conditions.ConditionMaxVitalityItemsUsed;
import com.l2jmobius.gameserver.model.conditions.ConditionWithSkill;
import com.l2jmobius.gameserver.model.items.L2Item;
import com.l2jmobius.gameserver.model.items.type.ArmorType;
@@ -1091,10 +1091,10 @@ public abstract class DocumentBase
cond = joinAnd(cond, new ConditionTargetCheckCrtEffect(Boolean.parseBoolean(a.getNodeValue())));
break;
}
- case "maxvitalityitemsused":
+ case "minimumvitalitypoints":
{
final int count = Integer.decode(getValue(a.getNodeValue(), null));
- cond = joinAnd(cond, new ConditionMaxVitalityItemsUsed(count));
+ cond = joinAnd(cond, new ConditionMinimumVitalityPoints(count));
break;
}
}
diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
deleted file mode 100644
index 28728b992a..0000000000
--- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/conditions/ConditionMaxVitalityItemsUsed.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.model.conditions;
-
-import com.l2jmobius.gameserver.model.actor.L2Character;
-import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.items.L2Item;
-import com.l2jmobius.gameserver.model.skills.Skill;
-
-/**
- * @author Mobius
- */
-public class ConditionMaxVitalityItemsUsed extends Condition
-{
- private final int _count;
-
- public ConditionMaxVitalityItemsUsed(int count)
- {
- _count = count;
- }
-
- @Override
- public boolean testImpl(L2Character effector, L2Character effected, Skill skill, L2Item item)
- {
- final L2PcInstance player = effector.getActingPlayer();
- if (player != null)
- {
- return player.getVitalityItemsUsed() < _count;
- }
- return false;
- }
-}
diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
new file mode 100644
index 0000000000..e33b61b892
--- /dev/null
+++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/conditions/ConditionMinimumVitalityPoints.java
@@ -0,0 +1,46 @@
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.model.conditions;
+
+import com.l2jmobius.gameserver.model.actor.L2Character;
+import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.model.items.L2Item;
+import com.l2jmobius.gameserver.model.skills.Skill;
+
+/**
+ * @author Mobius
+ */
+public class ConditionMinimumVitalityPoints extends Condition
+{
+ private final int _count;
+
+ public ConditionMinimumVitalityPoints(int count)
+ {
+ _count = count;
+ }
+
+ @Override
+ public boolean testImpl(L2Character effector, L2Character effected, Skill skill, L2Item item)
+ {
+ final L2PcInstance player = effector.getActingPlayer();
+ if (player != null)
+ {
+ return player.getVitalityPoints() >= _count;
+ }
+ return false;
+ }
+}