Addition of configurations for fake death target.
This commit is contained in:
@@ -159,6 +159,13 @@ AltPerfectShieldBlockRate = 10
|
||||
# Default: 666
|
||||
EffectTickRatio = 666
|
||||
|
||||
# Untarget player when uses fake death.
|
||||
FakeDeathUntarget = False
|
||||
|
||||
# Stand when fake death is active and taking damage.
|
||||
FakeDeathDamageStand = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Class, Sub-class and skill learning options
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package handlers.effecthandlers;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.model.StatsSet;
|
||||
import org.l2jmobius.gameserver.model.conditions.Condition;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
@@ -51,7 +52,7 @@ public final class CpDamPercent extends AbstractEffect
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.getEffected().isPlayer() && info.getEffected().getActingPlayer().isFakeDeath())
|
||||
if (info.getEffected().isPlayer() && info.getEffected().getActingPlayer().isFakeDeath() && Config.FAKE_DEATH_DAMAGE_STAND)
|
||||
{
|
||||
info.getEffected().stopFakeDeath(true);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package handlers.effecthandlers;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ShotType;
|
||||
import org.l2jmobius.gameserver.model.StatsSet;
|
||||
@@ -64,7 +65,7 @@ public final class DeathLink extends AbstractEffect
|
||||
final boolean sps = info.getSkill().useSpiritShot() && creature.isChargedShot(ShotType.SPIRITSHOTS);
|
||||
final boolean bss = info.getSkill().useSpiritShot() && creature.isChargedShot(ShotType.BLESSED_SPIRITSHOTS);
|
||||
|
||||
if (target.isPlayer() && target.getActingPlayer().isFakeDeath())
|
||||
if (target.isPlayer() && target.getActingPlayer().isFakeDeath() && Config.FAKE_DEATH_DAMAGE_STAND)
|
||||
{
|
||||
target.stopFakeDeath(true);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package handlers.effecthandlers;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ShotType;
|
||||
import org.l2jmobius.gameserver.model.StatsSet;
|
||||
@@ -62,7 +63,7 @@ public final class MagicalAttack extends AbstractEffect
|
||||
return;
|
||||
}
|
||||
|
||||
if (target.isPlayer() && target.getActingPlayer().isFakeDeath())
|
||||
if (target.isPlayer() && target.getActingPlayer().isFakeDeath() && Config.FAKE_DEATH_DAMAGE_STAND)
|
||||
{
|
||||
target.stopFakeDeath(true);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package handlers.effecthandlers;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ShotType;
|
||||
import org.l2jmobius.gameserver.model.StatsSet;
|
||||
@@ -61,7 +62,7 @@ public final class MagicalAttackByAbnormal extends AbstractEffect
|
||||
return;
|
||||
}
|
||||
|
||||
if (target.isPlayer() && target.getActingPlayer().isFakeDeath())
|
||||
if (target.isPlayer() && target.getActingPlayer().isFakeDeath() && Config.FAKE_DEATH_DAMAGE_STAND)
|
||||
{
|
||||
target.stopFakeDeath(true);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package handlers.effecthandlers;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ShotType;
|
||||
import org.l2jmobius.gameserver.model.StatsSet;
|
||||
@@ -61,7 +62,7 @@ public final class MagicalSoulAttack extends AbstractEffect
|
||||
return;
|
||||
}
|
||||
|
||||
if (target.isPlayer() && target.getActingPlayer().isFakeDeath())
|
||||
if (target.isPlayer() && target.getActingPlayer().isFakeDeath() && Config.FAKE_DEATH_DAMAGE_STAND)
|
||||
{
|
||||
target.stopFakeDeath(true);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package handlers.effecthandlers;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.enums.ShotType;
|
||||
import org.l2jmobius.gameserver.model.StatsSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@@ -77,7 +78,7 @@ public final class PhysicalAttack extends AbstractEffect
|
||||
return;
|
||||
}
|
||||
|
||||
if (target.isPlayer() && target.getActingPlayer().isFakeDeath())
|
||||
if (target.isPlayer() && target.getActingPlayer().isFakeDeath() && Config.FAKE_DEATH_DAMAGE_STAND)
|
||||
{
|
||||
target.stopFakeDeath(true);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package handlers.effecthandlers;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.enums.ShotType;
|
||||
import org.l2jmobius.gameserver.model.StatsSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@@ -77,7 +78,7 @@ public final class PhysicalSoulAttack extends AbstractEffect
|
||||
return;
|
||||
}
|
||||
|
||||
if (target.isPlayer() && target.getActingPlayer().isFakeDeath())
|
||||
if (target.isPlayer() && target.getActingPlayer().isFakeDeath() && Config.FAKE_DEATH_DAMAGE_STAND)
|
||||
{
|
||||
target.stopFakeDeath(true);
|
||||
}
|
||||
|
||||
@@ -174,6 +174,8 @@ public final class Config
|
||||
public static boolean ALT_GAME_SHIELD_BLOCKS;
|
||||
public static int ALT_PERFECT_SHLD_BLOCK;
|
||||
public static long EFFECT_TICK_RATIO;
|
||||
public static boolean FAKE_DEATH_UNTARGET;
|
||||
public static boolean FAKE_DEATH_DAMAGE_STAND;
|
||||
public static boolean ALLOW_CLASS_MASTERS;
|
||||
public static ClassMasterSettings CLASS_MASTER_SETTINGS;
|
||||
public static boolean ALLOW_ENTIRE_TREE;
|
||||
@@ -1759,6 +1761,8 @@ public final class Config
|
||||
ALT_GAME_SHIELD_BLOCKS = Character.getBoolean("AltShieldBlocks", false);
|
||||
ALT_PERFECT_SHLD_BLOCK = Character.getInt("AltPerfectShieldBlockRate", 10);
|
||||
EFFECT_TICK_RATIO = Character.getLong("EffectTickRatio", 666);
|
||||
FAKE_DEATH_UNTARGET = Character.getBoolean("FakeDeathUntarget", false);
|
||||
FAKE_DEATH_DAMAGE_STAND = Character.getBoolean("FakeDeathDamageStand", true);
|
||||
ALLOW_CLASS_MASTERS = Character.getBoolean("AllowClassMasters", false);
|
||||
ALLOW_ENTIRE_TREE = Character.getBoolean("AllowEntireTree", false);
|
||||
ALTERNATE_CLASS_MASTER = Character.getBoolean("AlternateClassMaster", false);
|
||||
|
||||
@@ -1096,7 +1096,7 @@ public class CreatureAI extends AbstractAI
|
||||
if ((target == null) || target.isAlikeDead())
|
||||
{
|
||||
// check if player is fakedeath
|
||||
if ((target != null) && target.isPlayer() && ((PlayerInstance) target).isFakeDeath())
|
||||
if ((target != null) && target.isPlayer() && ((PlayerInstance) target).isFakeDeath() && Config.FAKE_DEATH_DAMAGE_STAND)
|
||||
{
|
||||
target.stopFakeDeath(true);
|
||||
return false;
|
||||
@@ -1126,7 +1126,7 @@ public class CreatureAI extends AbstractAI
|
||||
*/
|
||||
protected boolean checkTargetLost(WorldObject target)
|
||||
{
|
||||
if ((target != null) && target.isPlayer() && ((PlayerInstance) target).isFakeDeath())
|
||||
if ((target != null) && target.isPlayer() && ((PlayerInstance) target).isFakeDeath() && Config.FAKE_DEATH_DAMAGE_STAND)
|
||||
{
|
||||
((PlayerInstance) target).stopFakeDeath(true);
|
||||
return false;
|
||||
|
||||
@@ -3116,6 +3116,18 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
stopMove(null);
|
||||
getAI().notifyEvent(CtrlEvent.EVT_FAKE_DEATH);
|
||||
broadcastPacket(new ChangeWaitType(this, ChangeWaitType.WT_START_FAKEDEATH));
|
||||
|
||||
// Remove target from those that have the untargetable creature on target.
|
||||
if (Config.FAKE_DEATH_UNTARGET)
|
||||
{
|
||||
World.getInstance().forEachVisibleObject(this, Creature.class, c ->
|
||||
{
|
||||
if (c.getTarget() == this)
|
||||
{
|
||||
c.setTarget(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.concurrent.Future;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
@@ -537,7 +538,7 @@ public final class CubicInstance implements IIdentifiable
|
||||
|
||||
if (target.isAlikeDead())
|
||||
{
|
||||
if (target.isPlayer())
|
||||
if (target.isPlayer() && Config.FAKE_DEATH_DAMAGE_STAND)
|
||||
{
|
||||
target.stopFakeDeath(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user