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