Lineage Justice

Spells & Skills

Lookup and validate skills and spells.

GreaterHaste
MP: 60 HP: 0 Item: None Amount: N/A Duration: 2400 Skill Type: Change
Delay: 10 Cast Invis: Yes Ignores CM: Yes Element: Wind Range: N/A Area: N/A
Dmg Value: 0.0 Dmg Dice: 0 Dice Count: 0 Prob Value: 0 Prob Dice: 0 Prob Max: N/A
L1SkillUse Execution:

if (_skillId == GREATER_HASTE) {
	L1PcInstance pc = (L1PcInstance) cha;
	if (pc.getHasteItemEquipped() > 0) {
		continue;
	}
	if (pc.getMoveSpeed() != 2) {
		_skill.newBuffSkillExecutor().addEffect(_user, cha, buffIconDuration);
	} else {
		int skillNum = 0;
		if (pc.hasSkillEffect(SLOW)) {
			skillNum = SLOW;
		} else if (pc.hasSkillEffect(MASS_SLOW)) {
			skillNum = MASS_SLOW;
		} else if (pc.hasSkillEffect(ENTANGLE)) {
			skillNum = ENTANGLE;
		}
		if (skillNum != 0) {
			pc.removeSkillEffect(skillNum);
			pc.removeSkillEffect(GREATER_HASTE);
			pc.setMoveSpeed(0);
			continue;
		}
	}
}
Add Effect:

@Override
public void addEffect(L1Character user, L1Character target,
		int durationSeconds) {
	
	if (target instanceof L1PcInstance) {
		L1PcInstance pc = (L1PcInstance) target;
		pc.setDrink(false);
		pc.setMoveSpeed(1);
		pc.sendPackets(new S_SkillHaste(pc.getId(), 1,
				durationSeconds));
		pc.broadcastPacket(new S_SkillHaste(pc.getId(), 1,
				0));
	}
	
}
Remove Effect:

@Override
public void removeEffect(L1Character target) {
	
	target.setMoveSpeed(0);
	if (target instanceof L1PcInstance) {
		L1PcInstance pc = (L1PcInstance) target;
		pc.sendPackets(new S_SkillHaste(pc.getId(), 0, 0));
		pc.broadcastPacket(new S_SkillHaste(pc.getId(), 0, 0));
	}
	
}