Removed unused death penalty stuff.

This commit is contained in:
MobiusDev
2018-04-06 15:02:45 +00:00
parent dce3221509
commit 16fba600f3
24 changed files with 0 additions and 448 deletions

View File

@@ -150,7 +150,6 @@ public final class Config
public static boolean DECREASE_SKILL_LEVEL;
public static double ALT_WEIGHT_LIMIT;
public static int RUN_SPD_BOOST;
public static int DEATH_PENALTY_CHANCE;
public static double RESPAWN_RESTORE_CP;
public static double RESPAWN_RESTORE_HP;
public static double RESPAWN_RESTORE_MP;
@@ -1402,7 +1401,6 @@ public final class Config
DECREASE_SKILL_LEVEL = Character.getBoolean("DecreaseSkillOnDelevel", true);
ALT_WEIGHT_LIMIT = Character.getDouble("AltWeightLimit", 1);
RUN_SPD_BOOST = Character.getInt("RunSpeedBoost", 0);
DEATH_PENALTY_CHANCE = Character.getInt("DeathPenaltyChance", 20);
RESPAWN_RESTORE_CP = Character.getDouble("RespawnRestoreCP", 0) / 100;
RESPAWN_RESTORE_HP = Character.getDouble("RespawnRestoreHP", 65) / 100;
RESPAWN_RESTORE_MP = Character.getDouble("RespawnRestoreMP", 0) / 100;

View File

@@ -5011,9 +5011,6 @@ public final class L2PcInstance extends L2Playable
}
}
// calculate Shilen's Breath debuff level
calculateShilensBreathDebuffLevel(killer);
if (isMounted())
{
stopFeed();
@@ -11372,89 +11369,6 @@ public final class L2PcInstance extends L2Playable
}
}
public int getShilensBreathDebuffLevel()
{
final BuffInfo buff = getEffectList().getBuffInfoBySkillId(CommonSkill.SHILENS_BREATH.getId());
return buff == null ? 0 : buff.getSkill().getLevel();
}
public void calculateShilensBreathDebuffLevel(L2Character killer)
{
if (killer == null)
{
_log.warning(this + " called calculateShilensBreathDebuffLevel with killer null!");
return;
}
if (isResurrectSpecialAffected() || isLucky() || isBlockedFromDeathPenalty() || isInsideZone(ZoneId.PVP) || isInsideZone(ZoneId.SIEGE) || canOverrideCond(PcCondOverride.DEATH_PENALTY))
{
return;
}
double percent = 1.0;
if (killer.isRaid())
{
percent *= getStat().getValue(Stats.REDUCE_DEATH_PENALTY_BY_RAID, 1);
}
else if (killer.isMonster())
{
percent *= getStat().getValue(Stats.REDUCE_DEATH_PENALTY_BY_MOB, 1);
}
else if (killer.isPlayable())
{
percent *= getStat().getValue(Stats.REDUCE_DEATH_PENALTY_BY_PVP, 1);
}
if ((killer.isNpc() && ((L2Npc) killer).getTemplate().isDeathPenalty()) || (Rnd.get(1, 100) <= ((Config.DEATH_PENALTY_CHANCE) * percent)))
{
if (!killer.isPlayable() || (getReputation() < 0))
{
increaseShilensBreathDebuff();
}
}
}
public void increaseShilensBreathDebuff()
{
int nextLv = getShilensBreathDebuffLevel() + 1;
if (nextLv > 5)
{
nextLv = 5;
}
final Skill skill = SkillData.getInstance().getSkill(CommonSkill.SHILENS_BREATH.getId(), nextLv);
if (skill != null)
{
skill.applyEffects(this, this);
sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_VE_BEEN_AFFLICTED_BY_SHILEN_S_BREATH_LEVEL_S1).addInt(nextLv));
}
}
public void decreaseShilensBreathDebuff()
{
final int nextLv = getShilensBreathDebuffLevel() - 1;
if (nextLv > 0)
{
final Skill skill = SkillData.getInstance().getSkill(CommonSkill.SHILENS_BREATH.getId(), nextLv);
skill.applyEffects(this, this);
sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_VE_BEEN_AFFLICTED_BY_SHILEN_S_BREATH_LEVEL_S1).addInt(nextLv));
}
else
{
sendPacket(SystemMessageId.SHILEN_S_BREATH_HAS_BEEN_PURIFIED);
}
}
public void setShilensBreathDebuffLevel(int level)
{
if (level > 0)
{
final Skill skill = SkillData.getInstance().getSkill(CommonSkill.SHILENS_BREATH.getId(), level);
skill.applyEffects(this, this);
sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_VE_BEEN_AFFLICTED_BY_SHILEN_S_BREATH_LEVEL_S1).addInt(level));
}
}
@Override
public L2PcInstance getActingPlayer()
{

View File

@@ -48,7 +48,6 @@ public enum CommonSkill
CREATE_COMMON(1320, 1),
DIVINE_INSPIRATION(1405, 1),
CARAVANS_SECRET_MEDICINE(2341, 1),
SHILENS_BREATH(14571, 1),
IMPRIT_OF_LIGHT(19034, 1),
IMPRIT_OF_DARKNESS(19035, 1),
ABILITY_OF_LIGHT(19032, 1),