mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Item/DetailPage
* fixed infobox cost for items with buycount > 1
This commit is contained in:
@@ -192,6 +192,7 @@ class ItemPage extends genericPage
|
|||||||
if (!empty($this->subject->getExtendedCost([], $_reqRating)[$this->subject->id]))
|
if (!empty($this->subject->getExtendedCost([], $_reqRating)[$this->subject->id]))
|
||||||
{
|
{
|
||||||
$vendors = $this->subject->getExtendedCost()[$this->subject->id];
|
$vendors = $this->subject->getExtendedCost()[$this->subject->id];
|
||||||
|
$stack = $this->subject->getField('buyCount');
|
||||||
$each = $this->subject->getField('stackable') > 1 ? '[color=q0] ('.Lang::item('each').')[/color]' : null;
|
$each = $this->subject->getField('stackable') > 1 ? '[color=q0] ('.Lang::item('each').')[/color]' : null;
|
||||||
$handled = [];
|
$handled = [];
|
||||||
$costList = [];
|
$costList = [];
|
||||||
@@ -215,12 +216,12 @@ class ItemPage extends genericPage
|
|||||||
|
|
||||||
if ($c < 0) // currency items (and honor or arena)
|
if ($c < 0) // currency items (and honor or arena)
|
||||||
{
|
{
|
||||||
$currency[] = -$c.','.$qty;
|
$currency[] = -$c.','.($qty / $stack);
|
||||||
$this->extendGlobalIds(TYPE_CURRENCY, -$c);
|
$this->extendGlobalIds(TYPE_CURRENCY, -$c);
|
||||||
}
|
}
|
||||||
else if ($c > 0) // plain items (item1,count1,item2,count2,...)
|
else if ($c > 0) // plain items (item1,count1,item2,count2,...)
|
||||||
{
|
{
|
||||||
$tokens[$c] = $c.','.$qty;
|
$tokens[$c] = $c.','.($qty / $stack);
|
||||||
$this->extendGlobalIds(TYPE_ITEM, $c);
|
$this->extendGlobalIds(TYPE_ITEM, $c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -231,7 +232,7 @@ class ItemPage extends genericPage
|
|||||||
|
|
||||||
$handled[] = md5(serialize($data));
|
$handled[] = md5(serialize($data));
|
||||||
|
|
||||||
$cost = isset($data[0]) ? '[money='.$data[0] : '[money';
|
$cost = isset($data[0]) ? '[money='.($data[0] / $stack) : '[money';
|
||||||
|
|
||||||
if ($tokens)
|
if ($tokens)
|
||||||
$cost .= ' items='.implode(',', $tokens);
|
$cost .= ' items='.implode(',', $tokens);
|
||||||
|
|||||||
Reference in New Issue
Block a user