本文整理汇总了PHP中SR_Player::displayName方法的典型用法代码示例。如果您正苦于以下问题:PHP SR_Player::displayName方法的具体用法?PHP SR_Player::displayName怎么用?PHP SR_Player::displayName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SR_Player
的用法示例。
在下文中一共展示了SR_Player::displayName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: announceADV
public function announceADV(SR_Player $player, SR_Player $target, $level, $key = '10000', $arg1 = '', $arg2 = '', $arg3 = '', $arg4 = '')
{
# Pick right keys. Each spell has own 4 keys for all 4 possibilities.
$key_friend = $key;
$key_foe = $key + 2;
if ($this->isCastMode()) {
$key_friend++;
$key_foe++;
}
$key_friend = (string) $key_friend;
$key_foe = (string) $key_foe;
# 9 args
$args = array($player->displayName(), $level, $this->getName(), $target->displayName(), $arg1, $arg2, $arg3, Shadowfunc::displayBusy($player->getBusyLeft()));
# Announce
$p = $player->getParty();
$ep = $target->getParty();
if ($ep->getID() !== $p->getID()) {
$ep->ntice($key_foe, $args);
}
if ($this->isCastMode()) {
# 10 args
# TODO: this 12 args
// $args[] = $this->getManaCost($player, $level);
// $args[] = $player->getMP();
// $args[] = $player->getMaxMP();
# Old spell style 10 args
$gain = $this->getManaCost($player, $level);
$oldmp = $player->getMP() + $gain;
$maxmp = $player->getMaxMP();
$args[] = Shadowfunc::displayMPGain($oldmp, -$gain, $maxmp);
}
$args[] = $arg4;
$p->ntice($key_friend, $args);
}
示例2: argsForMember
private static function argsForMember(SR_Player $member, &$enum)
{
return array($enum++, $member->displayName(), self::getFeel('food', $member, 'H'), self::getFeel('water', $member, 'T'), self::getFeel('sleepy', $member, 'S'), self::getFeel('cold', $member, 'C'));
}