';
$rankText = Util::localizedString($this->curTpl, 'rank');
if (!empty($rankText))
$x .= '';
// name
$x .= ''.$this->names[$this->id].'';
// rank
if (!empty($rankText))
$x .= '
| '.$rankText.' |
|---|
';
if ($reqWrapper)
$x .= '';
// check for custom PowerDisplay
$pt = $this->curTpl['powerDisplayString'] ? $this->curTpl['powerDisplayString'] : $this->curTpl['powerType'];
// power cost: pct over static
if ($this->curTpl['powerCostPercent'] > 0)
$x .= $this->curTpl['powerCostPercent']."% ".sprintf(Lang::$spell['pctCostOf'], strtolower(Lang::$spell['powerTypes'][$pt]));
else if ($this->curTpl['powerCost'] > 0 || $this->curTpl['powerPerSecond'] > 0 || $this->curTpl['powerCostPerLevel'] > 0)
$x .= ($pt == 1 ? $this->curTpl['powerCost'] / 10 : $this->curTpl['powerCost']).' '.ucFirst(Lang::$spell['powerTypes'][$pt]);
// append periodic cost
if ($this->curTpl['powerPerSecond'] > 0)
$x .= sprintf(Lang::$spell['costPerSec'], $this->curTpl['powerPerSecond']);
// append level cost
if ($this->curTpl['powerCostPerLevel'] > 0)
$x .= sprintf(Lang::$spell['costPerLevel'], $this->curTpl['powerCostPerLevel']);
$x .= ' ';
if ($reqWrapper)
$x .= ' | ';
// ranges
if ($this->curTpl['rangeMaxHostile'])
{
// minRange exists; show as range
if ($this->curTpl['rangeMinHostile'])
$x .= sprintf(Lang::$spell['range'], $this->curTpl['rangeMinHostile'].' - '.$this->curTpl['rangeMaxHostile']).' ';
// friend and hostile differ; do color
else if ($this->curTpl['rangeMaxHostile'] != $this->curTpl['rangeMaxFriend'])
$x .= sprintf(Lang::$spell['range'], ''.$this->curTpl['rangeMaxHostile'].' - '.$this->curTpl['rangeMaxHostile']. '').' ';
// hardcode: "melee range"
else if ($this->curTpl['rangeMaxHostile'] == 5)
$x .= Lang::$spell['meleeRange'].' ';
// regular case
else
$x .= sprintf(Lang::$spell['range'], $this->curTpl['rangeMaxHostile']).' ';
}
if ($reqWrapper)
$x .= ' |
|---|
';
$x .= '| ';
// cast times
if ($this->curTpl['interruptFlagsChannel'])
$x .= Lang::$spell['channeled'];
else if ($this->curTpl['castTime'])
$x .= sprintf(Lang::$spell['castIn'], $this->curTpl['castTime'] / 1000);
else if ($this->curTpl['attributes0'] & 0x10) // SPELL_ATTR0_ABILITY instant ability.. yeah, wording thing only
$x .= Lang::$spell['instantPhys'];
else // instant cast
$x .= Lang::$spell['instantMagic'];
$x .= ' | ';
// cooldown or categorycooldown
if ($this->curTpl['recoveryTime'])
$x.= ''.sprintf(Lang::$game['cooldown'], Util::formatTime($this->curTpl['recoveryTime'], true)).' | ';
else if ($this->curTpl['recoveryCategory'])
$x.= ''.sprintf(Lang::$game['cooldown'], Util::formatTime($this->curTpl['recoveryCategory'], true)).' | ';
$x .= ' ';
if ($this->curTpl['stanceMask'])
$x.= '| '.Lang::$game['requires'].' '.Lang::getStances($this->curTpl['stanceMask']).' | ';
$x .= ' ';
$x .= ' |