';
$rankText = Util::localizedString($this->curTpl, 'rank');
if (!empty($rankText))
$x .= '';
// name
$x .= ''.$this->getField('name', true).'';
// rank
if (!empty($rankText))
$x .= '
| '.$rankText.' |
|---|
';
else
$x .= ' ';
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 || $pt == 6 ? $this->curTpl['powerCost'] / 10 : $this->curTpl['powerCost']).' '.ucFirst(Lang::$spell['powerTypes'][$pt]);
else if ($rCost = ($this->curTpl['powerCostRunes'] & 0x333))
{ // Blood 2|1 - Unholy 2|1 - Frost 2|1
$runes = [];
if ($_ = (($rCost & 0x300) >> 8))
$runes[] = $_." ".Lang::$spell['powerRunes'][2];
if ($_ = (($rCost & 0x030) >> 4))
$runes[] = $_." ".Lang::$spell['powerRunes'][1];
if ($_ = ($rCost & 0x003))
$runes[] = $_." ".Lang::$spell['powerRunes'][0];
$x .= implode(', ', $runes);
}
// 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']);
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'] > 0)
$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 .= ' ';
// SPELL_ATTR2_NOT_NEED_SHAPESHIFT
if ($this->curTpl['stanceMask'] && ($this->curTpl['attributes2'] & 0x80000) == 0)
$x.= '| '.Lang::$game['requires'].' '.Lang::getStances($this->curTpl['stanceMask']).' | ';
$x .= ' ';
$x .= ' |