diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 6444457afa..78aa277cfa 100644
--- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3992,7 +3992,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
target.setCurrentCp(0);
}
- if (player.isDeathKnight())
+ if (player.isDeathKnight() && (target.isAttackable() || target.isPlayable()))
{
player.setDeathPoints(player.getDeathPoints() + 1);
}
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Creature.java
index d026c82b49..10bac243ba 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3999,7 +3999,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
target.setCurrentCp(0);
}
- if (player.isDeathKnight())
+ if (player.isDeathKnight() && (target.isAttackable() || target.isPlayable()))
{
player.setDeathPoints(player.getDeathPoints() + 1);
}
diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 976da9b0f8..56d4364346 100644
--- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -3999,7 +3999,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
target.setCurrentCp(0);
}
- if (player.isDeathKnight())
+ if (player.isDeathKnight() && (target.isAttackable() || target.isPlayable()))
{
player.setDeathPoints(player.getDeathPoints() + 1);
}
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/EffectMasterHandler.java
index cb7e56e8c5..0e5e176ca9 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -233,6 +233,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
+ EffectHandler.getInstance().registerHandler("ModifyBeastPoints", ModifyBeastPoints::new);
EffectHandler.getInstance().registerHandler("ModifyCraftPoints", ModifyCraftPoints::new);
EffectHandler.getInstance().registerHandler("ModifyDeathPoints", ModifyDeathPoints::new);
EffectHandler.getInstance().registerHandler("ModifyMagicLampPoints", ModifyMagicLampPoints::new);
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java
index da29ab90ed..4326c9f558 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java
@@ -27,6 +27,7 @@ public class SkillConditionMasterHandler
{
public static void main(String[] args)
{
+ SkillConditionHandler.getInstance().registerHandler("BeastPoints", BeastPointsSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("BuildAdvanceBase", BuildAdvanceBaseSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("BuildCamp", BuildCampSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CanAddMaxEntranceInzone", CanAddMaxEntranceInzoneSkillCondition::new);
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java
index 971461c126..cdfa5844ad 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java
@@ -434,6 +434,17 @@ public class AdminEditChar implements IAdminCommandHandler
{
player.getAppearance().setMale();
player.disarmShield();
+ if (!player.isVanguard())
+ {
+ player.setVanguard(true);
+ }
+ }
+ else
+ {
+ if (player.isVanguard())
+ {
+ player.setVanguard(false);
+ }
}
final String newclass = ClassListData.getInstance().getClass(player.getClassId()).getClassName();
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/ModifyBeastPoints.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/ModifyBeastPoints.java
new file mode 100644
index 0000000000..1310a21395
--- /dev/null
+++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/ModifyBeastPoints.java
@@ -0,0 +1,60 @@
+/*
+ * 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 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;
+
+/**
+ * @author Mobius
+ */
+public class ModifyBeastPoints extends AbstractEffect
+{
+ private final int _amount;
+
+ public ModifyBeastPoints(StatSet params)
+ {
+ _amount = params.getInt("amount");
+ }
+
+ @Override
+ public boolean isInstant()
+ {
+ return true;
+ }
+
+ @Override
+ public void instant(Creature effector, Creature effected, Skill skill, Item item)
+ {
+ if (effected == null)
+ {
+ return;
+ }
+
+ final Player player = effected.getActingPlayer();
+ if (player == null)
+ {
+ return;
+ }
+
+ player.setBeastPoints(player.getBeastPoints() + _amount);
+ }
+}
\ No newline at end of file
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/skillconditionhandlers/BeastPointsSkillCondition.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/skillconditionhandlers/BeastPointsSkillCondition.java
new file mode 100644
index 0000000000..5cc03a8d67
--- /dev/null
+++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/skillconditionhandlers/BeastPointsSkillCondition.java
@@ -0,0 +1,42 @@
+/*
+ * 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 handlers.skillconditionhandlers;
+
+import org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.WorldObject;
+import org.l2jmobius.gameserver.model.actor.Creature;
+import org.l2jmobius.gameserver.model.skill.ISkillCondition;
+import org.l2jmobius.gameserver.model.skill.Skill;
+
+/**
+ * @author Mobius
+ */
+public class BeastPointsSkillCondition implements ISkillCondition
+{
+ private final int _amount;
+
+ public BeastPointsSkillCondition(StatSet params)
+ {
+ _amount = params.getInt("amount");
+ }
+
+ @Override
+ public boolean canUse(Creature caster, Skill skill, WorldObject target)
+ {
+ return caster.getActingPlayer().getBeastPoints() >= _amount;
+ }
+}
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10950_FiercestFlame/Q10950_FiercestFlame.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10950_FiercestFlame/Q10950_FiercestFlame.java
index 9543ce2e73..d09c8966c9 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10950_FiercestFlame/Q10950_FiercestFlame.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10950_FiercestFlame/Q10950_FiercestFlame.java
@@ -17,8 +17,6 @@
package quests.Q10950_FiercestFlame;
import org.l2jmobius.Config;
-import org.l2jmobius.gameserver.data.xml.CategoryData;
-import org.l2jmobius.gameserver.enums.CategoryType;
import org.l2jmobius.gameserver.enums.Race;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
@@ -235,7 +233,7 @@ public class Q10950_FiercestFlame extends Quest
return;
}
- if ((player.getRace() != Race.ORC) || CategoryData.getInstance().isInCategory(CategoryType.VANGUARD_ALL_CLASS, player.getClassId().getId()))
+ if ((player.getRace() != Race.ORC) || player.isVanguard())
{
return;
}
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10951_NewFlameOfOrcs/Q10951_NewFlameOfOrcs.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10951_NewFlameOfOrcs/Q10951_NewFlameOfOrcs.java
index 5042d4dcdb..a271220af2 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10951_NewFlameOfOrcs/Q10951_NewFlameOfOrcs.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10951_NewFlameOfOrcs/Q10951_NewFlameOfOrcs.java
@@ -17,8 +17,6 @@
package quests.Q10951_NewFlameOfOrcs;
import org.l2jmobius.Config;
-import org.l2jmobius.gameserver.data.xml.CategoryData;
-import org.l2jmobius.gameserver.enums.CategoryType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.events.EventType;
@@ -145,7 +143,7 @@ public class Q10951_NewFlameOfOrcs extends Quest
@Override
public String onTalk(Npc npc, Player player)
{
- if (!CategoryData.getInstance().isInCategory(CategoryType.VANGUARD_ALL_CLASS, player.getClassId().getId()))
+ if (!player.isVanguard())
{
return "no_race.html";
}
@@ -234,7 +232,7 @@ public class Q10951_NewFlameOfOrcs extends Quest
return;
}
- if (!CategoryData.getInstance().isInCategory(CategoryType.VANGUARD_ALL_CLASS, player.getClassId().getId()))
+ if (!player.isVanguard())
{
return;
}
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/documentation.txt
index 915062c17a..7055e56354 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/documentation.txt
@@ -203,6 +203,7 @@ MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
+ModifyBeastPoints: Modifies player Beast Point count. (l2jmobius)
ModifyCraftPoints: Modifies player Craft Point count. (l2jmobius)
ModifyDeathPoints: Modifies player Death Point count. (l2jmobius)
ModifyMagicLampPoints: Modifies player MagicLamp point count. (l2jmobius)
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/enums/StatusUpdateType.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/enums/StatusUpdateType.java
index f3c785c01c..22b2fd806f 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/enums/StatusUpdateType.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/enums/StatusUpdateType.java
@@ -55,7 +55,10 @@ public enum StatusUpdateType
MAX_CP(0x22, Creature::getMaxCp),
CUR_DP(0x28, creature -> creature.isPlayer() ? creature.getActingPlayer().getDeathPoints() : 0),
- MAX_DP(0x29, creature -> creature.isPlayer() ? creature.getActingPlayer().getMaxDeathPoints() : 0);
+ MAX_DP(0x29, creature -> creature.isPlayer() ? creature.getActingPlayer().getMaxDeathPoints() : 0),
+
+ CUR_BP(0x2B, creature -> creature.isPlayer() ? creature.getActingPlayer().getBeastPoints() : 0),
+ MAX_BP(0x2C, creature -> creature.isPlayer() ? creature.getActingPlayer().getMaxBeastPoints() : 0);
private int _clientId;
private Function _valueSupplier;
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/Creature.java
index 976da9b0f8..776f2eb5b0 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -4001,7 +4001,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
if (player.isDeathKnight())
{
- player.setDeathPoints(player.getDeathPoints() + 1);
+ if (target.isAttackable() || target.isPlayable())
+ {
+ player.setDeathPoints(player.getDeathPoints() + 1);
+ }
+ }
+ else if (player.isVanguard())
+ {
+ if (target.isAttackable() || target.isPlayable())
+ {
+ player.setBeastPoints(player.getBeastPoints() + 1);
+ }
}
}
}
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/Player.java
index 73a8874257..b3b938afc5 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/Player.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/Player.java
@@ -502,6 +502,7 @@ public class Player extends Playable
protected int _activeClass;
protected int _classIndex = 0;
private boolean _isDeathKnight = false;
+ private boolean _isVanguard = false;
/** data for mounted pets */
private int _controlItemId;
@@ -748,6 +749,10 @@ public class Player extends Playable
private int _deathPoints = 0;
private int _maxDeathPoints = 0;
+ // Beast points
+ private int _beastPoints = 0;
+ private int _maxBeastPoints = 0;
+
// WorldPosition used by TARGET_SIGNET_GROUND
private Location _currentSkillWorldPosition;
@@ -6814,6 +6819,10 @@ public class Player extends Playable
{
player._isDeathKnight = true;
}
+ else if (CategoryData.getInstance().isInCategory(CategoryType.VANGUARD_ALL_CLASS, player.getBaseTemplate().getClassId().getId()))
+ {
+ player._isVanguard = true;
+ }
player.setApprentice(rset.getInt("apprentice"));
player.setSponsor(rset.getInt("sponsor"));
@@ -8835,6 +8844,19 @@ public class Player extends Playable
_isDeathKnight = value;
}
+ /**
+ * @return True if the Player is a Vanguard.
+ */
+ public boolean isVanguard()
+ {
+ return _isVanguard;
+ }
+
+ public void setVanguard(boolean value)
+ {
+ _isVanguard = value;
+ }
+
public boolean isMounted()
{
return _mountType != MountType.NONE;
@@ -11187,6 +11209,12 @@ public class Player extends Playable
getVariables().set(PlayerVariables.DEATH_POINT_COUNT, _deathPoints);
}
+ // Store beast points.
+ if (_isVanguard)
+ {
+ getVariables().set(PlayerVariables.BEAST_POINT_COUNT, _beastPoints);
+ }
+
// Make sure player variables are stored.
getVariables().storeMe();
@@ -11879,6 +11907,31 @@ public class Player extends Playable
sendPacket(su);
}
+ public int getBeastPoints()
+ {
+ return _beastPoints;
+ }
+
+ public int getMaxBeastPoints()
+ {
+ return _maxBeastPoints;
+ }
+
+ public void setBeastPoints(int value)
+ {
+ // TODO: Implement?
+ _maxBeastPoints = 500;
+
+ // Set current points.
+ _beastPoints = Math.min(_maxBeastPoints, Math.max(0, value));
+
+ // Send StatusUpdate.
+ final StatusUpdate su = new StatusUpdate(this);
+ computeStatusUpdate(su, StatusUpdateType.MAX_BP);
+ computeStatusUpdate(su, StatusUpdateType.CUR_BP);
+ sendPacket(su);
+ }
+
@Override
public Player getActingPlayer()
{
@@ -14375,10 +14428,14 @@ public class Player extends Playable
addStatusUpdateValue(StatusUpdateType.LEVEL);
addStatusUpdateValue(StatusUpdateType.MAX_CP);
addStatusUpdateValue(StatusUpdateType.CUR_CP);
- if (isDeathKnight())
+ if (_isDeathKnight)
{
addStatusUpdateValue(StatusUpdateType.CUR_DP);
}
+ else if (_isVanguard)
+ {
+ addStatusUpdateValue(StatusUpdateType.CUR_BP);
+ }
}
public TrainingHolder getTraingCampInfo()
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/variables/PlayerVariables.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/variables/PlayerVariables.java
index 9456d4e658..46bd289ae0 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/variables/PlayerVariables.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/variables/PlayerVariables.java
@@ -67,6 +67,7 @@ public class PlayerVariables extends AbstractVariables
public static final String MAGIC_LAMP_EXP = "MAGIC_LAMP_EXP";
public static final String MAGIC_LAMP_COUNT = "MAGIC_LAMP_COUNT";
public static final String DEATH_POINT_COUNT = "DEATH_POINT_COUNT";
+ public static final String BEAST_POINT_COUNT = "BEAST_POINT_COUNT";
public static final String FAVORITE_TELEPORTS = "FAVORITE_TELEPORTS";
public static final String ELIXIRS_AVAILABLE = "ELIXIRS_AVAILABLE";
public static final String ELIXIRS_USED = "ELIXIRS_USED";
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/EnterWorld.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/EnterWorld.java
index e3c6f5c1af..6494ae921e 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/EnterWorld.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/EnterWorld.java
@@ -651,6 +651,12 @@ public class EnterWorld implements IClientIncomingPacket
player.setDeathPoints(500);
player.setDeathPoints(player.getVariables().getInt(PlayerVariables.DEATH_POINT_COUNT, 0));
}
+ // Vanguard beast points init.
+ else if (player.isVanguard())
+ {
+ player.setBeastPoints(500);
+ player.setBeastPoints(player.getVariables().getInt(PlayerVariables.BEAST_POINT_COUNT, 0));
+ }
// Sayha's Grace.
if (Config.ENABLE_VITALITY)