本文整理汇总了PHP中Globals::getSectorBBLink方法的典型用法代码示例。如果您正苦于以下问题:PHP Globals::getSectorBBLink方法的具体用法?PHP Globals::getSectorBBLink怎么用?PHP Globals::getSectorBBLink使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Globals
的用法示例。
在下文中一共展示了Globals::getSectorBBLink方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
$message = $player->getPlayerName() . ' has ' . $mines_message;
if (!empty($mines_message) && isset($combat_drones_message) && !isset($scout_drones_message)) {
$message .= ' and ' . $combat_drones_message;
} elseif (!empty($mines_message) && isset($combat_drones_message)) {
$message .= ', ' . $combat_drones_message;
} elseif (empty($mines_message) && isset($combat_drones_message)) {
$message .= $combat_drones_message;
}
if (!empty($mines_message) && isset($combat_drones_message) && isset($scout_drones_message)) {
$message .= ', and ' . $scout_drones_message;
} elseif ((!empty($mines_message) || isset($combat_drones_message)) && isset($scout_drones_message)) {
$message .= ' and ' . $scout_drones_message;
} elseif (empty($mines_message) && !isset($combat_drones_message) && isset($scout_drones_message)) {
$message .= $scout_drones_message;
}
if ($change_mines >= 0 && $change_combat_drones >= 0 && $change_scout_drones >= 0) {
$message .= ' to';
} elseif ($change_mines <= 0 && $change_combat_drones <= 0 && $change_scout_drones <= 0) {
$message .= ' from';
} else {
$message .= ' from/to';
}
$message .= ' your stack in sector ' . Globals::getSectorBBLink($forces->getSectorID());
$player->sendMessage($forces->getOwnerID(), MSG_SCOUT, $message, false);
}
$account->log(LOG_TYPE_FORCES, $change_combat_drones . ' combat drones, ' . $change_scout_drones . ' scout drones, ' . $change_mines . ' mines', $player->getSectorID());
$forces->updateExpire();
$forces->update();
// Needs to be in db to show up on CS instantly when querying sector forces
$ship->removeUnderAttack();
forward(create_container('skeleton.php', 'current_sector.php'));
示例2: create_error
<?php
if (!$player->isLandedOnPlanet()) {
create_error('You are not on a planet!');
}
$planet =& $player->getSectorPlanet();
$planetPlayer =& SmrPlayer::getPlayer($var['account_id'], $player->getGameID());
$owner =& $planet->getOwner();
if ($owner->getAllianceID() != $player->getAllianceID()) {
create_error('You can not kick someone off a planet your alliance does not own!');
}
$message = 'You have been kicked from ' . $planet->getName() . ' in ' . Globals::getSectorBBLink($player->getSectorID());
$player->sendMessage($planetPlayer->getAccountID(), 2, $message, false);
$planetPlayer->setLandedOnPlanet(false);
$planetPlayer->setKicked(true);
$planetPlayer->update();
forward(create_container('skeleton.php', 'planet_main.php'));