mirror of
https://bitbucket.org/projectswg/cucore.git
synced 2026-07-14 23:07:39 -04:00
22 lines
402 B
JavaScript
22 lines
402 B
JavaScript
function executeCommand(galacticManager, player, target, args) {
|
|
var ghost = player.getPlayerObject();
|
|
var waypoint;
|
|
|
|
if(ghost == null || target == null) {
|
|
return;
|
|
}
|
|
|
|
waypoint = ghost.getWaypoint(target.getObjectId());
|
|
|
|
if(waypoint == null) {
|
|
return;
|
|
}
|
|
|
|
if(waypoint.isActive()) {
|
|
waypoint.setActive(false);
|
|
} else {
|
|
waypoint.setActive(true);
|
|
}
|
|
|
|
ghost.updateWaypoint(waypoint);
|
|
} |