Beispiel #1
0
function plotToFed(&$player, $plotToHQ = false)
{
    debug('Plotting To Fed', $plotToHQ);
    if ($plotToHQ === false && $player->getSector()->offersFederalProtection()) {
        if (!$player->hasNewbieTurns() && !$player->hasFederalProtection() && $player->getShip()->hasIllegalGoods()) {
            //We have illegals and no newbie turns, dump the illegals to get fed protection.
            debug('Dumping illegals');
            processContainer(dumpCargo($player));
        }
        debug('Plotted to fed whilst in fed, switch NPC and wait for turns');
        changeNPCLogin();
        return true;
    }
    if ($plotToHQ === true) {
        return plotToNearest($player, SmrLocation::getLocation($player->getRaceID() + LOCATION_GROUP_RACIAL_HQS));
    }
    return plotToNearest($player, SmrLocation::getLocation($player->getRaceID() + LOCATION_GROUP_RACIAL_BEACONS));
    //	return plotToNearest($player,$plotToHQ===true?'HQ':'Fed');
}
Beispiel #2
0
function buildFolder($folderXMLObject)
{
    $folder = new Folder();
    processContainer($folder, $folderXMLObject);
    return $folder;
}