Lineage Justice

Spells & Skills

Lookup and validate skills and spells.

ShadowFang
MP: 20 HP: 0 Item: 40321 Amount: 1 Duration: 192 Skill Type: Change
Delay: 0 Cast Invis: Yes Ignores CM: Yes Element: None 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 == SHADOW_FANG) {
	L1PcInstance pc = (L1PcInstance) cha;
	L1ItemInstance item = pc.getInventory().getItem(
			_itemobjid);
	if (item != null && item.getItem().getType2() == 1) {
		item.setSkillWeaponEnchant(pc, _skillId,
				_skill.getBuffDuration() * 1000);
	} else {
		pc.sendPackets(new S_ServerMessage(79)); // Nothing happened.
	}
}
L1ItemInstance Effect:

public void setSkillWeaponEnchant(L1PcInstance pc, int skillId,
		int skillTime) {
	if (getItem().getType2() != 1) {
		return;
	}
	if (_isRunning) {
		_timer.cancel();
		setDmgByMagic(0);
		setHolyDmgByMagic(0);
		setHitByMagic(0);
		_isRunning = false;
		_timer = null;
	}

	switch (skillId) {
	case HOLY_WEAPON:
		setHolyDmgByMagic(1);
		setHitByMagic(1);
		break;

	case ENCHANT_WEAPON:
		setDmgByMagic(2);
		break;

	case BLESS_WEAPON:
		setDmgByMagic(2);
		setHitByMagic(2);
		break;

	case SHADOW_FANG:
		setDmgByMagic(5);
		break;

	default:
		break;
	}

	_pc = pc;
	_timer = new EnchantTimer();
	(new Timer("EnchantTimer-"+_pc.getName())).schedule(_timer, skillTime);
	_isRunning = true;
}