Skip to content

Commit

Permalink
[293] Display purchase price only for vendor items
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadez committed Jul 6, 2010
1 parent 854ea1c commit 2294a97
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion includes/classes/class.items.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 289
* @revision 293
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -1879,5 +1879,12 @@ public function GetItemSlotId($itemID) {
}
return array('slot_id' => $slot_id, 'slotname' => $slotname);
}

public function IsVendorItem($itemID) {
if($this->wDB->selectCell("SELECT 1 FROM `npc_vendor` WHERE `item`=?", $itemID)) {
return true;
}
return false;
}
}
?>
2 changes: 1 addition & 1 deletion includes/revision_nr.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

define('ARMORY_REVISION', 292);
define('ARMORY_REVISION', 293);
define('DB_VERSION', 'armory_r289');

?>
4 changes: 2 additions & 2 deletions item-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 249
* @revision 293
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -72,7 +72,7 @@
if($data['SellPrice'] > 0) {
$xml->XMLWriter()->writeAttribute('sellPrice', $data['SellPrice']);
}
if($data['BuyPrice'] > 0) {
if($data['BuyPrice'] > 0 && $items->IsVendorItem($itemID)) {
$xml->XMLWriter()->writeAttribute('buyPrice', $data['BuyPrice']);
}
$cost_info = $mangos->GetExtendedCost($extended_cost);
Expand Down

0 comments on commit 2294a97

Please sign in to comment.