Lineage Justice
Spells & Skills
Lookup and validate skills and spells.
|
Polymorph
|
MP:
|
80
|
HP:
|
0
|
Item:
|
40318
|
Amount:
|
1
|
Duration:
|
7200
|
Skill Type:
|
Change
|
Delay:
|
10
|
Cast Invis:
|
Yes
|
Ignores CM:
|
Yes
|
Element:
|
None
|
Range:
|
20
|
Area:
|
N/A
|
Dmg Value:
|
0.0
|
Dmg Dice:
|
0
|
Dice Count:
|
0
|
Prob Value:
|
0
|
Prob Dice:
|
0
|
Prob Max:
|
N/A
|
Add Effect:
public static void doPoly(L1Character cha, int polyId, int timeSecs,
int cause) {
if (cha == null || cha.isDead()) {
return;
}
if (cha instanceof L1PcInstance) {
L1PcInstance pc = (L1PcInstance) cha;
if (pc.getMapId() == 5124
|| pc.getMap().getBaseMapId()==9000
|| pc.getMap().getBaseMapId()==9101
) {
pc.sendPackets(new S_ServerMessage(1170));
return;
}
if (pc.getTempCharGfx() == 6034 || pc.getTempCharGfx() == 6035) {
pc.sendPackets(new S_ServerMessage(181)); //
return;
}
if (!isMatchCause(polyId, cause)) {
pc.sendPackets(new S_ServerMessage(181)); //
return;
}
pc.killSkillEffectTimer(L1SkillId.SHAPE_CHANGE);
pc.setSkillEffect(L1SkillId.SHAPE_CHANGE, timeSecs * 1000);
if (pc.getTempCharGfx() != polyId) {
L1ItemInstance weapon = pc.getWeapon();
boolean weaponTakeoff = (weapon != null && !isEquipableWeapon(
polyId, weapon.getItem().getType()));
pc.setTempCharGfx(polyId);
pc.sendPackets(new S_ChangeShape(pc.getId(), polyId,
weaponTakeoff));
if (!pc.isGmInvis() && !pc.isInvisble()) {
pc.broadcastPacket(new S_ChangeShape(pc.getId(), polyId));
}
if (pc.isGmInvis()) {
} else if (pc.isInvisble()) {
pc.broadcastPacketForFindInvis(new S_ChangeShape(
pc.getId(), polyId), true);
} else {
pc.broadcastPacket(new S_ChangeShape(pc.getId(), polyId));
}
pc.getInventory().takeoffEquip(polyId);
weapon = pc.getWeapon();
if (weapon != null) {
S_CharVisualUpdate charVisual = new S_CharVisualUpdate(pc);
pc.sendPackets(charVisual);
pc.broadcastPacket(charVisual);
}
}
pc.sendPackets(new S_SkillIconGFX(35, timeSecs));
} else if (cha instanceof L1MonsterInstance) {
L1MonsterInstance mob = (L1MonsterInstance) cha;
mob.killSkillEffectTimer(SHAPE_CHANGE);
mob.setSkillEffect(SHAPE_CHANGE, timeSecs * 1000);
if (mob.getTempCharGfx() != polyId) {
mob.setTempCharGfx(polyId);
mob.broadcastPacket(new S_ChangeShape(mob.getId(), polyId));
}
}
}