📄 l1silencepoison.java
字号:
/*
* 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 2, 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package l1j.server.server.model.poison;
import l1j.server.server.model.L1Character;
import l1j.server.server.model.skill.L1SkillId;
public class L1SilencePoison extends L1Poison {
private final L1Character _target;
public static boolean doInfection(L1Character cha) {
if (!L1Poison.isValidTarget(cha)) {
return false;
}
cha.setPoison(new L1SilencePoison(cha));
return true;
}
private L1SilencePoison(L1Character cha) {
_target = cha;
doInfection();
}
private void doInfection() {
_target.setPoisonEffect(1);
sendMessageIfPlayer(_target, 310);
_target.setSkillEffect(L1SkillId.STATUS_POISON_SILENCE, 0);
}
@Override
public int getEffectId() {
return 1;
}
@Override
public void cure() {
_target.setPoisonEffect(0);
sendMessageIfPlayer(_target, 311);
_target.killSkillEffectTimer(L1SkillId.STATUS_POISON_SILENCE);
_target.setPoison(null);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -