mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
expanded reagents for spells
This commit is contained in:
@@ -131,37 +131,40 @@ class ItemList extends BaseType
|
||||
}
|
||||
|
||||
// convert items to currency if possible
|
||||
$moneyItems = new CurrencyList(array(['itemId', $cItems]));
|
||||
$moneyItems->addGlobalsToJscript(Util::$pageTemplate);
|
||||
|
||||
foreach ($itemz as $id => &$vendors)
|
||||
if ($cItems)
|
||||
{
|
||||
foreach ($vendors as &$costs)
|
||||
{
|
||||
foreach ($costs as $k => $v)
|
||||
{
|
||||
if (in_array($k, $cItems))
|
||||
{
|
||||
$found = false;
|
||||
foreach ($moneyItems->iterate() as $__)
|
||||
{
|
||||
if ($moneyItems->getField('itemId') == $k)
|
||||
{
|
||||
unset($costs[$k]);
|
||||
$costs[-$moneyItems->id] = $v;
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$moneyItems = new CurrencyList(array(['itemId', $cItems]));
|
||||
$moneyItems->addGlobalsToJscript(Util::$pageTemplate);
|
||||
|
||||
if (!$found)
|
||||
Util::$pageTemplate->extendGlobalIds(TYPE_ITEM, $k);
|
||||
foreach ($itemz as $id => &$vendors)
|
||||
{
|
||||
foreach ($vendors as &$costs)
|
||||
{
|
||||
foreach ($costs as $k => $v)
|
||||
{
|
||||
if (in_array($k, $cItems))
|
||||
{
|
||||
$found = false;
|
||||
foreach ($moneyItems->iterate() as $__)
|
||||
{
|
||||
if ($moneyItems->getField('itemId') == $k)
|
||||
{
|
||||
unset($costs[$k]);
|
||||
$costs[-$moneyItems->id] = $v;
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$found)
|
||||
Util::$pageTemplate->extendGlobalIds(TYPE_ITEM, $k);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->vendors[$id] = $vendors;
|
||||
}
|
||||
|
||||
$this->vendors = $itemz;
|
||||
}
|
||||
|
||||
$result = $this->vendors;
|
||||
@@ -178,7 +181,6 @@ class ItemList extends BaseType
|
||||
{
|
||||
if ($npc && $npcId != $npc)
|
||||
{
|
||||
|
||||
unset($data[$npcId]);
|
||||
continue;
|
||||
}
|
||||
@@ -188,8 +190,6 @@ class ItemList extends BaseType
|
||||
$valid = false;
|
||||
foreach ($costs as $k => $qty)
|
||||
{
|
||||
|
||||
|
||||
if ((!$tok || $k == $tok) && (!$cur || $k == -$cur))
|
||||
{
|
||||
$valid = true;
|
||||
|
||||
@@ -1481,10 +1481,7 @@ Lasts 5 min. $?$gte($pl,68)[][Cannot be used on items level 138 and higher.]
|
||||
if ($reagent[1] > 1)
|
||||
$_ .= ' ('.$reagent[1].')';
|
||||
|
||||
if(!empty($reagents))
|
||||
$_ .= ', ';
|
||||
else
|
||||
$_ .= '<br />';
|
||||
$_ .= empty($reagents) ? '<br />' : ', ';
|
||||
}
|
||||
|
||||
$xTmp[] = $_.'</div>';
|
||||
|
||||
Reference in New Issue
Block a user