Lineage Justice
Spells & Skills
Lookup and validate skills and spells.
|
CallPledgeMember
|
MP:
|
30
|
HP:
|
0
|
Item:
|
None
|
Amount:
|
N/A
|
Duration:
|
0
|
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 == CALL_CLAN) {
L1PcInstance pc = (L1PcInstance) cha;
L1PcInstance clanPc = (L1PcInstance) L1World
.getInstance().findObject(_targetID);
if (clanPc != null) {
clanPc.setTempID(pc.getId());
clanPc.sendPackets(new S_MessageYN(729, ""));
}
Y/N Response:
case 729:
c = readH();
if (c == 0) { // No
;
} else if (c == 1) { // Yes
callClan(pc);
}
break;
private void callClan(L1PcInstance pc) {
L1PcInstance callClanPc = (L1PcInstance) L1World.getInstance()
.findObject(pc.getTempID());
pc.setTempID(0);
if (callClanPc == null) {
return;
}
if (!pc.getMap().isEscapable() && !pc.isGm()) {
pc.sendPackets(new S_ServerMessage(647));
L1Teleport.teleport(pc, pc.getLocation(), pc.getHeading(), false);
return;
}
if (pc.getId() != callClanPc.getCallClanId()) {
return;
}
boolean isInWarArea = false;
int castleId = L1CastleLocation.getCastleIdByArea(callClanPc);
if (castleId != 0) {
isInWarArea = true;
if (!WarTimeController.getInstance().isNowWar(castleId)) {
isInWarArea = false;
}
}
short mapId = callClanPc.getMapId();
if (mapId != 0 && mapId != 4 && mapId != 304 || isInWarArea) {
pc.sendPackets(new S_ServerMessage(547));
return;
}
L1Map map = callClanPc.getMap();
int locX = callClanPc.getX();
int locY = callClanPc.getY();
int heading = callClanPc.getCallClanHeading();
locX += HEADING_TABLE_X[heading];
locY += HEADING_TABLE_Y[heading];
heading = (heading + 4) % 4;
boolean isExsistCharacter = false;
for (L1Object object : L1World.getInstance().getVisibleObjects(
callClanPc, 1)) {
if (object instanceof L1Character) {
L1Character cha = (L1Character) object;
if (cha.getX() == locX && cha.getY() == locY
&& cha.getMapId() == mapId) {
isExsistCharacter = true;
break;
}
}
}
if (locX == 0 && locY == 0 || !map.isPassable(locX, locY)
|| isExsistCharacter) {
pc.sendPackets(new S_ServerMessage(627));
return;
}
L1Teleport.teleport(pc, locX, locY, mapId, heading, true,
L1Teleport.CALL_CLAN);
}