Sync with L2jServer HighFive Nov 14th 2015.

This commit is contained in:
MobiusDev
2015-11-14 16:31:37 +00:00
parent 887fbcc6b5
commit e38353e409
125 changed files with 1998 additions and 1419 deletions

View File

@@ -22,13 +22,14 @@ import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.conditions.Condition;
import com.l2jserver.gameserver.model.effects.AbstractEffect;
import com.l2jserver.gameserver.model.effects.EffectFlag;
import com.l2jserver.gameserver.model.effects.L2EffectType;
/**
* Invincible effect implementation.
* @author Zealar
*/
public final class Invincible extends AbstractEffect
public final class BlockBuff extends AbstractEffect
{
public Invincible(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
public BlockBuff(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
{
super(attachCond, applyCond, set, params);
}
@@ -36,6 +37,12 @@ public final class Invincible extends AbstractEffect
@Override
public int getEffectFlags()
{
return EffectFlag.INVUL.getMask();
return EffectFlag.BLOCK_BUFF.getMask();
}
@Override
public L2EffectType getEffectType()
{
return L2EffectType.BLOCK_BUFF;
}
}

View File

@@ -18,41 +18,40 @@
*/
package handlers.effecthandlers;
import com.l2jserver.gameserver.ai.CtrlEvent;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.conditions.Condition;
import com.l2jserver.gameserver.model.effects.AbstractEffect;
import com.l2jserver.gameserver.model.effects.EffectFlag;
import com.l2jserver.gameserver.model.skills.BuffInfo;
import com.l2jserver.gameserver.model.effects.L2EffectType;
/**
* Petrification effect implementation.
* @author Zealar
*/
public final class Petrification extends AbstractEffect
public final class BlockDamage extends AbstractEffect
{
public Petrification(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
public enum BlockType
{
HP,
MP
}
private final BlockType _type;
public BlockDamage(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
{
super(attachCond, applyCond, set, params);
_type = params.getEnum("type", BlockType.class, BlockType.HP);
}
@Override
public int getEffectFlags()
{
return EffectFlag.PARALYZED.getMask() | EffectFlag.INVUL.getMask();
return _type == BlockType.HP ? EffectFlag.BLOCK_HP.getMask() : EffectFlag.BLOCK_MP.getMask();
}
@Override
public void onExit(BuffInfo info)
public L2EffectType getEffectType()
{
if (!info.getEffected().isPlayer())
{
info.getEffected().getAI().notifyEvent(CtrlEvent.EVT_THINK);
}
}
@Override
public void onStart(BuffInfo info)
{
info.getEffected().startParalyze();
return L2EffectType.BLOCK_DAMAGE;
}
}

View File

@@ -0,0 +1,48 @@
/*
* Copyright (C) 2004-2015 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack 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.
*
* L2J DataPack 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 <http://www.gnu.org/licenses/>.
*/
package handlers.effecthandlers;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.conditions.Condition;
import com.l2jserver.gameserver.model.effects.AbstractEffect;
import com.l2jserver.gameserver.model.effects.EffectFlag;
import com.l2jserver.gameserver.model.effects.L2EffectType;
/**
* @author Zealar
*/
public final class BlockDebuff extends AbstractEffect
{
public BlockDebuff(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
{
super(attachCond, applyCond, set, params);
}
@Override
public int getEffectFlags()
{
return EffectFlag.BLOCK_DEBUFF.getMask();
}
@Override
public L2EffectType getEffectType()
{
return L2EffectType.BLOCK_DEBUFF;
}
}